-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add script to enable users to test symbol rendering on their terminals #979
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great in production 👍
While we aim to check for symbol support, we'd likely want the UI to be simpler, so as to not cause any other rendering issues :)
Leaving some comments inline :)
cf8e26b
to
8208b91
Compare
107b764
to
9635e2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good. 👍
And, although the code is much simpler and rendering fine, we do get a very wide box(at least on my terminal). The names and their corresponding symbols are also very far apart, and my comment below may help reduce the distance?
Apart from that, it's nice work. :)
9635e2d
to
8c7de56
Compare
@zeebit |
@zulipbot add "PR needs review" |
8c7de56
to
199efab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prah23 I'm not sure we need to linger on this PR too long, but the spaced-out layout makes it tricky to determine which element aligns with each text description. I think you may be able to get a more compact form of this by explicitly looking for the maximum lengths of each column (or at least the names) and specifying the width. You may be able to just use one column pair rather than one per row? Also given the Padding seems challenging to get right, perhaps cheat a little and put the linebox with fixed width in 3 columns?
Re the FAQ text, I think we need to simplify and maybe just say 'symbols' in place of non-ASCII. The previous problem should be long-gone (0.3.0 is some time/versions ago), and we should be resolving the problem listed by setting the encoding in ZT in any case. So maybe just mostly replace that paragraph? @zee-bit Did you have any issues with characters?
199efab
to
40e67fb
Compare
26f6669
to
d6d0371
Compare
@neiljp I've tested this on Windows Terminal (updated the description of the PR with the latest screenshot) and the GNOME Terminal, the display renders the same way and does not break on varying the terminal window's layout. @zulipbot add "PR needs review" |
d6d0371
to
316307e
Compare
This commit removes the "Unable to render non-ASCII characters" section from the FAQ which suggested that users set their terminal's encoding manually. This is no longer required post the version 0.4.0 release, in which we introduced urwid's set_encoding() method in run.py to set the user's terminal's encoding internally to render the characters properly.
719315e
to
afb441d
Compare
@prah23 To clarify my previous review, while this is expected to be a less-used script I'd prefer that we don't hard-code the widths but calculate them - we don't update the symbols very often, but it just takes one long name and the table goes awry from wrapping. The FAQ entry reads fine, but the user needs a way to validate what the script should produce - eg. v1 maybe suggest taking a screenshot and asking on czo if there are problems, or v2 have a trimmed-down screenshot of the script as it stands in the FAQ itself? (v3 ideally itself generated for when we update it and doing diffs in CI?) |
791e74d
to
d2f4215
Compare
@neiljp For the FAQ update, I've mentioned up to the suggested v2, I've shared a screenshot of the tool (taken on the GNOME Terminal) that the users can compare with and then let us know here or on CZO. |
d2f4215
to
82e4ff1
Compare
This commit adds a new folder `scripts/` to ship scripts that are meant for users. This commit also adds a new script that enables users to check how the various symbols listed in `config/symbols.py` render on their terminal emulator. The need for this script has arisen from the observed issues on the Windows Terminal, where with varying fonts, symbol rendering has also varied.
This commit updates the FAQ regarding symbol rendering information and specifies that the rendering of characters varies based on emulator and font. It also specifies that we provide a tool for the user that to conveniently test symbol rendering in their terminal emulator and font. A screenshot of the tool run on the GNOME Terminal in Ubuntu is also displayed so the users can note what the tool is ideally expected to display.
82e4ff1
to
2c3714c
Compare
@prah23 I just merged with a few minor textual changes - add that ctrl c == ^C, and some minor commit text tweaks 🎉 |
Heads up @prah23, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
This PR has 2 commits that do the following:
zulip-term-check-symbols
. This script has been placed in a new folder calledscripts/
.FAQ.md
has been updated to point users/contributors to the same, to help increase awareness on possible symbol rendering issues.Tested on Windows Terminal and GNOME Terminal on Ubuntu, the layout is maintained in both.
Screenshots: As observed on Windows Terminal:
![Symbols rendering script](https://user-images.githubusercontent.com/60441372/114244099-779a7280-99ab-11eb-90a5-4448916f856e.png)