Skip to content

Text in left navigation menu is garbled #7233

Closed

Description

@almereyda

Status: This is an upstream issue of Electron.

What happened?

When launching a fresh Logseq instance on this Ubuntu 22.04 machine, the text display of the left navigation menu is garbled.

Reproduce the Bug

  1. Launch Logseq.
  2. See the text garbled.

Expected Behavior

The text is not garbled.

Screenshots

1

2

3

Desktop Platform Information

Ubuntu 22.04, App, 0.8.10

Mobile Platform Information

No response

Additional Context

Thanks!

Activity

  1. added
    css
    need-to-reproduce
    on Nov 6, 2022
  2. sprocketc commented on Nov 7, 2022

    @sprocketc
    Collaborator

    Looks like a duplicate of #7153, reported for 0.8.9.

  3. sprocketc commented on Nov 7, 2022

    @sprocketc
    Collaborator

    I can't reproduce this on my machine. @almereyda Could you please run Logseq with the --disable-gpu flag to check if that's a hardware acceleration issue?

  4. marcel-me commented on Nov 16, 2022

    @marcel-me

    @sprocketc No text glitches if I run logseq with --disable-gpu .

  5. almereyda commented on Nov 17, 2022

    @almereyda
    Author

    Same here when testing on the affected instance, where we find the text glitches disappearing when disabling the GPU.

  6. wiraki commented on Nov 23, 2022

    @wiraki

    Same here, on 0.8.11, --disable-gpu removes the garble.

  7. wiraki commented on Nov 24, 2022

    @wiraki

    One more piece of evidence that I just noticed and that may help debugging:

    Turning on Bonofix Theme (installed via Marketplace) almost makes the problem go away. I can only see some small artifacts when hovering over the menu, but nothing permanent. Labels stay fully-readable.

  8. dantswain commented on Nov 29, 2022

    @dantswain

    I experienced the same issue with the 0.8.11 AppImage on linux. --disable-gpu also solves it for me. I do not have any default scaling set for my display.

    EDIT After messing around with my drivers, it seems that when I switch from the on-demand nvidia PRIME profile to the nvidia (performance) profile, I am able to launch logseq without --disable-gpu and everything looks fine.

    • prime-select query shows on-demand -> garbled menus unless I use --disable-gpu
    • sudo prime-select nvidia then reboot and prime-select query shows nvidia -> menus not garbled regardless of --disable-gpu.

    So maybe an issue related to the i915 intel gpu driver?

    image

  9. almereyda commented on Dec 9, 2022

    @almereyda
    Author

    Would you know how we can debug this?

  10. cnrpman commented on Dec 22, 2022

    @cnrpman
    Collaborator

    @almereyda It's an upstream issue.
    Wonder if electron 20 can fix #7692

  11. added
    upstream
    on Dec 28, 2022
  12. 24 remaining items

  13. Bad3r commented on Apr 30, 2023

    @Bad3r
    Collaborator

    Since users reported it working in 0.8.8 I took it upon myself to do the tedious task of git biset and found that commit 7d3ed2b from merging #6926 resulted in triggering the problem in the sidebar and settings menu:

    image

    Reverting the changes relating to opacity resolves the issue. I am unable to speculate on the actual issue since there likely is more going on that just the CSS opacity. There is still an upstream hardware acceleration bug with Intel graphics in Chromium/Electron but Logseq can work around it for now.

    image

    To revert to a working sidebar and settings menu I made the following changes with 0.8.9:

    diff --git src/main/frontend/components/right_sidebar.css src/main/frontend/components/right_sidebar.css
    
    index db1b78590..71b9e1bf9 100644
    
    --- src/main/frontend/components/right_sidebar.css
    
    +++ src/main/frontend/components/right_sidebar.css
    
    @@ -28,6 +28,6 @@ html[data-theme=light] a.toggle:hover {
    
     
    
     html[data-theme=dark] {
    
         .cp__header a, .cp__header button, .cp__right-sidebar-topbar button {
    
    -        opacity: 0.7;
    
    +        opacity: 1;
    
         }
    
     }
    
    diff --git src/main/frontend/components/sidebar.css src/main/frontend/components/sidebar.css
    
    index dc3ba7939..a5883b4ae 100644
    
    --- src/main/frontend/components/sidebar.css
    
    +++ src/main/frontend/components/sidebar.css
    
    @@ -337,7 +337,7 @@
    
     
    
       a {
    
         color: var(--ls-header-button-background);
    
    -    opacity: 0.9;
    
    +    opacity: 1;
    
       }
    
     
    
       a:hover {
    

    For latest master code sidebar.css has been move to container.css so following slight change required but still looks good:

    diff --git src/main/frontend/components/container.css src/main/frontend/components/container.css
    
    index 986f3f9a6..0e50f7ae5 100644
    
    --- src/main/frontend/components/container.css
    
    +++ src/main/frontend/components/container.css
    
    @@ -343,7 +343,7 @@
    
       width: 10px;
    
     
    
       a {
    
    -    @apply opacity-90 hover:opacity-100;
    
    +    @apply opacity-100 hover:opacity-100;
    
     
    
         color: var(--ls-header-button-background);
    
       }
    

    You can override the CSS in custom.css

  14. sutram commented on May 1, 2023

    @sutram

    @Bad3r Appreciate it. I have never used custom.css. How do I override the opacity in custom.css with 0.9.4? Thank you!

  15. Bad3r commented on May 1, 2023

    @Bad3r
    Collaborator

    @Bad3r Appreciate it. I have never used custom.css. How do I override the opacity in custom.css with 0.9.4? Thank you!

    Just copy and paste the CSS there with the new value. It overrides the default app CSS.

  16. cas-- commented on May 1, 2023

    @cas--
    Contributor

    A bit more fiddling with the CSS and it seems like it's related to the SVG icons since if they are hidden the text is displayed normally. Also applying opacity directly to the elements can cause the SVG icons to be corrupted instead!

    Anyway this is the custom.css required to display the text correctly (tested on 0.9.4) while keeping the intended opacity:

    .cp__header .dropdown-wrapper .title-wrap {
    	position: relative;
    }
    
    .cp__menubar-repos .nav-header span.flex-1, #repo-switch{
    	position: relative;
    }

    Note will need a custom.css for every graph.

    Edit: Modified to reflect new finding regarding stacking context #9286 (comment)

  17. sutram commented on May 1, 2023

    @sutram

    @cas-- Wow! I verified that it works with 0.9.4. Thanks for providing the CSS change

  18. Bad3r commented on May 1, 2023

    @Bad3r
    Collaborator

    A bit more fiddling with the CSS and it seems like it's related to the SVG icons since if they are hidden the text is displayed normally. Also applying opacity directly to the elements can cause the SVG icons to be corrupted instead!

    Anyway this is the custom.css required to display the text correctly (tested on 0.9.4) while keeping the intended opacity:

    .cp__header .dropdown-wrapper .title-wrap {
    
        opacity: 0.9;
    
    }
    
    
    
    .nav-header span.flex-1 {
    
        opacity: 0.9;
    
    }

    Note will need a custom.css for every graph.

    You should submit a PR :D

  19. logseq-cldwalker commented on May 2, 2023

    @logseq-cldwalker
    Collaborator

    Can anyone who's observed this issue confirm that #9286 fixes the issue?

  20. moved this from ⏳ Blocked to ✔ DONE in :Logseq/Issue-Trackeron May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    :type/enhancementcsselectronos:linuxupstreamux

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions