-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Breadcrumb DropDown improvement #7546
Breadcrumb DropDown improvement #7546
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 enhances the user experience in the field creation process for the data model settings, focusing on improved navigation and field type handling.
- Added field type handling in
SettingsDataModelNewFieldBreadcrumbDropDown.tsx
, disabling the 'Configure' step when no field type is selected - Implemented setting of field type in form context when selected in
SettingsObjectNewFieldSelector.tsx
- Modified navigation in
SettingsObjectNewFieldConfigure.tsx
to preserve field type when canceling configuration - Improved overall user feedback and prevented invalid navigation states throughout the field creation flow
3 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
const theme = useTheme(); | ||
|
||
const fieldType = searchParams.get('fieldType') as SettingsFieldType; |
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.
style: Consider using a type guard or assertion function instead of type assertion
const handleClick = (isConfigureStep: boolean) => { | ||
if (isConfigureStep) { | ||
navigate(`/settings/objects/${objectSlug}/new-field/configure`); | ||
const handleClick = (step: 'select' | 'configure') => { |
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.
style: handleClick function could be simplified by using early returns
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.
Great! Thank you
...t/src/modules/settings/data-model/components/SettingsDataModelNewFieldBreadcrumbDropDown.tsx
Outdated
Show resolved
Hide resolved
Thanks @ehconitin for your contribution! |
context - twentyhq#7397 (review) P.S. Apologies for the background music in the screen recording—I didn’t realize my mic was on while capturing it. 😅 https://github.com/user-attachments/assets/0cd31aa7-9ce2-4577-a79a-73c9890f2905 --------- Co-authored-by: Félix Malfait <[email protected]>
context - #7397 (review)
P.S. Apologies for the background music in the screen recording—I didn’t realize my mic was on while capturing it. 😅
2024-10-09.23-55-08.mov