Skip to content

feat(browser): config-driven component layout (card meta + detail sections) - #54

Merged
ronaldtse merged 1 commit into
mainfrom
feat/components-config
Jul 23, 2026
Merged

feat(browser): config-driven component layout (card meta + detail sections)#54
ronaldtse merged 1 commit into
mainfrom
feat/components-config

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

Implements the card / detail layout config that was filed as a design issue earlier today. Closes #53.

Added

components config block with three list-shaped fields, each backed by a closed Zod enum for typo safety:

  • components.meetingCard.metaItems — iterates in the configured order. Fully reorderable. Drop an item to hide it. Default: ['date', 'type', 'status', 'committee', 'count'].
  • components.meetingDetail.sections — visibility filter (includes() check). Source order preserved. Default: all 13 sections already on the page.
  • components.decisionDetail.sections — visibility filter. Default: all 8 sections already on the page.

Adding a new meta item type now means extending the MeetingCardMetaItem union + adding a renderer branch — OCP-friendly. The detail-page renderer wraps each section in a sectionVisible(key) check; full reorder for detail sections is tracked separately (would require extracting each section to its own component file).

Tests

  • New src/config/components.spec.ts — 6 tests covering: defaults match current order (backwards compat), partial override replaces wholesale, unknown values rejected (typo guard), empty lists allowed.
  • All existing 193 unit tests + 51 e2e tests still pass.

Docs

  • README §Config reference gains rows for the three new fields.
  • New §Component layout config with a worked example showing how to hide sections.
  • §Known limitations refreshed: now explains what components exposes vs. what's still deferred (full reorder, slot swaps, render hooks).

Test plan

  • pnpm -F @edoxen/browser typecheck — clean.
  • pnpm -F @edoxen/browser test — 199 passed (was 193; +6 new).
  • pnpm -F @edoxen/browser test:e2e — 51 passed (defaults preserve current behavior).

Closes

Closes #53.

Post-merge

Consumes the changeset; will release as @edoxen/browser@0.12.0 (minor — new public config surface).

…tions)

New components config block exposes visibility and order for three surfaces: meetingCard.metaItems (iterates — fully reorderable), meetingDetail.sections (visibility filter), decisionDetail.sections (visibility filter). Each list is backed by a closed Zod enum for typo safety; defaults preserve current behavior.

Adding a new meta item type now means extending the union + adding a renderer branch (OCP), not editing a growing conditional. The detail-page section reorder is tracked separately in #53 — needs each section extracted to its own component file.

199 unit tests (was 193; +6 new config spec) + 51 e2e green. README updated with config reference table + a layout-config section. Known limitations section refreshed.
@ronaldtse
ronaldtse merged commit cccfdf1 into main Jul 23, 2026
2 checks passed
@ronaldtse
ronaldtse deleted the feat/components-config branch July 23, 2026 07:14
ronaldtse added a commit that referenced this pull request Jul 23, 2026
Consumes the changeset from PR #54. Bumps @edoxen/browser 0.11.0 -> 0.12.0 (minor: new public components config surface).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design: card / detail layout customization config (deferred)

1 participant