fix: navigation highlighting logic and update Wiki absolute URL#9
Merged
nschimme merged 2 commits intoMUME:masterfrom May 3, 2026
Conversation
- Refactored `isActive` logic in `Layout.vue` to ensure the "Community" navbar item is only highlighted (gold) on the home page. - Ensured "Open Source", "Links", and "Interviews" sections correctly highlight their parent navigation items when their respective pages or sub-pages are active. - Updated all MUME Wiki links to use the absolute path `https://docs.mume.org/wiki/`.
Contributor
Reviewer's GuideRefactors navbar route-activity detection into a reusable isActive helper to correctly control highlighting for the Community and its child menu items, and updates all Wiki links to point to the new https://docs.mume.org/wiki/ URL. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Build readyThe build for this PR has been completed successfully. A live preview will be available at: https://docs.mume.org/pr-9/ |
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
isActivehelper currently normalizes to.../and then usesstartsWith, which will also mark routes like/opensource-guides/as active for/opensource; consider adding a path-segment boundary check (e.g., usingnew URLor a regex) so only the intended section prefix matches. - The Wiki URL is hard-coded in multiple places (
Layout.vue,config.js, andindex.md); consider centralizing it in a single config or constant to avoid drift if it changes again.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `isActive` helper currently normalizes to `.../` and then uses `startsWith`, which will also mark routes like `/opensource-guides/` as active for `/opensource`; consider adding a path-segment boundary check (e.g., using `new URL` or a regex) so only the intended section prefix matches.
- The Wiki URL is hard-coded in multiple places (`Layout.vue`, `config.js`, and `index.md`); consider centralizing it in a single config or constant to avoid drift if it changes again.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
- Restricted 'Community' nav highlight to the home page only. - Ensured 'Open Source', 'Links', and 'Interviews' parents highlight when active. - Updated Wiki link to absolute path 'https://docs.mume.org/wiki/'. - Added 'target="_self"' and 'rel="external"' to Wiki links to ensure they open in the same tab and prevent VitePress router interference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
isActivelogic inLayout.vueto ensure the "Community" navbar item is only highlighted (gold) on the home page.https://docs.mume.org/wiki/.Summary by Sourcery
Adjust navigation active-state logic and update external Wiki URLs to the new docs host.
Bug Fixes:
Enhancements:
Documentation: