WEBDEV-8927: Add a focus mode to the elements demo - #76
Open
jbuckner wants to merge 1 commit into
Open
Conversation
The demo rendered every story on one page, so there was no way to look at a single element and every component was instantiated at page load. Drive the view off the URL hash instead. #elem-<tag> shows just that element, no hash keeps the full listing, and the sidebar switches the focused element rather than scrolling to it. Story modules are globbed lazily, so a deep link only fetches that element's chunk. Hash routing rather than the History API because the demo ships to GitHub Pages under a base path it doesn't know at build time, with no server-side rewrites, so a real path would 404 on reload and on shared links. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEWomUzGqJ8SazBDMrZEti
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #76 +/- ##
==========================================
+ Coverage 78.62% 80.98% +2.36%
==========================================
Files 17 26 +9
Lines 697 915 +218
Branches 189 221 +32
==========================================
+ Hits 548 741 +193
- Misses 100 113 +13
- Partials 49 61 +12 ☔ View full report in Codecov by Harness. 🚀 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.
The demo showed every element on one page. Now
#elem-<tag>shows just that one, the sidebar switches the focused element instead of scrolling to it, and "All elements" goes back to the full list. Story modules load lazily, so a deep link only fetches that element's chunk.Hash routing because the demo ships to GH Pages under a base path it doesn't know at build time, so a real path would 404 on reload.
WEBDEV-8927: https://webarchive.jira.com/browse/WEBDEV-8927
🤖 Generated with Claude Code
https://claude.ai/code/session_01QEWomUzGqJ8SazBDMrZEti