Skip to content

fix: Resolve guideline dependency links#116

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

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

Jira: CLOUDP-416863

Summary

Fixed the links for the guidelines in dependsOn. Now clicking the links navigates to the referenced guideline / principle

Validation

  • npm test
  • npm run docusaurus:build
  • tested locally that the links navigate to the referenced guidelins / principles

@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
@andmatei andmatei marked this pull request as ready for review July 2, 2026 09:00
@andmatei andmatei requested a review from a team as a code owner July 2, 2026 09:00

@yelizhenden-mdb yelizhenden-mdb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding: From now on, all the guidelines are linkable via their ids. Clicking a dependsOn link scrolls the referenced guideline into view.

How about indicating which guideline you landed on? When navigating to a guideline via a dependsOn link, the target guideline would be highlighted on arrival, then fade out, so the user can immediately understand to where they jumped. wdyt?

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.

2 participants