ZDDC/shared
ZDDC 677ac01b32 refactor(shared): consolidate empty-state into shared chrome (BEM)
Three tools (archive, browse, classifier) independently implemented
an empty-state pattern with three different CSS class naming
conventions and slightly different rules:

  archive:    .empty-state + .empty-state-content (BEM-less)
  browse:     .empty-state + .empty-state__inner  (BEM)
  classifier: .empty-state + .empty-state-content (BEM-less)

Same visual intent ("nothing's loaded yet — here's a welcome card
with instructions"), implemented three times with subtly different
spacing, no shared body styling for h2/p/ul/li, and incompatible
class names that prevented a future tool from copy-pasting the
pattern.

Promote a single consolidated rule set to shared/base.css using
BEM naming throughout:

  .empty-state                       — base (flex centered, padding)
  .empty-state--overlay              — modifier: position absolute,
                                        top 50px to clear app-header,
                                        z-index 10. Used by archive
                                        and classifier (their empty
                                        states sit OVER the main
                                        layout).
  .empty-state__inner                — content card (left-aligned,
                                        text-muted, max-width 640)
  .empty-state__inner--centered      — modifier: tighter max-width
                                        500, centered text, 2rem
                                        padding. Used by tools whose
                                        welcome screen reads as a
                                        centered card.
  .empty-state__inner h2/p/ul/ol/li  — typography defaults
  .empty-state__inner .note          — italic small-print
  .welcome-list                      — bullet list with left-aligned
                                        text + auto margins; safe to
                                        nest inside a centered card.

Per-tool changes:

  - archive/template.html, archive/js/app.js: rename
    .empty-state-content → .empty-state__inner empty-state__inner--centered;
    add .empty-state--overlay to the outer .empty-state container.
    Also the runtime-injected unsupported-browser markup in
    showUnsupportedBrowserMessage() and the showHttpErrorState
    selector.
  - classifier/template.html: same renames.
  - archive/css/layout.css + components.css: delete .empty-state*
    and .welcome-list rules (now in shared).
  - classifier/css/layout.css: same. Keep .empty-state.drag-over
    locally — classifier is the only tool whose empty state acts
    as a drop target.
  - browse/css/base.css: delete .empty-state* (shared covers it).
    browse's template was already using .empty-state__inner so no
    template change needed.

LOC: shared/base.css gains ~70 lines; per-tool overrides lose ~85
combined. Net -15. More importantly, future tools can reuse the
pattern by adding two divs and (optionally) the --centered or
--overlay modifiers; no copy-paste required.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 14:21:07 -05:00
..
vendor feat(tables): new sortable/filterable grid tool for directories of YAML files 2026-05-05 20:32:01 -05:00
base.css refactor(shared): consolidate empty-state into shared chrome (BEM) 2026-05-10 14:21:07 -05:00
build-lib.sh build(channels): correct wordlist path for tool-side build invocations 2026-05-07 12:12:46 -05:00
build-words.txt build(channels): swap source-SHA in beta label for a three-word slug 2026-05-07 12:11:23 -05:00
favicon.svg feat(tools,build): in-flight HTML-tool reworks and build-infra updates 2026-04-29 12:52:27 -05:00
hash.js Initial commit 2026-04-27 11:05:47 -05:00
help.js Initial commit 2026-04-27 11:05:47 -05:00
logo.css feat(shared): clickable logo links every tool's header to project home 2026-05-10 07:34:28 -05:00
logo.js feat(shared): clickable logo links every tool's header to project home 2026-05-10 07:34:28 -05:00
nav.css feat(shared): lateral project-stage strip in every tool's header 2026-05-09 19:50:30 -05:00
nav.js style(nav): mount stage strip above the header instead of below 2026-05-09 20:27:23 -05:00
preview-lib.js feat(html): TIFF and ZIP listing previews + favicon in app headers 2026-05-01 15:23:26 -05:00
theme.js Initial commit 2026-04-27 11:05:47 -05:00
toast.css feat(shared): non-blocking toast helper available to every tool 2026-05-09 19:04:41 -05:00
toast.js feat(shared): non-blocking toast helper available to every tool 2026-05-09 19:04:41 -05:00
zddc-filter-test.html Initial commit 2026-04-27 11:05:47 -05:00
zddc-filter.js Initial commit 2026-04-27 11:05:47 -05:00
zddc-source.js feat(zddc-server): reviewing/ virtual aggregator + mdedit at the URL 2026-05-09 21:37:08 -05:00
zddc-test.html Initial commit 2026-04-27 11:05:47 -05:00
zddc.js Initial commit 2026-04-27 11:05:47 -05:00