feat: basic theming system #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/basic-theme-system-01R9ZPWfW5H8JTPtaULWiAhS"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Deploying with
Cloudflare Workers
The latest updates on your project. Learn more about integrating Git with Workers.
View logs
593e2674Branch Preview URL
Changes Requested
Please make the following changes before merging:
src/styles/themes.cssand remove@theme inlineusage; keepthemes.cssas plain CSS variables and place Tailwind@tailwind base; @tailwind components; @tailwind utilities;insrc/styles/global.css(and importthemes.cssfrom there).isValidThemeinsrc/lib/themes.tsacceptunknownand useObject.prototype.hasOwnProperty.call(themes, name)for a defensive runtime guard.VALID_THEMESinsrc/components/astro/ThemeInitializer.astrowithArray.isArraybefore calling.includes.src/components/react/ThemeSelector.tsx: addaria-haspopup="menu"to the toggle, ensure all<button>s includetype="button"(already present), and implement keyboard handling (focus first item on open, support Escape to close and return focus, ArrowUp/Down navigation) or revert to simple list semantics.Summary of Changes
src/lib/themes.tsand utilities insrc/lib/themeManager.ts.src/components/astro/ThemeInitializer.astroto avoid FOUC.ThemeSelectorcomponent atsrc/components/react/ThemeSelector.tsxwith a dropdown UI.src/layouts/Layout.astro,src/pages/*).src/styles/themes.cssand imported it fromsrc/styles/global.css.Overall Feedback
Problems to fix: large blockers in the CSS build file (
themes.css) — it uses non-standard Tailwind/PostCSS directives that will break builds, and defensive runtime checks in theme validation/initialization and keyboard accessibility are missing. Please address the four requested changes above.Positives: The approach is clean: centralized theme definitions, SSR-safe initialization to prevent FOUC, and a user-friendly selector UI. These provide a solid foundation. Great work — this will be production-ready after the defensive and a11y fixes!
src/components/react/ThemeSelector.tsx— accessibility improvementsaria-hidden="true"(andfocusable="false") to the<svg>to avoid double announcements from screen readers.role="menu"on the dropdown wrapper androle="menuitem"on each theme button) to improve keyboard/screen-reader semantics.These are small, focused changes and will make the selector much more accessible.