trayscale icon indicating copy to clipboard operation
trayscale copied to clipboard

cmd/trayscale: support displaying connection status in menu

Open slagiewka opened this issue 2 years ago • 3 comments

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.

slagiewka avatar Jun 24 '23 12:06 slagiewka

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 avatar Jun 26 '23 02:06 DeedleFake

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.

DeedleFake avatar Jun 26 '23 03:06 DeedleFake

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:

  • a quick connection toggle that resides with the connection status (see below, not a checkbox yet)
  • an item with User Name ([email protected])

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

slagiewka avatar Jun 26 '23 07:06 slagiewka

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

Jacalz avatar Jul 05 '24 08:07 Jacalz

Updated to reflect current tray setup.

slagiewka avatar Jul 05 '24 20:07 slagiewka

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

DeedleFake avatar Jul 05 '24 23:07 DeedleFake

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?

DeedleFake avatar Jul 09 '24 17:07 DeedleFake

Sounds good to me :)

Jacalz avatar Jul 09 '24 18:07 Jacalz