-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
globalCross-cutting issue affecting multiple componentsCross-cutting issue affecting multiple componentstriage
Description
Summary
ThemeProvider is a custom theme management system with light/dark mode, localStorage persistence, and system preference detection. Has TypeScript safety issues, stale closure bugs, and obsolete CSS.
Improvements
2. Fix missing useCallback dependencies
setThemecallback (line 125) is missingstorageKeyin dependency array — can cause stale closure bugshandleMediaQuerycallback (line 137) is missingenableSystemdependency
3. Fix invalid JavaScript string generation (line 278)
val construction uses name + "|| ''" which creates syntactically invalid JavaScript in the injected script.
5. Add onThemeChange callback
No event hook for applications that need to react to theme changes.
Moved to Cross-Cutting Issues
The following items have been moved to cross-cutting issues that address them across all components:
- Replace hardcoded CSS values with design tokens (Replace hardcoded CSS values with design tokens #672)
- TypeScript strictness (TypeScript strictness: eliminate any, @ts-ignore, and export prop types #675)
- Clean up deprecated code (Clean up deprecated code, unused CSS, and legacy patterns #682)
Files
packages/raystack/raystack/components/theme-provider/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
globalCross-cutting issue affecting multiple componentsCross-cutting issue affecting multiple componentstriage