DeedleFake / trayscale

An unofficial GUI wrapper around the Tailscale CLI client.
MIT License
458 stars 16 forks source link

internal/tray: support displaying connection status #68

Closed slagiewka closed 2 months ago

slagiewka commented 1 year ago

This adds a simple tray menu section that changes according to connection status and resembles the behaviour of the original client tray (macOS).

I found the current tray menu pretty lacklustre, at least compared to the official client (however, this is old design). In order to familiarise myself with the project, I decided to go with this simple info first.

Let me know if this is the direction you'd like to see to project go towards.

DeedleFake commented 1 year ago

Looks good to me, especially with that TODO which I completely agree with. I've taken a stab a few times at building a system to manage the tray menu but haven't gotten too far yet. The systray package has some strange API choices, so I've also started a refactor of that package that I'm hoping to get upstreamed at some point.

DeedleFake commented 1 year ago

My one concern is whether or not this is actually necessary. The tray icon itself already changes to indicate connection status, so having an indicator in the menu as well doesn't really seem necessary to me. Are there environments in which the menu is accessible but the icon isn't necessarily visible? I'm mostly using this in GNOME (with an extension) and KDE, so the icon is always visible at a glance unless something's fullscreen or something.

slagiewka commented 1 year ago

My one concern is whether or not this is actually necessary. The tray icon itself already changes to indicate connection status, so having an indicator in the menu as well doesn't really seem necessary to me.

No, this doesn't seem to be needed all that much. And current design of the official clients has moved to just having the quick toggle in this place:

Screenshot 2023-06-24 at 15 04 43

And that makes sense, since there's already the status icon (Tailscale and Trayscale) and status toggle in GUI (Trayscale). I agree that it's extraneous. For me it was a good start though to start the development around things in the tray. It's the most common data the app has and updates regularly.

Are there environments in which the menu is accessible but the icon isn't necessarily visible? I'm mostly using this in GNOME (with an extension) and KDE, so the icon is always visible at a glance unless something's fullscreen or something.

I'm also using both of the above. And I also can't think of a scenario where the tray icon is not visible but the tray menu is still (somehow) accessible. Even GNOME without the tray extension only shows the actual window (if present).

To sum up, I've already added new functionality in my local dev:

Which proves that we definitely have most of the data we would need to provide more insight at a glance or even quick toggles without going to the actual UI. Kind of against GNOME philosophy, but in line with Tailscale itself.

connection_toggle

Jacalz commented 3 months ago

What's the status on this? It would be a very useful addition to the menu :)

slagiewka commented 3 months ago

Updated to reflect current tray setup.

DeedleFake commented 3 months ago

It's been a little while. I'll take another look at this on Sunday and see.

DeedleFake commented 2 months ago

I took another look at this and am again unsure of the purpose considering the icon change to indicate the status. What I'm currently thinking is that I'll merge this and then change it to be a toggle that can be clicked to start/stop Tailscale without having to open the window for it, i.e. an item that is not disabled and is labeled "Disconnect" or "Connect" where appropriate. Thoughts?

Jacalz commented 2 months ago

Sounds good to me :)