Alternative way of rendering when bookmarks are not open #167

Merged
sloum merged 1 commits from rendering-fix into release-2.3.1 2020-05-28 04:50:49 +00:00
Owner

There have been repeated issues from use of emojis and other non-mono-width unicode characters. To draw the bookmarks pannel we add in extra spaces as needed to take up the full width. We had been doing this for the regular view as well. The unicode characters were donking this view up really badly, but did not seem to have issues with the bookmarks bar.

It suddenly occured to me that we dont need to add in those spaces on this view. We just need to make sure to erase the line to the end. So I added an escape code to each line to do just that. This will also make it much nicer to copy text out of bombadillo since it will not add a bunch of spaces needlessly.

If anyone can pull this branch and just kind of browse around without the bookmarks pannel open for a bit and verify that they experience no weirdness that would be awesome.

As a point of comparrison you can see a bad render by visiting: gemini://tilde.pink with the current production branch of bombadillo, then visit the same page on this branch. The bad render is verified as being due to the unicode glyphs that are included, but this fix avoids the line spacing issues from them by just not filling the line with extra spaces. It is still possible for this to break down if using a narrow terminal width there the text almost but not quite makes it to the edge, in conjunciton with your terminal not supporting toggling of line wrapping (many work fine, some do not: gnome-term seems to do alright, st does not).

There have been repeated issues from use of emojis and other non-mono-width unicode characters. To draw the bookmarks pannel we add in extra spaces as needed to take up the full width. We had been doing this for the regular view as well. The unicode characters were donking this view up really badly, but did not seem to have issues with the bookmarks bar. It suddenly occured to me that we dont need to add in those spaces on this view. We just need to make sure to erase the line to the end. So I added an escape code to each line to do just that. This will also make it much nicer to copy text out of bombadillo since it will not add a bunch of spaces needlessly. If anyone can pull this branch and just kind of browse around without the bookmarks pannel open for a bit and verify that they experience no weirdness that would be awesome. As a point of comparrison you can see a bad render by visiting: `gemini://tilde.pink` with the current production branch of bombadillo, then visit the same page on this branch. The bad render is verified as being due to the unicode glyphs that are included, but this fix avoids the line spacing issues from them by just not filling the line with extra spaces. It is still possible for this to break down if using a narrow terminal width there the text almost but not quite makes it to the edge, in conjunciton with your terminal not supporting toggling of line wrapping (many work fine, some do not: gnome-term seems to do alright, st does not).
Collaborator

Looks good. make test returns ok, no linting issues. Visited baud.baby, my go to for testing line wrapping, and it was fine. Have been using it for a bit now with no issues, but if I see anything I'll let you know.

Looks good. `make test` returns ok, no linting issues. Visited baud.baby, my go to for testing line wrapping, and it was fine. Have been using it for a bit now with no issues, but if I see anything I'll let you know.
First-time contributor

tilde.pink looks fine to me on Guake terminal, for the record.

`tilde.pink` looks fine to me on Guake terminal, for the record.
sloum added the
bug
label 2020-05-26 21:30:58 +00:00
sloum closed this pull request 2020-05-28 04:50:49 +00:00
sloum deleted branch rendering-fix 2020-05-28 04:51:05 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sloum/bombadillo#167
No description provided.