Theme System Refactor #6
Reference in New Issue
Block a user
No description provided.
Delete Branch "shared-theme-fixes"
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?
Dashboard State Lift + Theme System Refactor
Summary
Refactored dashboard state ownership, centralized theme semantics, and simplified component styling across the application.
Changes
Dashboard State Refactor
Moved dashboard state management from
Dashboard.viewintoDashboard.tsxAdded centralized
DashboardStateinitialization in parent containerIntroduced memoized dashboard state setter callbacks:
toggleFlowsetFlowtogglePeriodTypetoggleComparisonsetSelectedPeriodIdsetSelectedGroupKeyAdded
DashboardStateSettersmemoized object for prop-driven state managementRemoved
onFlowChangecallback patternConverted dashboard component into stateless view layer
Renamed component export flow:
Dashboard.tsx→ removedDashboard.view.tsx→ primary implementationDashboard Models Cleanup
Removed legacy palette configuration interfaces:
ColorDefinitionThemeAwarePaletteRemoved config-level style palette support from
DashboardConfigRenamed
DashboardProps→DashboardViewPropsAdded reusable
ColorSchemeinterfaceSimplified component color contract:
primarysurfacetextTheme Architecture Refactor
Moved
AppTheme.tsxintoshared-themeAdded centralized semantic theme system
Introduced
themeConfig.tswith semantic tokens:Added
semanticextension to MUI theme typingAdded
flowspalette extension:Centralized flow colors inside theme primitives
Added CSS semantic variables:
--bg-page--bg-card--bg-elevated--border-default--border-subtle--text-primary--text-secondary--text-mutedTheme Mode Improvements
Added explicit
ColorModetypeExpanded
ColorModeContext:modesetModetoggleColorModeAdded
CssBaselineAdded configurable
defaultModeSimplified dark theme palette handling
Standardized dark surfaces and shadows
Reduced excessive dark-mode glow/shadow intensity
Dashboard UI Styling Improvements
colorScheme.lightusage withcolorScheme.surfaceShared Theme Customization Cleanup
Updated customization layers for improved consistency:
inputsnavigationfeedbacksurfacesKey improvements:
Home Page Styling Cleanup
alpha()utilityMiscellaneous Cleanup
Updated imports to new theme structure
Removed unused legacy color mode components:
ColorModeIconDropdown.tsxColorModeSelect.tsxRemoved dashboard config style palette definitions
Simplified flow-based color derivation logic
Result