refactor: replace fragmented theme system with unified ThemeEngine#320
refactor: replace fragmented theme system with unified ThemeEngine#320
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR centralizes theming into ThemeEngine: removes legacy theme/token files, adds color/hex utilities and theme UI, migrates 40+ views to ThemeEngine.shared for fonts, colors, spacing and icon sizes, introduces a themeDidChange notification and DataGridView theme observer, and removes per-window accent tinting. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User/UI
participant ThemeEditor as ThemeEditorFontsSection
participant ThemeEngine as ThemeEngine.shared
participant Notification as NotificationCenter
participant View as DataGridView / Other Views
User->>ThemeEditor: change font/color and save
ThemeEditor->>ThemeEngine: update active theme
ThemeEngine->>Notification: post themeDidChange
Notification->>View: receives themeDidChange
View->>ThemeEngine: read new fonts/colors
View->>View: apply visual updates (fonts, spacing, colors)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
Summary
Theme.swift,DesignConstants.swift,SQLEditorTheme.swift,ToolbarDesignTokens.swift,DataGridFontCache.swift) with the unifiedThemeEnginesingletonTheme.*,DesignConstants.*,SQLEditorTheme.*references toThemeEngine.shared.colors.*/ThemeEngine.shared.activeTheme.*HexColor.swift(hex string to NSColor/Color conversion) andResolvedThemeColors.swift(pre-resolved NSColor cache from theme hex strings)ThemePreviewCard.swift(visual thumbnail for theme list) andThemeEditorFontsSection.swift(font picker with live preview)Deleted files
Theme.swift— old static color constantsDesignConstants.swift— old spacing/sizing constantsSQLEditorTheme.swift— old editor color constantsToolbarDesignTokens.swift— old toolbar styling constantsDataGridFontCache.swift— moved intoThemeEngineasDataGridFontCacheResolvedTest plan
Theme.*/DesignConstants.*patterns)Summary by CodeRabbit
New Features
Changes