Skip to content

feat(settings): collapse settings sections and rework the footer editor - #143

Merged
ssavutu merged 1 commit into
mainfrom
feat/settings-collapsible-sections
Aug 1, 2026
Merged

feat(settings): collapse settings sections and rework the footer editor#143
ssavutu merged 1 commit into
mainfrom
feat/settings-collapsible-sections

Conversation

@ssavutu

@ssavutu ssavutu commented Aug 1, 2026

Copy link
Copy Markdown
Member

What

The settings screen had grown to six full-height cards stacked end to end — about 9,200px of page. The footer menu was most of it: 6 columns × ~8 entries rendered as one long vertical list of ~48 identical wrapping form rows.

Collapsed, the page is now ~1,250px and fits on one screen.

Collapsible sections

New SettingsSection wraps every group (Site, Homepage Carousel, Breaking News, Footer Menu, Taxonomy, Media Library). The profile card is left alone — it's identity, not a setting.

  • Collapsed by default, with open state remembered per section in localStorage.
  • Collapsed rows stay informative via a right-aligned summary — The Triangle, 2 slides, Enabled, 6 columns, and Reindexing… / Rebuilding… while those jobs run. Descriptions render only when expanded.
  • An Unsaved chip appears in the header when a section is dirty and stays visible while collapsed, so collapsing can't hide pending edits.
  • Bodies are hidden with CSS rather than unmounted: sections own fetched state and in-progress edits that a remount would refetch and discard.

Add Slide moved from the carousel header into the body, since it can't nest inside the header's toggle button.

Footer menu editor

Columns now lay out in a responsive grid mirroring the footer they produce, instead of stacking. Per entry, the label sits above the href; headings render semibold and spacers draw a dashed "Blank line" rule. A segmented heading/link/spacer picker replaces the per-row <select>, and move/delete controls are revealed on hover or focus. The new-tab toggle stays visible while enabled so it's legible at a glance.

Testing

tsc --noEmit and eslint clean. Driven in a browser against the real default footer (6 columns / 48 entries) with the settings endpoints stubbed, since the page is behind OIDC:

  • Expand/collapse, dirty chip appears on edit and persists while collapsed, edits survive a collapse/expand cycle, open state survives a reload.
  • Footer save round-trips: moving an entry down and saving returned About, Contact Us, Staff, Join The Triangle.
  • Tab order is Sign out plus the six headers — nothing reachable inside a collapsed body.
  • No console errors.

Caught this way and fixed: the first version used the hidden attribute alone, which Tailwind's flex class overrode, leaving every section fully expanded under a collapsed chevron.

Note

tailwind.config.js sets darkMode: ["class"], but there is no .dark variable block in src/index.css and nothing toggles the class — dark mode is unused boilerplate, so this was designed light-only.

🤖 Generated with Claude Code

The settings screen had grown to six full-height cards stacked end to end
(~9,200px), and the footer menu was most of it: 6 columns x ~8 entries
rendered as one vertical list of ~48 identical wrapping form rows.

Add SettingsSection, a collapsible card used by every group. Sections
collapse to a single row, remember their open state in localStorage, and
show a summary ("6 columns", "Enabled") plus an "Unsaved" chip so
collapsing cannot hide pending edits. Bodies are hidden with CSS rather
than unmounted, since sections own fetched state and in-progress edits
that a remount would discard.

Lay the footer editor out as a grid mirroring the footer it produces,
with label above href per entry, a segmented heading/link/spacer picker
replacing the per-row select, and move/delete controls revealed on hover
or focus.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ssavutu
ssavutu merged commit 8ef4f3a into main Aug 1, 2026
6 checks passed
@ssavutu
ssavutu deleted the feat/settings-collapsible-sections branch August 1, 2026 22:06
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.

1 participant