fix: dedup heading-anchor IDs and add controls to reduced-motion demo videos#245
Merged
Conversation
… videos Two review-page / marketing fixes: - document-renderer.js: the heading_open renderer set id=slug with no de-duplication, so a doc with two headings slugifying to the same value emitted duplicate ids and anchor clicks (hashchange nav and the in-page heading_close link) always scrolled to the first match. Port crit local's GitHub-style dedup (baseSlug, baseSlug-1, …) via a counter on the md instance, reset once per buildLineBlocks render so it doesn't leak across re-renders. IDs now match crit local exactly. - home.html.heex: the homepage mode-grid demo videos had only data-lazy-src (no src) and no controls; under prefers-reduced-motion app.js skips loading them, leaving a poster with no way to play. Add controls to match the hero and mode-page videos. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #245 +/- ##
=======================================
Coverage 82.42% 82.42%
=======================================
Files 89 89
Lines 3089 3089
=======================================
Hits 2546 2546
Misses 543 543
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two review-page / marketing fixes found in the pre-release audit of v0.9.0..main:
document-renderer.jsheading_opensetid=slugwith no de-duplication, so a doc with two headings slugifying to the same value emitted duplicateids and anchor clicks (hashchange nav and the in-pageheading_closelink) always scrolled to the first match. Ports crit local's GitHub-style dedup (baseSlug,baseSlug-1, …) via a counter on themdinstance, reset once perbuildLineBlocksrender so it doesn't leak across re-renders. IDs now match crit local exactly (parity contract).data-lazy-src(nosrc) and nocontrols; underprefers-reduced-motionapp.jsskips loading them, leaving a poster with no way to play. Addscontrolsto match the hero and mode-page videos.Review
parseMarkdownclear)Test plan
mix precommit: 1015 tests, 0 failures🤖 Generated with Claude Code