refactor(theme): add theme component, remove duplicate color definitions (@fehmer)#7366
refactor(theme): add theme component, remove duplicate color definitions (@fehmer)#7366
Conversation
fb1b6f4 to
1bbea5d
Compare
|
@copilot only serika dark, darling and dots are converted on this pr. convert the rest |
2ec3e67 to
c4bd55f
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors theme handling by consolidating all color definitions from individual CSS files into a centralized TypeScript constants file. It removes now-empty CSS files, introduces a new Theme SolidJS component to dynamically apply CSS variables, and updates all related code to work with the new architecture.
Changes:
- Consolidated all theme color definitions into
frontend/src/ts/constants/themes.ts - Removed duplicate color CSS variable definitions from individual theme CSS files
- Created new Theme SolidJS component to dynamically apply CSS variables and load theme-specific CSS files
- Updated theme-related code throughout the application to use the new centralized theme colors
Reviewed changes
Copilot reviewed 215 out of 216 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/static/themes/*.css | Removed :root CSS variable blocks from all theme files (keeping only additional CSS rules) |
| frontend/src/ts/constants/themes.ts | Would need to verify this file contains all theme definitions |
| frontend/src/ts/signals/theme.ts | Updated to export Theme type and removed ThemeColors duplicate definition |
| frontend/src/ts/components/layout/Theme.tsx | New SolidJS component for managing theme CSS variables and loading theme-specific CSS |
| frontend/src/ts/elements/theme-colors.ts | Deleted file (functionality moved to signals) |
| frontend/src/ts/controllers/theme-controller.ts | Refactored to work with centralized theme definitions |
| frontend/src/ts/elements/settings/theme-picker.ts | Updated to use new theme color management approach |
| frontend/src/html/pages/settings.html | Updated color picker IDs to use data-key attributes |
| frontend/src/index.html | Removed hardcoded theme link |
| frontend/src/html/head.html | Added Theme component mount point |
| Multiple TS files | Updated imports and function calls to use new theme color getters |
Comments suppressed due to low confidence (1)
frontend/src/html/pages/settings.html:1606
- Inconsistent ID naming. This input has
id='--sub-color'but should beid='colorPickerSub'to match the naming pattern used by all other color picker inputs in the same settings panel.
id="--sub-color"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 228 out of 230 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Uh oh!
There was an error while loading. Please reload this page.