-
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
add: related object name to favorite in navigation drawer #8659
base: main
Are you sure you want to change the base?
add: related object name to favorite in navigation drawer #8659
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 adds object type labels to favorites in the navigation drawer, displaying the related object name (e.g. "Company", "Person") next to each favorite item with a bullet point separator.
Key changes:
- Added
objectName
prop toNavigationDrawerItem
with styled container showing "· ObjectName" format - Implemented hover behavior to hide object name when hovering favorite items
- Added
StyledItemObjectName
component with proper styling and text capitalization - Passed
objectNameSingular
from favorite objects through to navigation components - Fixed display formatting with proper spacing and text overflow handling
4 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
...twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx
Outdated
Show resolved
Hide resolved
.navigation-drawer-item:hover & { | ||
display: none; | ||
} |
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.
logic: Hiding content on hover may cause accessibility issues for keyboard/screen reader users
</NavigationDrawerAnimatedCollapseWrapper> | ||
{objectName ? ( | ||
<StyledItemObjectName> | ||
{' · '} |
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: Non-breaking space should be used instead of regular space for better typography
@Bonapara this looks cool, could you review the behavior!? |
@harshrajeevsingh could you make sure only favorite's label is being truncated and not all of the navigation drawer item. |
@ehconitin Oh! I missed that part. I will make changes soon. |
Closes: #8549
Screencast.from.2024-11-22.00-35-00.webm