Make menus opaque and redesign the core palettes
Phase 5a-3. The owner chose candidate B of each palette. - Menus are opaque (UI-043, replaces UI-013). With a background image, menus are at least 92% opaque and blur the image. Submenus show as manual popovers in the top layer, so the blur cannot clip them. - In a light palette, the page is the lightest surface, and the side panes have a slight tint (UI-044). - RuneStone uses neutral surfaces and the rune cyan of the app icon. Claude Dark uses the layout of the Claude app. Claude Light uses a white page with brand Light panes and a darker orange for text. Sakura uses Petal Veil for active rows. - All five core palettes pass every readability rule. A text role keeps the hue of its source and changes only its lightness. - The accent-text rule also checks accent-2, because inline code in Read uses it as text. - The root token defaults match RuneStone Dark. pnpm check passes. pnpm test: 447 pass, 5 todo, 0 fail. Full smoke suite: 92 passed, 2 known. editor/markdownPaste and tables/formulas failed one time and passed on retry. workspace/manageTemplates fails about half of its runs, also on the previous commit: the tree menu rebuilds when the template list reloads, and the open submenu closes.
This commit is contained in:
@@ -9,13 +9,8 @@ import { BASE_ROLES, resolveColors, type Mode } from '../../../src/lib/theme/rol
|
||||
import { RULES, checkTheme } from '../../../src/lib/theme/contrast.ts';
|
||||
import { composite, contrast, distance, formatHex, mix, parseHex } from '../../../src/lib/theme/color.ts';
|
||||
|
||||
// Rules that a palette fails today. Stages 5a-3 and 5a-4 redesign these palettes and remove each entry.
|
||||
// Rules that a palette fails today. Stage 5a-4 redesigns these palettes and removes each entry.
|
||||
const KNOWN_FAILURES: Record<string, readonly string[]> = {
|
||||
'default/dark': ['text', 'syntax-variety'],
|
||||
'default/light': ['text', 'syntax', 'syntax-variety', 'light-page'],
|
||||
'claude/dark': ['accent-text', 'status-text', 'syntax', 'status-distinct', 'syntax-variety'],
|
||||
'claude/light': ['accent-text', 'status-text', 'syntax', 'ansi', 'focus', 'selection-outline', 'syntax-variety', 'light-page'],
|
||||
'sakura/light': ['text', 'accent-text', 'status-text', 'syntax', 'ansi', 'syntax-variety', 'light-page'],
|
||||
'harvest-moon/dark': ['status-text', 'status-distinct'],
|
||||
'crimson-pilot/dark': ['status-distinct'],
|
||||
'silver-serpent/dark': ['status-text', 'status-distinct'],
|
||||
@@ -30,7 +25,7 @@ for (const variant of variants) {
|
||||
if (!results.length) continue;
|
||||
const known = KNOWN_FAILURES[variant.key]?.includes(rule.id);
|
||||
const failures = results.filter(finding => !finding.pass).map(finding => `${finding.subject}: ${finding.value.toFixed(2)} (minimum ${finding.min})`);
|
||||
test(`${variant.key} passes the ${rule.id} rule`, known ? { todo: 'Known palette failure. Stages 5a-3 and 5a-4 redesign this palette.' } : {}, () => {
|
||||
test(`${variant.key} passes the ${rule.id} rule`, known ? { todo: 'Known palette failure. Stage 5a-4 redesigns this palette.' } : {}, () => {
|
||||
assert.deepEqual(failures, []);
|
||||
});
|
||||
if (known) test(`${variant.key} still fails the known ${rule.id} rule`, () => {
|
||||
|
||||
Reference in New Issue
Block a user