diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-09 05:11:51 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-09 05:11:51 -0500 |
| commit | 62b53bc520c9fc6bcf372a6a6ea805c4ebf29595 (patch) | |
| tree | c0dad45c5394f417574cab9ee778ac7c7f322222 /scripts/theme-studio/build-theme.el | |
| parent | 06595262c702f2d2e51ec70f9c86fa1cc9a433ac (diff) | |
| download | dotemacs-62b53bc520c9fc6bcf372a6a6ea805c4ebf29595.tar.gz dotemacs-62b53bc520c9fc6bcf372a6a6ea805c4ebf29595.zip | |
refactor(theme-studio): extract crHtml and mkStyleButtons table helpers
Three tables repeated two scaffolds. The contrast-cell readout (a WCAG ratio colored by its AA/AAA rating, plus the rating word) was copy-pasted at five sites; pulled the shared formatting into crHtml(r) and called it from the syntax, UI, and package cells (the picker readout renders differently and stays as is). The B/I/U/S style-button loop was duplicated near-verbatim in the UI and package tables; pulled it into mkStyleButtons(isOn, onToggle), which returns the button list so the caller still hands them to mkLockCell.
Left the syntax table's bold/italic buttons alone — two buttons, a different state model (the BOLD/ITALIC dicts), and an in-place refresh closure make it a poor fit for the same helper. Didn't introduce a shared row scaffold either; the three tables differ enough in columns and order that one would leak.
Behavior-preserving: the runtime-rendered tables are byte-identical to before (a DOM dump diff shows only the inline-script source changing, never a built tr/td/button/span). All hash gates, the node suite, and #locktest stay green.
Diffstat (limited to 'scripts/theme-studio/build-theme.el')
0 files changed, 0 insertions, 0 deletions
