-
Notifications
You must be signed in to change notification settings - Fork 134
chore: fix active active page in router #2762
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughA new utility function, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NavigationComponent
participant normalizePath
User->>NavigationComponent: Navigates to a page
NavigationComponent->>normalizePath: Normalize current pathname
NavigationComponent->>normalizePath: Normalize link/page href
normalizePath-->>NavigationComponent: Normalized paths
NavigationComponent->>NavigationComponent: Compare normalized paths
NavigationComponent-->>User: Render active state if match
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Graph Analysis (2)site/src/components/ActiveLink.tsx (2)
site/src/components/CollapsibleSidebarItem.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Claude finished @NathanFlurry's task —— View job Pull Request Review ✅Todo List:
Purpose of Changes: Review Feedback✅ Code Quality and Best Practices
|
Merge activity
|
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved consistency in detecting active navigation links and sidebar items by normalizing URL paths, ensuring more reliable highlighting of the current page. * **Bug Fixes** * Resolved issues where navigation or sidebar items might not appear active due to minor differences in URL formatting. <!-- end of auto-generated comment: release notes by coderabbit.ai -->

Changes
Summary by CodeRabbit