aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/test-app-core.mjs
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-09 12:33:51 -0500
committerCraig Jennings <c@cjennings.net>2026-06-09 12:33:51 -0500
commitaedaaadfabc271cce443d8133714fa8cb8082eeb (patch)
tree87ae2c07af15aaa8412c69c0e561d494aaad2ef0 /scripts/theme-studio/test-app-core.mjs
parentb6aed0e390ee25358d0d6270dd43a7edcaf87f97 (diff)
downloaddotemacs-aedaaadfabc271cce443d8133714fa8cb8082eeb.tar.gz
dotemacs-aedaaadfabc271cce443d8133714fa8cb8082eeb.zip
feat(theme-studio): add a real, exported :box face attribute
The mode-line box in the preview was hardcoded — it showed a box the generated theme couldn't actually produce, since build-theme.el never emitted :box. Made :box a real face attribute instead: a per-face box object (style line/raised/pressed, width, color) stored on UI and package faces, set from a "box" dropdown in both tables, rendered from the attribute everywhere (the mode-line bars, the package previews via ofs, the UI table preview cells), and exported through build-theme.el's --attrs as a proper :box plist (released/pressed → :style *-button; line → :line-width + optional :color). The hardcoded box is gone; mode-line and mode-line-inactive now default to the released-button box that is the Emacs default, so the preview and the export agree. This also gives the package faces that genuinely use :box a way to represent it — the face audit found several (magit-branch-current/-remote-head, two flycheck list faces, the telega button family, ~15 slack button/dialog faces). Tests: build-theme gains box-conversion + ui-box-emit ERT tests (24/24); the app-core deep-equal tests account for the new box slot; all 9 browser gates, 20 python, and 55 node tests stay green.
Diffstat (limited to 'scripts/theme-studio/test-app-core.mjs')
-rw-r--r--scripts/theme-studio/test-app-core.mjs4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/theme-studio/test-app-core.mjs b/scripts/theme-studio/test-app-core.mjs
index 9bf5145fa..162025254 100644
--- a/scripts/theme-studio/test-app-core.mjs
+++ b/scripts/theme-studio/test-app-core.mjs
@@ -62,7 +62,7 @@ test('buildPkgmap: Boundary — a face with no default dict still seeds blank',
const m = buildPkgmap({ a: { faces: [['f', 'f']] } }, PAL);
assert.deepEqual(m.a.f, {
fg: null, bg: null, bold: false, italic: false, underline: false,
- strike: false, inherit: null, height: 1, source: 'default',
+ strike: false, inherit: null, height: 1, box: null, source: 'default',
});
});
@@ -117,7 +117,7 @@ test('mergePackagesInto: Normal — fills missing fields with defaults', () => {
mergePackagesInto(m, { a: { f: { fg: '#112233' } } });
assert.deepEqual(m.a.f, {
fg: '#112233', bg: null, bold: false, italic: false, underline: false,
- strike: false, inherit: null, height: 1, source: 'user',
+ strike: false, inherit: null, height: 1, box: null, source: 'user',
});
});