Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
Co-authored-by: SoonIter <79413249+SoonIter@users.noreply.github.com>
Rsdoctor Bundle Diff Analysis📁 webPath:
📦 Download Diff Report: web Bundle Diff Generated by Rsdoctor GitHub Action |
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where active language and version entries in the mobile navigation menu could be clicked, causing unnecessary navigation to the same page. The fix renders active entries as non-interactive span elements with appropriate styling while maintaining the clickable Link elements for other options.
- Conditionally renders active items as
<span>elements instead of<Link>components - Adds disabled styling (dimmed text, default cursor, no pointer events) for active entries
- Implements semantic
aria-current="page"attribute to indicate the current selection
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| NavScreenVersions.tsx | Added logic to detect active version and render it as a non-clickable span with aria attributes |
| NavScreenVersions.scss | Added styles for active version items including dimmed text color and disabled pointer events |
| NavScreenLangs.tsx | Added logic to detect active language and render it as a non-clickable span with aria attributes |
| NavScreenLangs.scss | Added styles for active language items including dimmed text color and disabled pointer events |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
NavScreen language and version menus allowed the active entry to be clicked, causing pointless navigation. Active items now render as non-interactive elements with disabled styling while keeping other options clickable.
aria-current="page"andaria-disabled.ariaattributes for active entries.Example:
Related Issue
Checklist
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.