-
Notifications
You must be signed in to change notification settings - Fork 2
FEN-192 Do not hyperlink NavItems with children #250
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
Conversation
|
WalkthroughThe changes introduce a new prop Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/components/modules/navigations/web/NavMini/NavSectionMini/NavList/NavItem/index.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /packages/components/.eslintrc.js
packages/components/modules/navigations/web/__shared__/NavSectionVertical/Group/NavList/NavItem/index.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /packages/components/.eslintrc.js
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
611dc83 to
b41bf17
Compare
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/components/CHANGELOG.md (1)
3-8: Clarify and Enrich the Changelog EntryThe new changelog entry for version 1.0.32 clearly states that it disables links for navigation elements with children and fixes a vertical alignment issue. To improve clarity and traceability, consider referencing the PR ticket (FEN-192) and elaborating that the vertical alignment fix was achieved through setting the
lineHeightto1. This extra context can help future maintainers and users understand the change at a glance.For example, you might update the entry as follows:
- - Disables link for navigation elements with children and fixes vertical alignment + - [FEN-192] Disables hyperlink functionality on navigation items with children and fixes vertical alignment (by setting lineHeight to 1)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/components/CHANGELOG.md(1 hunks)packages/components/modules/navigations/web/NavMini/NavSectionMini/NavList/NavItem/index.tsx(2 hunks)packages/components/modules/navigations/web/__shared__/NavSectionVertical/Group/NavList/NavItem/index.tsx(1 hunks)packages/components/package.json(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/components/package.json
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/components/modules/navigations/web/shared/NavSectionVertical/Group/NavList/NavItem/index.tsx
- packages/components/modules/navigations/web/NavMini/NavSectionMini/NavList/NavItem/index.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Component Test Packages



Currently, clicking on an item with children in the sidebar navigation (NavVertical) only expands/collapses the children. However, when the sidebar is minimized (NavMini), the children appear on hovering, but clicking on the item navigates to the corresponding page (which might not exist). This PR unifies this behavior, by no longer hyperlinking items in NavMini if they have children.
I also added the lineHeight: 1 as explained here: https://www.loom.com/share/5fa6bbbfde92484782a4986f7281a44f?sid=a3aae763-aa5a-428d-beb7-59ea63fe80ff I'm not exactly sure what is happening there, looks like the 24x24 svg image is rendered one or two pixels lower than its bounding span of height 24 when the lineHeight of the span is 1.5 (maybe the lineHeight is not distributed equally above and below!?)
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Style