Skip to content

fix: keep top-level dashboard nav highlighted on nested routes (#220) - #302

Closed
tdlxgpp wants to merge 1 commit into
MergeFi:mainfrom
tdlxgpp:fix/active-nav-highlight-220
Closed

fix: keep top-level dashboard nav highlighted on nested routes (#220)#302
tdlxgpp wants to merge 1 commit into
MergeFi:mainfrom
tdlxgpp:fix/active-nav-highlight-220

Conversation

@tdlxgpp

@tdlxgpp tdlxgpp commented Aug 23, 2026

Copy link
Copy Markdown

Fixes #220

Changes

  • Added isNavItemActive(pathname, href) in DashboardShell.tsx.
  • Dashboard overview links (/dashboard/*) keep exact matching.
  • Top-level sections (/issues, /milestones) stay highlighted on nested child routes such as /issues/abc123.
  • Added focused unit tests covering exact routes, nested routes, unrelated sections, and dashboard exact matching.

Verification

  • npm test -- --runInBand: 12 suites / 105 tests passed.
  • npm run lint: passed.
  • NEXT_PUBLIC_API_URL=http://localhost:4000/api NEXT_PUBLIC_STELLAR_NETWORK=TESTNET npm run build: passed.
  • Working tree only contains the source change and new test file.

AI Usage

  • Yes, used AI assistance.
  • I reviewed every line and understand the purpose of the helper and tests.
  • The change is kept to the shared dashboard shell only; no global or out-of-scope modifications.

@vercel

vercel Bot commented Aug 23, 2026

Copy link
Copy Markdown

@tdlxgpp is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@tdlxgpp

tdlxgpp commented Aug 24, 2026

Copy link
Copy Markdown
Author

Hi @chonilius, I opened this PR for #220. The Vercel deployment check is waiting for a member of the Vercel team to authorize it. Could you authorize it when you have a moment? Happy to make any changes after review.

@tdlxgpp

tdlxgpp commented Aug 25, 2026

Copy link
Copy Markdown
Author

恭喜 @miraclesonly,PR #323 已合并并完成 #220。我这边较早提交的 PR #302 现在让位关闭,不占用维护者 review 资源。祝项目顺利!

@tdlxgpp tdlxgpp closed this Aug 25, 2026
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.

DashboardShell's active-nav-item highlighting uses exact pathname equality, so nested routes never highlight their parent section

1 participant