fix(doc-page): restore deep-link scrolling and show AsciiDoc section anchor icons#484
Conversation
…anchor icons Two related fixes for the long-form workflow pages (brownfield, spec-driven-development, brownfield-experiment-report, etc.): 1. Deep links like /brownfield#phase-0-5-socratic-code-theory-recovery landed on the page but did not scroll to the section. The pre-rendered HTML has the section IDs, so the browser jumps there initially — but then the SPA boots, doc-page.js replaces #doc-content with a fresh "Loading..." shell, and the scroll target is destroyed. After the async fragment fetch completes, we now re-scroll to the URL hash. 2. Asciidoctor already emits <a class="anchor" href="#id"> before each heading (sectanchors:true is set in render-docs.js), but the link was invisible. Add the AsciiDoc-standard § symbol that fades in on heading hover, so readers can grab a link to any section. scroll-margin-top keeps the heading from disappearing behind the sticky header when the user follows such a link. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review WalkthroughDer PR erweitert die Dokumentationsseite mit Deep-Link-Navigationsunterstützung: Der geladene JavaScript-Code decodiert URL-Hash-Fragmente und scrollt die entsprechenden Überschriften nach dem Einfügen von Dokumentations-HTML in den Ansichtsbereich, während neue CSS-Regeln Anker mit konsistenten Scrollmargen und visuellen Hover-Effekten stylen. ChangesDeep-Link Navigation und Anker-Styling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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. Comment |
Summary
Two related fixes for the long-form workflow pages (brownfield, spec-driven-development, brownfield-experiment-report, etc.):
/brownfield#phase-0-5-socratic-code-theory-recoverylanded on the page but the SPA's "Loading…" shell destroyed the pre-rendered IDs before the async fragment fetch completed. After the fragment is injected we re-scroll towindow.location.hash.§anchor icon on hover. Asciidoctor already emits<a class="anchor">before each heading (we setsectanchors:true), but the link was invisible. Now it fades in on hover, matching the default Asciidoctor stylesheet.scroll-margin-topkeeps the target heading clear of the sticky header.Test plan
/brownfield#phase-0-5-socratic-code-theory-recoverydirectly → scrolls to the section<h2>/<h3>in/brownfield,/spec-driven-development,/brownfield-experiment-report→§icon appears, clicking it updates the URL hash and re-scrolls🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Fehlerbehebungen
Neue Funktionen