aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio
Commit message (Collapse)AuthorAgeFilesLines
* refactor(theme-studio): cut the face model over to weight/slant/objectsCraig Jennings29 hours9-163/+345
| | | | | | | | | | I replaced the legacy bold/italic/underline/strike booleans with the final model shape across both sides of the tool. weight (light/normal/medium/semibold/bold/heavy) and slant (normal/italic/oblique) replace the bold/italic flags, underline becomes {style: line|wave, color}, strike becomes {color}, and null means unset. A single migration converts a legacy face on the way in, mirrored as migrateLegacyFace in app-core.js and migrate_legacy in face_specs.py so the JS and Python models can't drift. It runs on import (applyImported, mergePackagesInto) and on every seed that face_spec touches. The captured-snapshot seed (default_faces.seed) narrows the same way it did before. Only bold and italic survive, as weight "bold" and slant "italic", so the generated themes stay byte-identical. The B/I/U/S toggle buttons keep working through a transitional bridge (legacyStyleOn / toggleLegacyStyle). The weight/slant dropdowns and underline/strike controls that replace them land next. The live previews read the new shape, with a weight name mapped to a numeric CSS font-weight. The cutover is proven emit-neutral two ways. An ERT test asserts the migrated shapes emit the same attributes as the legacy booleans, and deep-migrating every face in dupre, distinguished, sterling, now, theme, and WIP then running build-theme yields byte-identical output. Full suite green: Python 59, Node 200, ERT 41, plus the browser hash gates.
* feat(theme-studio): widen the face model with the additive attributesCraig Jennings29 hours6-23/+96
| | | | | | | | | | This is Phase 2 of the face-attribute expansion. The model now carries distant-fg, family, overline, inverse, and extend in final shape across all three tiers, and inherit and height are no longer package-only (a ui or syntax face can set them too). I kept bold/italic/underline/strike as the legacy booleans for now. The cutover to weight/slant and the underline/strike object forms lands in the next phase with the editor widgets that force it, so the representation and the controls that drive it move together. face_specs.py holds the canonical defaults. In app-core.js, normalizePkgFace and packagesForExport carry and emit the new attrs: distant-fg resolves through the palette like fg/bg, and each attr exports only when set, so existing presets re-export unchanged. app.js syntaxBlank, uiFaceBlank, and seedFace match the shape. Nothing changed shape, so dupre, distinguished, sterling, now, theme, and WIP all emit byte-identical themes. make check green: Python 58, Node 193, ERT 40.
* feat(theme-studio): emit the full face-attribute model from build-themeCraig Jennings30 hours2-60/+98
| | | | | | | | I extended build-theme's emitter to the full attribute set: family, distant-foreground, a weight and slant range, structured underline (color and wave), overline, strike color, inverse-video, extend, and inherit/height on every tier. It still reads the legacy boolean bold/italic/underline/strike fields, so every committed preset round-trips unchanged. The emitter is the first piece of widening the studio to all face attributes; the model and UI that produce these fields come next. To keep the change clean I refactored --attrs from nine positional arguments to a single face-spec object and lifted the accessor helpers above their callers. Added 40 ERT tests covering legacy compatibility, each new attribute, the coercion helpers' edge cases, and an end-to-end round-trip that loads a theme and reads the attributes back off the faces. They run in the theme-studio suite as a new stage.
* chore(theme-studio): update WIP theme region, mode-line-highlight, pearl facesCraig Jennings30 hours1-17/+18
|
* feat(theme-studio): bucket unrecognized faces by their defface sourceCraig Jennings30 hours1-3/+29
| | | | A newly-loaded package (or a new built-in face) used to fall into emacs-core because grouping is by name-prefix and an unknown prefix matched nothing. Now the fallback routes by where the defface lives: an elpa face becomes its own package bucket, a built-in face a new emacs-general child. So loading a package and running make face-coverage surfaces it as a fresh TODO bucket instead of an orphan in core. Recognized faces still match their family first, and faces.el/frame.el faces stay in emacs-core.
* feat(theme-studio): add reproducible face-coverage generator and diffCraig Jennings30 hours4-3/+408
| | | | | | face-coverage.org was rebuilt by a throwaway /tmp script each time. This makes it reproducible: face-coverage-dump.el dumps every face's name, docstring, and defface file from the live daemon (plus all group docs and package summaries), and face_coverage.py turns that into the tiered worklist (emacs-core / emacs-general / per-package), classifying each face by where its defface lives. make face-coverage regenerates the file; make face-coverage-diff reports the coverage delta against the committed copy. The dump binds coding-system-for-write so writing the docstring JSON never drops into the interactive coding-system prompt. I validated the builder by regenerating and diffing against the hand-built worklist: headings identical, only the intro and one sharper description differ.
* docs(theme-studio): add package and subsystem descriptions to face coverageCraig Jennings31 hours1-0/+109
| | | | I added a one-line description under each package and subsystem heading, pulled from its Emacs customization-group docstring or elpa package summary, with a parent-group fallback for sub-buckets. 109 of 120 buckets resolved; the rest are single-face buckets the face's own docstring already covers.
* docs(theme-studio): drain emacs-core orphans into subsystem and package bucketsCraig Jennings31 hours1-64/+76
| | | | I added the missing buckets so every built-in subsystem face and package face leaves emacs-core. abbrev and which-func became emacs-general subsystems; git-gutter, git-commit, twentyfortyeight (2048-game), yasnippet, and edit-indirect became their own package headings. The orphans that were genuinely core (mode-line-active, the tty-menu faces, the line-number tick faces, fixed-pitch-serif) joined the core set. emacs-core is now 74 faces with no orphans left.
* docs(theme-studio): regroup face coverage into core/general/package tiersCraig Jennings31 hours1-1385/+1325
| | | | I regrouped the worklist into three top-level tiers: emacs-core (the standalone built-in faces), emacs-general (built-in subsystems like org, gnus, erc, diff, and vc, each a nested child), and one heading per third-party elpa package. The tier comes from where each face's defface lives, queried from the running Emacs: /usr/share/emacs is built-in, elpa is a package.
* docs(theme-studio): annotate face coverage list with docstringsCraig Jennings31 hours1-4/+1134
| | | | I added each face's Emacs docstring (first line) as the line beneath it, so the worklist reads as what every face is actually for. 1129 of 1293 faces carry one.
* docs(theme-studio): add face coverage master listCraig Jennings31 hours1-0/+1523
| | | | | | I added a hierarchical worklist of every known face: the live Emacs face-list unioned with everything the studio manages, grouped by package. Each face is marked DONE where the studio themes it, TODO where it doesn't, and each group is DONE, DOING, or TODO by how much of it is covered. 690 of 1293 faces are covered today. The gaps are mostly org, gnus, erc, custom, diff, and the built-in subsystems the package inventory doesn't reach yet.
* feat(theme-studio): add mode-line-highlight as an editable faceCraig Jennings31 hours4-10/+42
| | | | | | | | The mode-line hover box (the raised bevel on clickable mode-line segments) came from mode-line-highlight, a face the studio never managed, so it fell through to Emacs's stock released-button default with no way to change it. I added it to the generated UI face list, between mode-line and mode-line-inactive. The row and box control are already generic over that list, so they appear automatically. build-theme.el's UI emission is generic too, so the elisp side needs nothing. The face isn't in the captured Emacs snapshot, so apply_hover_box_default seeds its box to the raised default in both build_uimap branches. That matches current behavior and leaves the user free to flatten or recolor it. The mock frame previews the hover by wrapping a mode-line segment in the face.
* chore(theme-studio): track WIP.json instead of ignoring itCraig Jennings36 hours1-0/+11919
|
* wip(theme): snapshot WIP theme and daneel palette draftCraig Jennings3 days1-0/+67
|
* fix(theme-studio): open the palette collapsed to base colorsCraig Jennings4 days3-0/+24
| | | | The studio opened with every column's span tints expanded, so the first view was crowded with colors the user hadn't asked to see. I set paletteShowFull to false in initApp, so the palette opens showing one tile per column and the existing arrow control expands the spans. The flip lives in the boot path rather than the module default, so the palette gates keep their full-palette baseline. The two that assert span tiles (#counttest, #paltoggletest) now opt into full mode explicitly. A new #paldefaulttest gate asserts the opening collapsed state.
* fix(theme-studio): make the color picker stand out from the pageCraig Jennings4 days3-2/+32
| | | | The picker panel's background (#161412) sat a few shades off the page background (#0d0b0a), so it was hard to tell apart from the page. I gave it the studio's gold accent border (#e8bd30) and lifted the background to #1f1c19, both already used in the toolbar chrome, so the panel reads as a distinct surface. The #pickertest gate asserts the accent border and a per-channel background lift of at least 12 over the page, so the distinction can't quietly regress.
* feat(theme-studio): add gnus as a view packageCraig Jennings4 days6-3/+105
| | | | mu4e renders the open message with gnus, so the article-view headers, quote levels, signature, and inline emphasis are all gnus faces, not mu4e ones. gnus ships them as bright greens on a dark background, and the theme had no way to reach them. I added gnus as a bespoke view package: the article-view face set in face_data.py with palette seeds that mirror the mu4e header treatment, a realistic preview (header block, emphasized body, an 11-level quoted reply chain, signature), and a #gnustest gate that asserts every emitted face is a real gnus face. Theming and exporting gnus in the studio retires the green in the live view.
* fix(theme-studio): redesign the mu4e preview as a realistic headers listCraig Jennings4 days3-30/+76
| | | | The old mu4e preview was cramped and referenced faces that aren't in the mu4e inventory (mu4e-moved-face, mu4e-attach-number-face, mu4e-cited-1..7, mu4e-compose-header-face), so those rendered unthemed. I rebuilt it as a realistic mu4e screen: a status bar, a column header, and one row per message state (unread, replied, flagged, forwarded, draft, trashed, related) with the current line on the highlight background, then a compact message view and the compose separator. It now exercises all 27 mu4e inventory faces and only those. The new #mupreviewtest gate asserts every data-face is a real mu4e face.
* feat(theme-studio): realistic README preview for markdown-modeCraig Jennings4 days4-4/+123
| | | | markdown-mode fell back to the generic preview (bare face names). I added renderMarkdownPreview, a realistic README that exercises the markdown faces in context: front matter, headers, bold/italic, inline and fenced code, links, lists and checkboxes, a blockquote with a footnote, a table, strikethrough, highlight, math, and inline HTML. A PREVIEW_KEYS map in app_inventory routes markdown-mode to the renderer, and the #mdtest gate checks every data-face it emits is a real markdown face.
* fix(theme-studio): scope the view-nav arrow style under .pkgbarCraig Jennings4 days2-6/+8
| | | | The generic .pkgbar button rule outweighed my .viewnav rule on specificity, so the arrows rendered at default button size. Scoping the rule under .pkgbar wins the cascade and restores the compact arrow size.
* feat(theme-studio): prev/next arrows to step the view dropdownCraig Jennings4 days7-4/+91
| | | | I added left and right arrow buttons flanking the view dropdown. They step the selection to the previous or next item and re-render the faces table and preview, so you can walk the list without reopening the dropdown. A pure stepViewIndex helper clamps the index to the option range, no wrap. stepView sets the selection and calls onViewChange.
* feat(theme-studio): move the contrast verdict into a hoverCraig Jennings4 days5-4/+71
| | | | The contrast column showed "5.4 PASS". The number's color already encodes the tier (green AAA, grey AA, red fail), so the PASS/FAIL word was redundant. I dropped it and put the WCAG meaning in the cell's hover via a pure contrastTitle helper. crHtml now renders just the colored number. verdictFor stays for the covered-overlay worst-case readout, which is unchanged.
* feat(theme-studio): mark per-face setting boxes that differ from defaultCraig Jennings4 days6-4/+140
| | | | A non-default height looks identical to the default in the size input, so a stray 1.1 hides in plain sight. I added a small gold corner flag on any per-face setting cell (fg, bg, style, inherit, size, box) whose value differs from the face's seed default. A pure faceBoxNonDefaults helper computes the per-box flags. buildPkgTable resolves fg/bg to hex before comparing, so a palette-name-vs-hex difference doesn't read as a change.
* feat(theme-studio): alphabetize packages in the assignment dropdownCraig Jennings4 days5-14/+57
| | | | The assignment-view dropdown listed package faces in APPS build order (bespoke apps first, then inventory). generate.py builds them that way, so the list wasn't alphabetical. I added a pure appViewKeysSorted helper that orders the app keys by display label, and buildViewSel uses it. The @code and @ui editor entries above the divider are unchanged.
* refactor(theme-studio): drop the too-similar-colors warning boxCraig Jennings4 days5-56/+6
| | | | The warning box under the palette wasn't useful there; the same ΔE info is reachable per-chip via the nearest-ΔE tooltip and inline contrast. Remove renderPaletteWarnings, the #palwarn element, its CSS, and the #deltatest gate. paletteWarnings still runs for the per-chip nearest distance.
* refactor(theme-studio): extract a groundPair() helperCraig Jennings4 days4-68/+76
| | | | The literal {bg:MAP['bg'],fg:MAP['p']} repeated 32 times across app.js, palette-actions.js, and the browser gates. Replace it with a groundPair() helper. Named groundPair, not ground, to avoid colliding with the local ground bindings destructured from columnsFromPalette. No behavior change; node tests and browser gates are the safety net.
* feat(theme-studio): 2D gallery color picker for the assignment dropdownsCraig Jennings4 days6-33/+234
| | | | | | | | | | - The color dropdown opens a grid, not a long list. - The grid mirrors the palette: ground strip, then a row per family. - Members run dark to light, with the current color outlined. - A default chip clears the assignment. - A (gone) cell shows a color no longer in the palette. - The trigger and step buttons stay the same. - All three tiers share the one dropdown.
* feat(theme-studio): show view-area > element usages on palette tile hoverCraig Jennings4 days5-8/+106
| | | | I added paletteUsages, which enumerates every place a color is assigned, grouped by view area (the view dropdown's names: color/code assignments, ui faces, each package app) and the element within it. renderPalette builds the per-area scopes once and appends the list to each used tile's hover title, under the existing name/hex/nearest-deltaE line. Node tests and a #usagetest gate cover it.
* style(theme-studio): thin the barber-pole flag borderCraig Jennings4 days2-6/+6
|
* style(theme-studio): make the unused and gone flags a two-color barber-pole ↵Craig Jennings4 days2-6/+20
| | | | | | border The single-color dashed outline blended in. I replaced it with a ring of two alternating contrasting colors, drawn as a masked repeating gradient so it overlays without shifting layout. Unused tiles and columns use gold and black; gone assignments use red and white, keeping the two states distinct at a glance.
* feat(theme-studio): flag gone color assignments with a borderCraig Jennings4 days4-2/+38
| | | | An assignment pointing at a color no longer in the palette showed only as "(gone)" on hover. I added a distinct solid border to the swatch whenever its current value resolves to "(gone)", so a broken assignment reads at a glance. The solid red outline is set apart from the dashed unused-tile flag, keeping the two palette-state cues distinguishable. A #gonetest gate covers the flagged and unflagged cases.
* feat(theme-studio): flag unused palette tiles and columnsCraig Jennings4 days6-8/+105
| | | | | | I added usedPaletteHexes, a reverse lookup over the syntax, ui, and package assignments (plus the ground endpoints) that resolves each reference to a hex. renderPalette outlines a tile whose color is referenced nowhere and outlines a whole column when none of its colors are used, so dead colors stand out for pruning before a theme ships. The check is biased safe: an unresolvable reference marks nothing, so a color that is actually used is never flagged. Node tests cover the lookup. A #unusedtest gate covers the tile and column flags.
* feat(theme-studio): add a palette display toggle for base colors vs full spansCraig Jennings4 days4-4/+62
| | | | I added an arrow control to the palette that collapses every column to its base color (right arrow) or expands to the full spans (down arrow), to conserve vertical space. Ground steps collapse too, leaving bg and fg. A #paltoggletest gate covers the collapse and the expand.
* refactor(theme-studio): rename preview samples and match cluster button sizesCraig Jennings4 days3-14/+14
| | | | | | I renamed the preview personas to Christine (was Alice) and Evan (was Eve), trimming the mu4e header spacing so those rows stay aligned. I shrank the style cluster buttons from 26x24 to the 17x15 box-button size, so the two clusters match and the assignment row returns to roughly its pre-cluster height.
* fix(theme-studio): clamp generated palette spans to the bg/fg boundsCraig Jennings4 days5-20/+67
| | | | | | Spanning a color generated steps toward pure black and white, so a column could produce colors darker than bg or lighter than fg. I changed regenColumn to ramp the dark side toward the darker ground endpoint and the light side toward the lighter one, bounded by bg and fg. Pure black/white duplicates are still skipped, and callers that pass no ground fall back to the old black/white ramp. Node tests cover the bounded span and the no-ground fallback. The #counttest gate asserts the regenerated column stays within the bg/fg bounds.
* refactor(theme-studio): drop dead bindings and CSS left by the cluster workCraig Jennings4 days4-8/+6
|
* feat(theme-studio): reflow the B/I/U/S style buttons into a 2x2 clusterCraig Jennings4 days4-6/+30
| | | | | | The four style buttons sat in a horizontal row, the widest part of the style column. I wrapped them in the same 2x2 grid the box control uses, so they form a square (still multi-toggle, since bold and italic combine). The column narrows to roughly half its width across all three tiers. A #styletest gate confirms the four buttons live in a .stylecluster.
* feat(theme-studio): compact the box control into a 2x2 button clusterCraig Jennings4 days4-22/+92
| | | | | | | | The box control was a wide select plus a color swatch, pinning the box column at 166px. I replaced the select with a 2x2 cluster of radio buttons for the four styles: blank (no box), □ (line), ▼ (pressed), ▲ (raised). The color swatch now shows only while a box style is active, so the no-box case stays narrow. The column drops to 76px across all three tiers. A #boxtest gate covers the cluster: four buttons, radio selection, and the swatch hiding when no box is set. #beveltest now drives the style through the cluster button instead of the removed select. The same cluster shape sets up the B/I/U/S style column next.
* refactor(theme-studio): drop the per-row reset column from package facesCraig Jennings4 days4-10/+10
| | | | | | Package faces was the only tier with a per-row reset button, in its own column. The syntax and ui tiers rely on the bulk reset alone, and the column cost horizontal space the table needs. I removed the per-row cell and its header, so the bulk reset (next to "lock all") is the single reset path now, matching the other tiers. A #viewtest assertion confirms the package rows carry no per-row reset button. The two weren't equivalent: the per-row button reset one face to its default, the bulk reset clears every unlocked face in the app. Losing single-face reset is the accepted tradeoff.
* refactor(theme-studio): collapse assignment views into one dropdown panelCraig Jennings4 days4-14/+104
| | | | | | The assignment area was three stacked sections (color/code, ui faces, package faces), and package faces carried its own application selector. I merged them into one panel driven by a single dropdown: color/code assignments, ui faces, then a non-selectable "package faces" optgroup holding every app in order. Picking an entry swaps the left table and right preview, so only one view shows at a time. curApp now reads the selected app from that dropdown, and the old appsel is gone. A #viewtest browser gate locks in the dropdown order, the optgroup, and the one-view-at-a-time switching.
* chore(theme-studio): label highlighted preview line (process highlights)Craig Jennings4 days2-2/+2
|
* refactor(themes): retire dupre, fall back to modus-vivendiCraig Jennings5 days1-4/+4
| | | | WIP, the theme-studio export, is the active theme. dupre was only the fallback and a structural reference. Move the fallback to the built-in modus-vivendi, guaranteed present everywhere this config loads. Delete the three dupre files plus its test and palette assets, and fix the stale comments that pointed at dupre-faces.el for the auto-dim and org-keyword faces (those moved to org-faces-config.el). Repoint the dupre-clear-theme spec's palette reference to git history.
* docs: move specs to docs/specs/ with lifecycle-status filenamesCraig Jennings5 days2-2/+2
| | | | | | Separate the 27 formal specs from working notes. Specs move to docs/specs/, notes stay in docs/design/. Each spec carries its lifecycle in the filename (-spec, -spec-doing, -spec-implemented, -spec-superseded) plus an authoritative ID and STATUS property drawer. The status came from checking each spec against the code, not the doc's own field: 6 implemented, 8 in progress, 12 not started, 1 superseded. Inbound links become org-id links so future status renames don't break them; code-comment paths repoint to docs/specs/. Working notes, inventories, reviews, and brainstorms stay in docs/design/.
* chore(theme-studio): refresh WIP theme export and deployed themeCraig Jennings5 days1-351/+382
| | | | Latest theme-studio tuning pass: updated theme.json export and the regenerated themes/WIP-theme.el it deploys.
* feat(theme-studio): add org-faces app for agenda keyword and priority colorsCraig Jennings5 days5-3/+75
| | | | Surface the org-faces-config.el header-row faces as their own theme-studio app, placed beside elfeed and mu4e so it reads as a custom layer rather than built-in org. The seed mirrors the module defaults exactly across all 28 faces (10 keywords, 4 priorities, and their dim variants), so the editor opens on the live colors. The preview shows a focused agenda block and an auto-dim block covering every face.
* refactor(theme-studio): derive the gate list and sentinel the samples splitCraig Jennings5 days3-2/+7
| | | | | | run-tests.sh built its browser-gate list by hand, so a new gate could go unrun or a removed one stay listed (that drift hid the #familytest alias). It now derives the list from the gate blocks in browser-gates.js. generate.py split samples.py on the first "cols=" substring to import only the data section, which would truncate at the wrong place if "cols=" ever appeared earlier. Both sides now use an explicit THEME_STUDIO_DATA_END marker.
* refactor(theme-studio): extract the shared package-preview wrapperCraig Jennings5 days2-40/+46
| | | | The 20 line-based renderXxxPreview functions each ended with a byte-identical monospace-pre wrapper. They now build their L array and return previewLines(L), so the wrapper lives in one place and can't drift across the family.
* refactor(theme-studio): spec-table the bespoke apps, guard the palette dedupCraig Jennings5 days1-23/+28
| | | | The bespoke APPS dict was 21 hand-repeated lines of the same shape. It's now a (key, label, preview, FACES, prefix, SEED) spec list turned into the dict by one comprehension, so adding an app is one row. add_palette_color's dedup set tolerates a palette row with no name slot instead of indexing past its end.
* chore(theme-studio): remove dead code and clear a type warningCraig Jennings5 days8-199/+7
| | | | | | | | | - ramp (app-core.js) and its test-ramp.mjs: superseded by regenColumn, no production caller. - optList (app-core.js) and its tests: superseded by paletteOptionList. - ITALIC in generate.py: computed, never read (ITALIC_MAP is the live one). - a stray empty string in MU4E_FACES that .split() silently dropped. - the dead #familytest alias in the columntest gate, which HASHES never listed. - widen face_rows to Sequence[str], clearing the list-invariance warnings on the APPS calls.
* fix(theme-studio): make broken browser gates fail instead of silently passingCraig Jennings5 days3-9/+17
| | | | | | run-tests.sh scored each browser gate by grepping the dumped DOM for the gate name and taking the first match. A gate that throws before setting its verdict left its own inlined source as the first match, and that source, "GATENAME '+(ok?'PASS':'FAIL')", contains the literal PASS, so the run reported green for a gate that never produced a verdict. The matcher now requires a resolved "GATENAME PASS" or "GATENAME FAIL". That exposed two gates that had been throwing unnoticed. baseedittest still referenced fam after the variable was renamed to column, so it ReferenceError'd. columntest read getComputedStyle on a palette chip captured before a re-render detached it, so the match returned null and threw. baseedittest now uses column, and columntest re-queries the live chip by its selection index.