-
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
Favorites Folders Fast Followups #8920
Favorites Folders Fast Followups #8920
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 refines the favorites folder functionality with UI and interaction improvements across navigation drawer and dropdown components.
- Changed
FavoriteFolderNavigationDrawerItemDropdown
dropdown placement to 'bottom-start' with fixed 160px width for better positioning - Added
StyledOrphanFavoritesContainer
inCurrentWorkspaceMemberFavoritesFolders
for consistent spacing between favorite items - Implemented
handleAddToFavorites
inPageFavoriteFolderDropdown
to prevent duplicate favorites - Reduced right padding from 1 to 0.5 spacing units in
NavigationDrawerItem
for better layout with folder options - Simplified
NavigationDrawerSectionTitle
by moving click handler toStyledLabel
and removing redundant right icon interactions
5 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile
...ges/twenty-front/src/modules/favorites/components/CurrentWorkspaceMemberFavoritesFolders.tsx
Show resolved
Hide resolved
...ges/twenty-front/src/modules/favorites/components/CurrentWorkspaceMemberFavoritesFolders.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/favorites/components/PageFavoriteFolderDropdown.tsx
Outdated
Show resolved
Hide resolved
...ront/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitle.tsx
Outdated
Show resolved
Hide resolved
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
(updates since last review)
This PR updates the favorites folder UI behavior to ensure the dropdown only appears after an item is favorited, along with several UI refinements.
- Modified
RecordShowPageBaseHeader
to conditionally renderPageFavoriteFoldersDropdown
only when item is favorited - Removed duplicate click handlers in
NavigationDrawerSectionTitle
to prevent double-firing - Simplified
PageFavoriteFolderDropdown
by removinguseCreateFavorite
hook and unused imports - Added margin fixes and menu width constraints for better dropdown positioning
4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
@@ -77,7 +77,7 @@ const StyledItem = styled('button', { | |||
|
|||
padding-bottom: ${({ theme }) => theme.spacing(1)}; | |||
padding-left: ${({ theme }) => theme.spacing(1)}; | |||
padding-right: ${({ theme }) => theme.spacing(1)}; | |||
padding-right: ${({ theme }) => theme.spacing(0.5)}; |
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.
@ehconitin this will impact all navigation drawer items, is this expected? (not only the workspace favorites). This seems suspicious!
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.
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.
Ok but how is it now broken on main branch ? it seems fine to me at least on production?
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.
I am not sure! I went through history of NavigationDrawerItem and it was always like this i.e, 4px padding all around
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 should we close this? or do you need me to dig deeper into it?
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 @ehconitin, left comments!
I have tested if functionnally and it feels nicer indeed
@@ -17,7 +17,10 @@ const StyledTitle = styled.div` | |||
font-size: ${({ theme }) => theme.font.size.xs}; | |||
font-weight: ${({ theme }) => theme.font.weight.semiBold}; | |||
height: ${({ theme }) => theme.spacing(5)}; | |||
padding: ${({ theme }) => theme.spacing(1)}; | |||
padding-left: ${({ theme }) => theme.spacing(1)}; | |||
padding-right: ${({ theme }) => theme.spacing(0.5)}; |
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.
this padding right 0.5 is suspicious!
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.
LGTM
Log
|
Fixes :
Fixes: Reduce menu width to 160px and it should appear below three dots
Fixes: The right margin should be 2px
Fixes:
Requirement: Clicking the heart Icon should put the record as favorite. It shouldn't open the menu on first click. It should only on second click, when the record is already a favorite.