Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tray: hide window if tray clicked while window focused #262

Closed
wants to merge 2 commits into from

Conversation

alchzh
Copy link

@alchzh alchzh commented Dec 1, 2023

Small quality-of-life thing. Allows the user to peek at Discord via the tray without moving the mouse from the tray to the window decoration or Alt-F4ing.

Can move to a setting if this is undesirable for some users.

@Vendicated
Copy link
Member

i'm not sure this is good UX tbh. no other app does this, and i personally might spam click the tray to show vesktop

@lewisakura
Copy link
Member

this is also not a discord behaviour, so it would be inconsistent with the main app and probably confusing

@alchzh
Copy link
Author

alchzh commented Dec 3, 2023

I understand that it would be annoying for this to be the default if you like to make redundant clicks on the bar. Would this be acceptable as an settings option? With #261 patched in I basically only use the system tray to launch the Vesktop

I don't think it'd bad UX- for almost every system tray icon clicking it once opens something or does an action and clicking it again closes it or reverses the action. It's somewhat against the standard convention to have an icon do nothing once you click it once.

@alchzh
Copy link
Author

alchzh commented Dec 3, 2023

Another thought: if the window is shown but not focused / behind a bunch of other windows, clicking the tray icon should focus it (helpful for responding to dms/pings from the notification badge).

@lewisakura
Copy link
Member

I understand that it would be annoying for this to be the default if you like to make redundant clicks on the bar. Would this be acceptable as an settings option? With #261 patched in I basically only use the system tray to launch the Vesktop

Maybe? But it's still a really weird option to have.

I don't think it'd bad UX- for almost every system tray icon clicking it once opens something or does an action and clicking it again closes it or reverses the action. It's somewhat against the standard convention to have an icon do nothing once you click it once.

All of my tray icons do one action when you click them, and doesn't undo the action. The only case I've ever heard of this happening is when the tray icon completely changes to respect the new action (e.g., recording software). It seems like it's against convention to give a tray icon multiple actions depending on context.

Another thought: if the window is shown but not focused / behind a bunch of other windows, clicking the tray icon should focus it (helpful for responding to dms/pings from the notification badge).

I agree, this would be useful, and in fact would be the correct behaviour for clicking the icon multiple times.

@alchzh
Copy link
Author

alchzh commented Dec 3, 2023

All of my tray icons do one action when you click them, and doesn't undo the action. The only case I've ever heard of this happening is when the tray icon completely changes to respect the new action (e.g., recording software). It seems like it's against convention to give a tray icon multiple actions depending on context.

What kind of tray icons do you have? All of my icons or widgets do something when you click them again...
image

  • Notification bell: Shows notifications on first click, hides notifications on second click
  • Fcitx Input: Switches to Chinese keyboard on first click, switches back to US keyboard on second click
  • Night Light: Disables nightlight temporarily on first click, re-enables night light on second click
  • Volume: Opens volume slider on first click, closes volume slider on second click
  • Battery: Opens battery and brightness menu on first click, closes battery and brightness menu on second click
  • Bluetooth: Opens Bluetooth menu on first click, closes Bluetooth menu on second click
  • etc. etc.

same applies to the buttons in the application launcher (maximize on first click, minimize on second click), the peek at desktop button (hides windows on first click, shows them again on second click), etc.

I can't find any icons or buttons on the panel where the first click does something, and the second click does nothing, which is the current Vesktop behavior. Regardless of what the main Discord app does, I think the "show on click, hide on second click" behavior is absolutely standard for anything on the panel (except workspace/desktop switcher, I guess).

@alchzh
Copy link
Author

alchzh commented Dec 3, 2023

Video example of what I mean -- Vesktop is the odd one out because it doesn't do anything when I click it at the end. You can see that OBS, another app which can hide its main window into the system tray, does both show and hide when clicking on the tray icon.

example.mp4

@Vendicated
Copy link
Member

please make this configurable (disabled by default)

otherwise this is not mergeable because it breaks windows convention and is inconsistent with stock discord

@Vendicated Vendicated marked this pull request as draft January 6, 2024 01:13
@Vendicated
Copy link
Member

superseded by 404

@Vendicated Vendicated closed this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants