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

add: related object name to favorite in navigation drawer #8659

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

harshrajeevsingh
Copy link
Contributor

@harshrajeevsingh harshrajeevsingh commented Nov 21, 2024

Closes: #8549

Screencast.from.2024-11-22.00-35-00.webm

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 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 to NavigationDrawerItem 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

Comment on lines +148 to +150
.navigation-drawer-item:hover & {
display: none;
}
Copy link
Contributor

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>
{' · '}
Copy link
Contributor

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

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.

Add related object name to the favorite in navigation drawer
1 participant