gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
13.03k stars 518 forks source link

😎 using Dark mode still shows bright menu on Fedora/AppImage #2510

Open alexanderadam opened 9 months ago

alexanderadam commented 9 months ago

Untitled

mtsgrd commented 9 months ago

There is no Tauri API for setting the theme at runtime: https://github.com/tauri-apps/tauri/issues/5279

But until there is such an API we could try out this plugin: https://github.com/wyhaya/tauri-plugin-theme

SoMuchForSubtlety commented 8 months ago

I can't reproduce the issue on with Fedora+AppImage. Has this been fixed? image

maxmorozoff commented 6 months ago

Can reproduce on Debian 12.5 x86_64, GNOME Shell 43.9, gitbutler v0.11.0 installed using deb package from official website. image

venCjin commented 6 months ago

I can add that the same issue occurs on Windows (Windows 10 in my case). image

mtsgrd commented 2 months ago

I had another look at this, thinking we could ship a quick one.. but then I realized that Tauri plugin will force windows builds to restart when setting the theme. @PavelLaptev it would likely work fine for mac and linux, but what would you think about a confirmation dialog when doing it on windows that warns you it will trigger an app restart?

PavelLaptev commented 2 months ago

@mtsgrd yes, I can make a design

PavelLaptev commented 2 months ago

Here is the modal design https://www.figma.com/design/FbeLt0yjY9RiNn8MXUXsYs/Client-design?node-id=5711-6418&t=f4WaLjKxbCpcrN3Q-1

image
mtsgrd commented 2 months ago

That's peerfect.

daniilS commented 2 months ago

I can add that the same issue occurs on Windows (Windows 10 in my case).

On Windows, this seems require Tauri v2: https://github.com/tauri-apps/muda/issues/97

Caleb-T-Owens commented 2 months ago

This bar is generally bad looking even when its in the right colors.

@PavelLaptev, We are able to just not show the bar at all, so I'm wondering if this is something we could do better if we had our own bar implemented in svelte with a design that matched the rest of the application.

PavelLaptev commented 2 months ago

@PavelLaptev, We are able to just not show the bar at all, so I'm wondering if this is something we could do better if we had our own bar implemented in svelte with a design that matched the rest of the application.

I would like to avoid using a custom bar.

Maintenance. Custom components require ongoing maintenance, which can become cumbersome. I’m not sure it’s worth diving into this rabbit hole just because the native bar doesn’t look ideal.

Design. Disabling the bar on macOS might not even be possible, adding another layer of complexity that I’d prefer to avoid.

Performance. Native components are generally optimized for performance by the underlying system or framework, making them easier and more efficient to use.

Accessibility and Familiarity. Native components are typically optimized for accessibility out of the box. The top bar is also a standard feature across many applications, contributing to a more consistent and familiar user experience.

At this stage, a custom implementation could cause more issues. I'd prefer to stick with the simplest solution.

Caleb-T-Owens commented 2 months ago

@PavelLaptev

Disabling the bar on macOS might not even be possible, adding another layer of complexity that I’d prefer to avoid

I certainly would not want to disable it on macOS as it currently looks and feels great. On windows and linux however, we've had several people comment that it is unattractive

Native components are typically optimized for accessibility out of the box On windows and linux, its typical to not have these bars show at all and to have the actions performable though the UI instead.

PavelLaptev commented 2 months ago

I checked how some apps look on Windows, and it seems some of them don’t have this issue with the menu bar. It's integrated into the window header. Could this be related to Tauri, or is it because I’m using Windows 10, which is an older version?

image image

Figma for example hides the topbar on Window. But instead they have a little "arrow" button. Here is the thread https://forum.figma.com/t/where-is-the-main-top-menu-in-figma-for-windows/5373

But I'm afraid that if we hide the topbar on Windows, there will be inconsistency between platforms. And some of the user (macOS people) will have better UX.


As an example also Gitkraken has the same issue

image
daniilS commented 2 months ago

@PavelLaptev see my above comment for a discussion of the issue on Windows - styling the menu bar on Windows effectively requires drawing a custom menu bar (by which point some apps also integrate it into the header, as illustrated by gh desktop and vs code). Tauri v2 adds support for this.

PavelLaptev commented 2 months ago

@Caleb-T-Owens another thing why we can't just hide the menu bar on some of the platforms is some of the items that we have here. e.g. @mtsgrd is working on this feature currently — Check for updates in the menu bar

PavelLaptev commented 2 months ago

as illustrated by gh desktop and vs code). Tauri v2 adds support for this.

@daniilS it's the desirable variant. I'm totally fine if we can o it like this.

image

ndom91 commented 2 months ago

For AppImage users specifically, it might help if you explicitly pass in the correct GTK setting. AppImages and Flatpaks and the like sometimes have trouble reading the host's settings.

For example, in my .desktop file for GitButler I've changed the Exec line to include a prefix for the dark GTK theme. My desktop file now looks like this:

[Desktop Entry]
Categories=Development;Application
Exec=env APPIMAGE_GTK_THEME=Adwaita:dark /opt/appimages/git-butler-nightly_latest.AppImage %U
Icon=/opt/gitbutler/gitbutler-docs/public/fav/fav-32.png
Name=GitButler (nightly)
Terminal=false
Type=Application
Version=1.4