-
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
favorite folders followup #8570
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 PR simplifies the favorites folder picker implementation and fixes checkbox styling issues, while addressing rendering behavior of the favorites section.
- Removed redundant filtering in
/packages/twenty-front/src/modules/favorites/components/CurrentWorkspaceMemberFavoritesFolders.tsx
as it's now handled byusePrefetchedFavoritesData
- Removed custom
FavoriteFolderMenuItemMultiSelect
component in favor of usingMenuItemMultiSelect
directly from twenty-ui - Removed custom padding from IconPlus in
/packages/twenty-front/src/modules/favorites/favorite-folder-picker/components/FavoriteFolderPickerFooter.tsx
- Issue If there are no favorites and a folder is added, favorite section doesnt render until it has atleast one favorite #8569 remains open due to feature flag constraints preventing folders from rendering without favorites
4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
...s/twenty-front/src/modules/favorites/favorite-folder-picker/hooks/useFavoriteFolderPicker.ts
Outdated
Show resolved
Hide resolved
...s/twenty-front/src/modules/favorites/favorite-folder-picker/hooks/useFavoriteFolderPicker.ts
Outdated
Show resolved
Hide resolved
|
||
const shouldDisplayFavorites = isFavoriteFolderEnabled | ||
? shouldDisplayFavoritesWithFeatureFlagEnabled | ||
: shouldDisplayFavoritesWithoutFeatureFlagEnabled; | ||
|
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.
@charlesBochet need confirmation on this, rest everything looks good to me!
Thanks @ehconitin for your contribution! |
Something changed, which affected the Favorite folder picker checkbox styles -- fixed it! Cleaned up code in `CurrentWorkspaceMemberFavoritesFolders` - removed redundant filtering since favorites are already filtered in `usePrefetchedFavoritesData`. Regarding issue twentyhq#8569 - I am not sure what to do in this case. Since Folders data is gated by a feature flag, we can't use it in `CurrentWorkspaceMemberFavoritesFolders` to ensure the favorite section renders with empty folders. Currently, the section only appears when at least one favorite exists - may be leave this section open at all times or fix this bug after removal of the feature flag? --------- Co-authored-by: Nitin Koche <[email protected]> Co-authored-by: Charles Bochet <[email protected]>
Something changed, which affected the Favorite folder picker checkbox styles -- fixed it!
Cleaned up code in
CurrentWorkspaceMemberFavoritesFolders
- removed redundant filtering since favorites are already filtered inusePrefetchedFavoritesData
.Regarding issue #8569 - I am not sure what to do in this case. Since Folders data is gated by a feature flag, we can't use it in
CurrentWorkspaceMemberFavoritesFolders
to ensure the favorite section renders with empty folders. Currently, the section only appears when at least one favorite exists - may be leave this section open at all times or fix this bug after removal of the feature flag?