Repository navigation
fix: Garbled text in sidebar and dropdown menus on Linux - #9286
Conversation
|
Ah I had linked it in the git commit message but didn't know it needed to be in PR description |
sprocketc
left a comment
There was a problem hiding this comment.
@cas-- Big thanks for helping us fix a long standing problem! ❤️
I cannot reproduce the issue or QA the fix, since it requires a particular GPU+drivers combo, but it looks like another user confirmed that it works #7233 (comment)
Applying a nested opacity rule will further decrease the overall opacity of the element. I was wondering if explicitly setting the opacity to 1, also fixes the issue. This is a minor detail, but it would help us understand the problem, and it would produce a consistent result across all platforms,
Added a new is-linux ui class to narrow the workaround to Linux only, not strictly required but thought it would be useful to denote an OS specific workaround.
I am indifferent towards this, but I totally agree that the comment on the CSS changes is useful. If setting the opacity to 1 does not work, I would personally suggest removing the is-linux class to maintain a consistent result. The comment should be enough.
|
Thanks @sprocketc, I overlooked that nested opacity would decrease existing value of the element, of course barely noticeable when testing! A quick check and setting opacity to 1 has no effect, likely since a no-op. Setting 0.99 would be close enough for now 🤔 Reading up on opacity on mdn I saw that for values less than 1 it will create a new stack context. From that I tried changing stack context e.g. z-index or clip-path and found that can also mitigate the issue. Not a fix but interesting information to add to issue... Plus it might be any image not just svg... So I'll update the PR for |
|
Thanks for the follow up. If adding the element to a different z-index stack fixes this, simply setting its position to |
|
Yes position relative does work too |
|
Great! Replacing |
f395080 to
32b1315
Compare
|
I added an extra fix for the graph/repo dropdown ( |
Linux users with Intel GPUs have been reporting issues with garbled or ghosting text in the sidebar nav and header dropdown menu. The exact cause is unknown but likely a Electron rendering issue with Intel GPUs when opacity is set with the icons and text elements. To workaround the problem we can set an element that will change the stacking context directly on the problem elements. Fixes: logseq#7233
32b1315 to
499a54c
Compare
|
Thanks for this PR! I had this issue before, and I tested this PR and it fixes the issue on Intel GPUs for me. 👍 |
Linux users with Intel GPUs have been reporting issues with garbled text
in the sidebar nav and header dropdown menu.
The exact cause is unknown but likely a Electron rendering issue with
Intel GPUs when opacity is set with SVG and text elements.
To workaround the problem we can set the required opacity directly to
the text element.
Added a new
is-linuxui class to narrow the workaround to Linux only, not strictly required but thought it would be useful to denote an OS specific workaround.Fixes #7233