feat: Expandable full-title table of contents for browse pages#93
Merged
williamzujkowski merged 1 commit intomainfrom Mar 30, 2026
Merged
feat: Expandable full-title table of contents for browse pages#93williamzujkowski merged 1 commit intomainfrom
williamzujkowski merged 1 commit intomainfrom
Conversation
Replace simple chapter list with an expandable table of contents showing
every section within each chapter:
- HTML <details> elements for zero-JS progressive enhancement
- Expand/collapse individual chapters by clicking
- Expand all / Collapse all buttons for titles with 5+ chapters
- Small titles (≤10 chapters) auto-expand all chapters
- Section links go directly to /statute/{slug}/ detail page
- Chapter headings link to /browse/title-{n}/chapter-{n}/ (preserved)
- Status badges (Repealed, Reserved, Omitted, Transferred, Renumbered)
using frontmatter status field with title-based fallback
- Inactive sections dimmed (opacity-50) + italic
- Active/inactive section counts per chapter
- Section titles stripped of "Section N - " prefix for cleaner display
- Compact vertical spacing (py-1.5) for scannable lists
Consensus approved 3-0 (simple_majority).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 30, 2026
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
Transforms the title browse page from a simple chapter list into an expandable table of contents showing every section:
Before: Click Title → see chapter list → click Chapter → see section list → click Section
After: Click Title → see all chapters with expandable section lists → click Section directly
Features
<details>elements for zero-JS progressive enhancementDesign decisions
<details>over JS accordion — works without JavaScript, accessible, fastConsensus: Approved 3-0
Issues
Test plan
svelte-check— 0 errorspnpm test— all pass🤖 Generated with Claude Code