-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
keyboard navigation for field selection #6969
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request implements keyboard navigation for field type selection in the data model settings, addressing issue #6954. Key changes include:
- Added keyboard navigation using Tab, Shift+Tab, and Enter keys in SettingsDataModelFieldTypeSelect component
- Introduced new SettingsDataModelHotkeyScope enum for managing hotkey scopes
- Created SettingsDataModelFieldConfigurationForm component for improved field configuration UI
- Updated SettingsObjectNewFieldStep2 to support toggling between field type selection and configuration steps
- Implemented styling updates for focused and active states to improve visual feedback
These changes enhance user experience and accessibility in the custom field creation process, aligning with the desired behavior outlined in the issue.
4 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings
...ules/settings/data-model/fields/forms/components/SettingsDataModelFieldConfigurationForm.tsx
Show resolved
Hide resolved
...src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldTypeSelect.tsx
Outdated
Show resolved
Hide resolved
...src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldTypeSelect.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/settings/data-model/types/SettingsDataModelHotKeyScope.ts
Outdated
Show resolved
Hide resolved
As discussed in the video call, let's deactivate the navigation in the breadcrumb step selector when no field type has been selected. Additionally, disable the Cancel and Save buttons on step one! |
@Bonapara 2024-09-11.13-58-00.mp4 |
@lucasbordeau could you please review this one? Thanks |
Could you please add a story so the coverage gets above 50 % ? |
@lucasbordeau These already have their corresponding stories! |
@ehconitin, can the |
@Bonapara ofcourse! |
Enregistrement.de.l.ecran.2024-09-24.a.18.13.41.movI find it weird that the field type stays selected when you go back on the field type form even when you hit tab. |
...src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldTypeSelect.tsx
Show resolved
Hide resolved
Isn't it supposed to stay selected?
The selected or 'isActive' field uses a quaternary background, while 'isFocused' or hovered fields have a tertiary background. Now that you mention it, it does feel a bit odd, especially since the tertiary and quaternary backgrounds are visually similar in grayscale. Any thoughts on how we can improve this? |
@Bonapara, what are your thoughts on this? |
@Bonapara and I had discussed this earlier - #6969 (comment) |
...src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldTypeSelect.tsx
Outdated
Show resolved
Hide resolved
...src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldTypeSelect.tsx
Outdated
Show resolved
Hide resolved
...src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldTypeSelect.tsx
Outdated
Show resolved
Hide resolved
Once we hit tab inside the data model we are stuck inside it and can't reach the menu nor the exit buttons, I'm not sure that it's great for accessibility. What are your thoughts on this @Bonapara? |
You mean not accessible through keystrokes right? Yep I agree! I guess its the same reason hotscope was removed from serverless functions in #7235 Could we do something like on pressing esc the hotscope is removed? |
Nothing happens if we press |
I don’t think this would work :( Even if we unscope on
Nope! |
What do you think is the best option @ehconitin? |
Adressing #6954
@Bonapara
How about this behaviour? The field wont be selected initially and then it is persistent once selected?
2024-09-10.18-16-32.mp4
Key navigation -
I couldnt show key strokes on screen like u do :)
2024-09-10.18-09-55.mp4