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

feat: "add to album" shortcut and generic menu option shortcuts #15056

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dvdkon
Copy link

@dvdkon dvdkon commented Jan 3, 2025

This PR adds a shortcut for "add to album" in the photo grid view by adding a shortcut prop to <MenuOption>, which both registers the shortcut for as long as the menu option exists and shows a label for the key chord in the menu.

As a user, I'd like to be able to perform more actions in the Immich web UI with the keyboard. This change should allow more shortcuts to be added to existing actions with little extra code. For now I just added the one shortcut, while hoping that eventually most other menu items will get a shortcut as well.

I'm not particular about the shortcut chosen (L) or the key chord label format, so I'm open to suggestions.

Menu items with shortcut labels showing

@bo0tzz bo0tzz changed the title Add "add to album" shortcut along with generic menu option shortcuts feat: "add to album" shortcut and generic menu option shortcuts Jan 3, 2025
@alextran1502
Copy link
Contributor

What do you think about putting the + key for Add to album and Shift + + for Add to shared album?

@dvdkon
Copy link
Author

dvdkon commented Jan 3, 2025

What do you think about putting the + key for Add to album and Shift + + for Add to shared album?

I think plus (and any non-letter key) would run into issues with different keyboard layouts. Even US QWERTY doesn't have a "plus" button, so it'd have to be "equals" and "shift+equals" (i.e. "plus") there instead. Not insurmountable, but why bother, when there are plenty of letters left unused?

@alextran1502
Copy link
Contributor

Yeah that is a good point, then L and Shift-L is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants