Repository navigation
feat: theme system and tabs - #16
Conversation
- themes.ts: token sets without custom elements; defineTheme() inherits missing tokens from a base theme, themeToCss(), applyTheme(), onThemeDefined() - new tokens: primary-text, danger, success, warning, focus, radius, radius-large, shadow; all components read them (fallbacks unchanged) - <ep-theme>: name="auto" with light/dark, .tokens overrides, data-scheme, ep-theme-change, live update on redefinition, removes stale tokens when switching - <ep-tabs>/<ep-tab> with keyboard navigation (arrows, Home/End) - checkbox announces itself as switch; toast icons use style fill (presentation attributes ignore var()) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012RMvvMtnCwj6ycD9fwLYVu
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoAdd reusable themes and accessible tabs
AI Description
Merge Risk
|
Code Review by Qodo
1.
|
- tabs: unique keys per tab (duplicate values no longer show two panels), arrow keys start at the focused tab, buttons point at their panels via ariaControlsElements where supported - success notices/toasts use --success-color, select menu uses --shadow - --radius is 4px (buttons unchanged); inputs/selects use radius - 1px - data-scheme uses the merged tokens, resolves any CSS colour in the browser, honours --color-scheme; parseColor() for hex/rgb/names - themeToCss() rejects invalid token names and unsafe values Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012RMvvMtnCwj6ycD9fwLYVu
Second step of the component library: a theme system that etherpad-go can build its own design on, while colibris (light green) stays the default for etherpad-lite.
Builds on #13 (pnpm 11 CI) – that commit is included here; merge #13 first.
Theme system
themes.ts(also exported as/themes.js, no custom elements):defineTheme(name, partialTokens, base)only needs the tokens that differ,themeToCss(),applyTheme(),onThemeDefined().--primary-text-color,--danger-color,--success-color,--warning-color,--focus-color,--radius,--radius-large,--shadow. All components read them; the previous values stay as fallbacks, so colibris looks exactly as before.<ep-theme>:name="auto"withlight/dark(followsprefers-color-scheme),.tokensfor single overrides,data-scheme,ep-theme-change, live update when a theme is redefined, stale tokens removed when switching.Components
<ep-tabs>/<ep-tab>(underline/pills), keyboard navigation (arrows, Home/End, skips disabled tabs).ep-checkboxis announced as a switch.fill="var(...)"which browsers ignore →style="fill: ...".Tests
autoandapplyTheme(19 files / 112 tests locally).Generated by Claude Code