Skip to content

UX: Use arrow keys to navigate in edit dialog - #3623

Closed
tomplast wants to merge 4 commits into
photoprism:developfrom
tomplast:allow_keyboard_navigation_in_edit_photo_dialog
Closed

UX: Use arrow keys to navigate in edit dialog#3623
tomplast wants to merge 4 commits into
photoprism:developfrom
tomplast:allow_keyboard_navigation_in_edit_photo_dialog

Conversation

@tomplast

Copy link
Copy Markdown

What does it implement / fix / improve? Why?
I thought it would be useful (and intuitive) if you could use the keyboard arrows to navigate to previous and next image while in the photo edit dialog.

Are the changes related to an existing issue?
Nope.

@CLAassistant

CLAassistant commented Aug 12, 2023

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@graciousgrey

Copy link
Copy Markdown
Member

Thank you very much for your contribution! We will have a look at this once the recently merged pull requests have been successfully released :)

@tomplast

Copy link
Copy Markdown
Author

@graciousgrey Any updates :) ?

@lastzero

Copy link
Copy Markdown
Member

Please note that we are out of the office until October 3 to get some rest after working on the new release. πŸοΈπŸ’¬

@graciousgrey

Copy link
Copy Markdown
Member

The first tests look good so far :) It works in all browsers I have tested.
I just noticed that sometimes I have to click into the edit dialog before I can use the arrow keys.

@graciousgrey

Copy link
Copy Markdown
Member

@tomplast We found one thing we need to resolve before we can merge this: The app must only navigate to the next edit dialog when the focus is not on an input field.

@tomplast

Copy link
Copy Markdown
Author

@graciousgrey Functionality wise I think have fixed the issues you mentioned.

@graciousgrey

Copy link
Copy Markdown
Member

Thank you! I will test your changes as soon as possible :)

@graciousgrey

Copy link
Copy Markdown
Member

I just tested your latest changes.

I just noticed that sometimes I have to click into the edit dialog before I can use the arrow keys.

I have not observed this anymore πŸŽ‰

The app must only navigate to the next edit dialog when the focus is not on an input field.

I still see this behavior. The strange thing is that sometimes it works and sometimes it doesn't. One way around this could be to use a key combination that has no other function assigned to it, such as navigating in an input field. For example: shift key + arrow key.

I also realized that we need to prevent navigating to the next edit dialog when there are unsaved changes. For example, if a user has edited a field and not clicked Apply or Done, the changes will be lost when navigating to the next edit dialog. We could either prevent navigation without a message, or add a dialog that informs the user that there are unsaved changes and lets him save or discard them.

@tomplast

tomplast commented Nov 4, 2023

Copy link
Copy Markdown
Author

Sorry for the late reply, I will try to look into it the coming week.

@graciousgrey

Copy link
Copy Markdown
Member

No need to hurry :) We are currently busy with 2FA and OpenID Connect support, so we only have limited time to review changes over the next weeks.

@lastzero lastzero added in-progress Somebody is working on this and removed work-in-progress labels Oct 1, 2024
@lastzero

Copy link
Copy Markdown
Member

I'd love to give this a try now that the frontend has been upgraded from Vuetify v1.5 to v3.7! πŸ‘Œ

@lastzero lastzero added frontend Requires experience with HTML/JS/CSS ux Impacts User Experience labels Mar 27, 2025
@lastzero lastzero self-assigned this Mar 27, 2025
@lastzero lastzero added enhancement and removed in-progress Somebody is working on this labels Mar 27, 2025
@lastzero lastzero moved this to Development 🐝 in Roadmap πŸš€βœ¨ Mar 27, 2025
@lastzero lastzero changed the title Feature request: Allow the use of the left and right arrow to navigate while in photo … UX: Use arrow keys to navigate in edit dialog Mar 28, 2025
lastzero added a commit that referenced this pull request Mar 28, 2025
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero

Copy link
Copy Markdown
Member

@tomplast Thanks again for your contribution! Based on your request and proof-of-concept, the above commit adds support for navigating with the arrow keys in the edit dialog.

To ensure that this only happens when no input element has focus, navigating with the keys is only possible when the active element is a div, the dialog is active, and the model data is unchanged.

Since we also support right-to-left languages like Arabic and Hebrew, another thing to keep in mind was to flip left and right when using the keys.

Related Issues:

I'm sorry we couldn't take care of this sooner! But now it's finally done, so we can close the PR (since it's no longer needed) and set the status to Preview for final testing.

@lastzero lastzero closed this Mar 28, 2025
@lastzero lastzero added the please-test Ready for manual testing & feedback label Mar 28, 2025
@lastzero lastzero moved this from Development 🐝 to Preview 🐳 in Roadmap πŸš€βœ¨ Mar 28, 2025
@lastzero lastzero assigned tomplast and unassigned lastzero Mar 28, 2025
@lastzero

lastzero commented Apr 1, 2025

Copy link
Copy Markdown
Member

I've created a follow-up issue to take care of the remaining issues we found while testing (getting help from our community for this would be awesome):

lastzero added a commit that referenced this pull request Apr 2, 2025
Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit that referenced this pull request Apr 2, 2025
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero

lastzero commented Apr 2, 2025

Copy link
Copy Markdown
Member

It seems that the arrow keys stopped working after pressing the Apply button because disabled elements cannot have focus, i.e. the browser automatically focused the <body> element instead without triggering an additional focusout event. The above changes handle this and other situations, and should prevent the edit and lightbox dialogs from losing focus when active. Any help testing this with our preview build would be much appreciated! βœ…

lastzero added a commit that referenced this pull request Apr 4, 2025
Signed-off-by: Michael Mayer <michael@photoprism.app>
@graciousgrey graciousgrey added tested Changes have been tested successfully and removed please-test Ready for manual testing & feedback labels Apr 18, 2025
@graciousgrey graciousgrey moved this from Preview 🐳 to Release 🌈 in Roadmap πŸš€βœ¨ Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Requires experience with HTML/JS/CSS tested Changes have been tested successfully ux Impacts User Experience

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants