Show the current choice, keyboard focus, and states apart
Phase 5-5. - The current radio row shows a check mark in the icon column and no fill (UI-051, replaces the radio rule of UI-003). The list of all tabs names pinned tabs in text. - Keyboard focus adds a 2-pixel ring inside menu rows. The global focus ring is 2 pixels with a 1-pixel offset. - Active toggles get the accent color, the selection fill, and a 2-pixel accent bar. Hover gets only a neutral fill. Enabled icon buttons use --rs-text. - Disabled controls use --rs-text-dim at full opacity, not opacity. - The file tree has one Tab stop. Up and Down move, Shift extends the selection, Right opens or enters a folder, Left closes it or goes to its parent, Home and End go to the ends, and typed letters find a row. - The three workbench splitters take focus. The arrow keys move them by 16 pixels, and Home and End go to their limits. - Help names Esc, then Tab, to leave the text. - 5 new catalog rows in French, Japanese, and Simplified Chinese. - Docs: UI-051, ui-design.md, and the user guide. Tests: the new layout/keyboardFocus. backgroundImages now expects the check mark on the current radio row.
This commit is contained in:
@@ -89,7 +89,8 @@ await runSmoke('appearance/backgroundImages', async ({ browser }) => {
|
||||
assert.equal(await menu.evaluate(node => getComputedStyle(node).fontSize), '13px');
|
||||
// Shared menu rows are 24px high (src/lib/theme/tokens.css:31, --rs-menu-row-height).
|
||||
assert.equal(await menu.locator(':scope > button').first().evaluate(node => getComputedStyle(node).minHeight), '24px');
|
||||
assert.equal(await menu.locator('[aria-checked="true"] svg').count(), 0);
|
||||
// The current choice shows a check mark in the icon column (src/lib/ui/actionMenu.ts).
|
||||
assert.equal(await menu.locator('[aria-checked="true"] svg').count(), 1);
|
||||
assert.equal(await menu.evaluate(node => { const reference = document.createElement('span'); reference.style.color = 'var(--rs-menu-border)'; node.append(reference); const matches = getComputedStyle(node).borderColor === getComputedStyle(reference).color; reference.remove(); return matches; }), true, 'Menu uses the shared border token');
|
||||
assert.equal(await menu.evaluate(node => getComputedStyle(node).borderColor), 'rgba(0, 0, 0, 0)', 'Menus have no visible border');
|
||||
await settings.screenshot({ path: `${output}/${name.replaceAll(' ', '-')}-${mode}.png` });
|
||||
|
||||
Reference in New Issue
Block a user