Skip to content
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

Merged
merged 18 commits into from
Nov 19, 2024
Merged

Conversation

ehconitin
Copy link
Contributor

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 #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?

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 by usePrefetchedFavoritesData
  • Removed custom FavoriteFolderMenuItemMultiSelect component in favor of using MenuItemMultiSelect 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

@ehconitin ehconitin changed the title multiselect change and favorites cleanup favorite folders followup Nov 19, 2024

const shouldDisplayFavorites = isFavoriteFolderEnabled
? shouldDisplayFavoritesWithFeatureFlagEnabled
: shouldDisplayFavoritesWithoutFeatureFlagEnabled;

Copy link
Contributor Author

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!

@charlesBochet charlesBochet merged commit 4f2019e into twentyhq:main Nov 19, 2024
17 checks passed
Copy link

Thanks @ehconitin for your contribution!
This marks your 58th PR on the repo. You're top 1% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

BKM14 pushed a commit to BKM14/twenty that referenced this pull request Nov 20, 2024
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants