diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-20 16:28:10 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-20 16:28:10 -0400 |
| commit | 10a567898783ba300841922fcc1d469408efb0c5 (patch) | |
| tree | b14b1b8e94b7b7991d022ad55084091c666f8feb /scripts/theme-studio/app-core.js | |
| parent | 28b4d1cf86b9355a0db6e00f4c599ed02cf4f2e7 (diff) | |
| download | dotemacs-10a567898783ba300841922fcc1d469408efb0c5.tar.gz dotemacs-10a567898783ba300841922fcc1d469408efb0c5.zip | |
refactor(theme-studio): drop the orphaned dropdownRowTextColor helper
dropdownRowTextColor was exported and unit-tested but had no runtime caller: it
computed text color for a vertical-list dropdown row, a UI replaced by the swatch
gallery popup (colored buttons, no per-row text), so its regression rationale is
moot. Remove the function, its export, and its four tests; regenerate the page
(theme-studio.html staged so check-generated stays green).
Diffstat (limited to 'scripts/theme-studio/app-core.js')
| -rw-r--r-- | scripts/theme-studio/app-core.js | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/scripts/theme-studio/app-core.js b/scripts/theme-studio/app-core.js index a69d958c0..f02191c67 100644 --- a/scripts/theme-studio/app-core.js +++ b/scripts/theme-studio/app-core.js @@ -156,17 +156,6 @@ function resolveUiAttr(face,attr,uimap){ return walkInheritChain(face,f=>UI_INHERIT[f],f=>uimap[f]&&uimap[f][attr]); } -// Text color for a swatch-dropdown popup row. A row showing a real palette color -// sits on the popup's own fixed background, so its name/hex text must inherit the -// popup foreground (return '' to use the CSS color). Coloring it for contrast -// against the swatch instead picks near-black text for a mid/dark swatch, which -// is unreadable on the dark popup. Only the "default" row, filled solid with -// SHOWN, uses a contrast color computed against that fill. -function dropdownRowTextColor(hex,shown,textOnFn){ - if(hex)return ''; - return shown?textOnFn(shown):''; -} - // Turn a theme name into a safe filename slug: collapse runs of disallowed // characters to a single dash, trim leading/trailing dashes, fall back to 'theme'. function slugify(name){return name.replace(/[^A-Za-z0-9._-]+/g,'-').replace(/^-+|-+$/g,'')||'theme';} @@ -566,4 +555,4 @@ function composeHoverTitle(doc,base){ return doc||base; } -export { nameToHex, migrateLegacyFace, cssWeight, faceDecoration, boxCss, faceCss, composeHoverTitle, normalizePkgFace, buildPkgmap, packagesForExport, mergePackagesInto, effResolve, resolveSyntaxFg, resolveUiAttr, dropdownRowTextColor, paletteOptionList, galleryModel, appViewKeysSorted, faceBoxNonDefaults, overflowNonDefault, clampHeight, HEIGHT_MIN, HEIGHT_MAX, stepViewIndex, spanNeighborHex, slugify, fgSetFor, floor, lMax, COVERED_FACES, columnsFromPalette, usedPaletteHexes, paletteUsages, regenColumn, rankByLightness, stepRepointPlan, sortColumns, sortColumnMembers, groundRoleOfEntry, groundColumnMembersFromPalette, clearPalettePlan, deletePaletteColumnPlan, areAllLocked, lockToggleLabel, toggleLockSet }; +export { nameToHex, migrateLegacyFace, cssWeight, faceDecoration, boxCss, faceCss, composeHoverTitle, normalizePkgFace, buildPkgmap, packagesForExport, mergePackagesInto, effResolve, resolveSyntaxFg, resolveUiAttr, paletteOptionList, galleryModel, appViewKeysSorted, faceBoxNonDefaults, overflowNonDefault, clampHeight, HEIGHT_MIN, HEIGHT_MAX, stepViewIndex, spanNeighborHex, slugify, fgSetFor, floor, lMax, COVERED_FACES, columnsFromPalette, usedPaletteHexes, paletteUsages, regenColumn, rankByLightness, stepRepointPlan, sortColumns, sortColumnMembers, groundRoleOfEntry, groundColumnMembersFromPalette, clearPalettePlan, deletePaletteColumnPlan, areAllLocked, lockToggleLabel, toggleLockSet }; |
