-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix for view switcher default icon display #7029
Fix for view switcher default icon display #7029
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 addresses issue #6947 by modifying the IconPicker component and ViewPickerCreateOrEditContent to correctly display default icons for Table and Kanban views until a custom icon is selected.
- Added
takeControlOfCustomIcon
prop to IconPicker for distinguishing between default and custom icons - Implemented
getIconForIconPicker
function in IconPicker to determine the correct icon to display - Introduced
takeControlOfCustomIcon
state in ViewPickerCreateOrEditContent to track custom icon selection - Updated IconPicker usage in ViewPickerCreateOrEditContent to respect the default icon until explicitly changed
- Reset icon control when view type changes in ViewPickerCreateOrEditContent
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
Thanks for the PR!
See my comments :)
- Let's not introduce a new props and behavior on IconPicker
- Let's set the default icon in ViewPickerCreateOrEditContentEffect instead for viewCreation case
- you are pushing a new yarn.lock which is incorrect could you remove this file from your commit?
packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx
Outdated
Show resolved
Hide resolved
...ages/twenty-front/src/modules/views/view-picker/components/ViewPickerCreateOrEditContent.tsx
Outdated
Show resolved
Hide resolved
@rathodvinod5 The solution was to use a state in |
Fixes twentyhq#6947 (View switcher default icon display) --------- Co-authored-by: Lucas Bordeau <[email protected]>
@lucasbordeau thanks for the guide, I will follow this practice in my future PR's. |
Fixes #6947 (View switcher default icon display)