ynput / ayon-frontend

Codebase of AYON server web interface
Apache License 2.0
15 stars 14 forks source link

Settings: Better field focus #630

Open martastain opened 1 month ago

martastain commented 1 month ago

Story

@64qam wrote (and can provide more context)

When adding a new field the focus ends on the add button below (+), which is inconvenient because I usually have to fill in the field, so I have to click in the fields. It is unpleasant when lots of fields have to be completed and want to type in e.g. tvpp that destroys all previous work because p+p is a shortcut that leads to Project management.

How to replicate: When creating a new field, press space, it creates another field. Then you have to click in the field.

64qam commented 1 month ago

If I need to set a new value I always have to click into a highlighted field. I'd expect typing immidiately as the field is highlighted, but focus is switched to another button (+) when typing... https://github.com/user-attachments/assets/9c4cba07-d2d6-44d8-b025-a4658e6b1c38

64qam commented 1 month ago

Another unpleasant behavior can happen during configuration. E.g., values have been set, they are not saved yet, and extension for TVpaint (.tvpp) needs to be added. Click on the add button, want to type tvpp but as the field is not in focus and typing tvpp the page is redirected to Project Settings. Returning back to the addon settings page, all unsaved values gone.
https://github.com/user-attachments/assets/96089b49-b891-449f-ac78-aac0ece9aec5

martastain commented 1 month ago

@Innders Do we have a way to signal the keyboard shortcut component or the router that a page has unsaved changes and display a confirm dialog for example? i guess that would be useful in general

BigRoy commented 1 month ago

Do we have a way to signal the keyboard shortcut component or the router that a page has unsaved changes and display a confirm dialog for example? i guess that would be useful in general

Not related to this - but can we get the same for "Project Editor" with unsaved assets/changes?