Repository navigation
fix(docs): scroll to hash after docs render - #3387
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Apply route hash after documentation HTML loads app/pages/package-docs/[...path].vue, test/e2e/docs.spec.ts |
The page watches for documentation HTML and replaces navigation with the route hash when the HTML and hash are available. The end-to-end test checks that #variable-stubConstant is in the viewport after hydration. |
Suggested reviewers: danielroe
Merge Risk: 
Minimal · up to 46047
-
The change retries hash navigation after documentation renders and adds direct-load coverage. No actionable blocker remains; merge after normal checks pass.
Pre-merge checks: 
4
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
🧭 Context
Follow-up to a CodeRabbit comment on #3386: opening a docs URL with a hash (e.g.
#class-Fooor a member anchor) stays at the top of the page.📚 Description
The docs HTML is fetched client-side, so on a direct load the router's
scrollBehaviorruns before the target element exists. Once the docs HTML has rendered, the page now navigates toroute.hashagain (same approach as the changelog pages), which re-runsscrollBehaviorwith the page'sscrollMargin. Added an e2e test that fails without this change.