Skip to content

fix: Resolve guideline dependency links#116

Draft
andmatei wants to merge 3 commits into
mainfrom
andmatei/fix-dependson-links-main
Draft

fix: Resolve guideline dependency links#116
andmatei wants to merge 3 commits into
mainfrom
andmatei/fix-dependson-links-main

Conversation

@andmatei

@andmatei andmatei commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add rendered guideline anchors and register them with Docusaurus broken-link tracking
  • route dependsOn links through Docusaurus Link so same-page anchors and cross-IPA links resolve under /ipa/
  • render dependency labels from the full guideline slug, including must/should/may
  • offset guideline anchors below the fixed navbar when opened from a dependency link

Validation

  • npm test
  • npm run docusaurus:build
  • git diff --check
  • served locally and checked same-page/cross-IPA dependency links

@andmatei andmatei force-pushed the andmatei/fix-dependson-links-main branch 3 times, most recently from 9a4a812 to b0ee1d4 Compare July 1, 2026 10:31
@andmatei andmatei force-pushed the andmatei/fix-dependson-links-main branch from b0ee1d4 to 5025101 Compare July 1, 2026 10:49
@andmatei andmatei changed the title Fix guideline dependency links fix: Resolve guideline dependency links Jul 1, 2026
andmatei added 2 commits July 1, 2026 17:55
- ipaNumber: guard against Number('') === 0 with `&& parsed > 0`
- depHref: apply same-page check in the bare-IPA branch to avoid
  unnecessary full-page navigation when depIpa === currentIpa
- depLabel: format bare IPA-NNN refs as "IPA 107" (space) to match
  the style of full guideline labels
- slugToTitle: remove dead `|| id` fallback (unreachable since
  depLabel guards with hasGuidelineAnchor before calling)
- vitest.setup.ts: return singleton from useBrokenLinks mock so
  collectAnchor is the same vi.fn() instance across calls
- Guideline.test.tsx: add test verifying collectAnchor registration
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.

1 participant