Dashboard Refactor #5
Reference in New Issue
Block a user
No description provided.
Delete Branch "lean-components"
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 Refactor
Overview
This merge request performs a major cleanup and architectural refactor of the dashboard component system.
The primary goals were:
Major Changes
Dashboard Architecture Refactor
Consolidated State API
Introduced a centralized
DashboardStateSettersinterface:This removes scattered prop drilling and standardizes dashboard interaction handling.
Introduced Shared
ComponentPropsAll dashboard widgets now consume a unified contract:
Benefits:
Removed
Dashboard.view.tsxThe view/container split was removed.
Dashboard rendering now lives directly inside:
Benefits:
Dashboard Config Cleanup
Removed legacy
style.sizeconfiguration from dashboard sections.Before:
Now:
This simplifies section configuration and removes unnecessary abstraction.
Shared Transaction Utilities
Added
extractFilteredTransactionsCreated a reusable transaction extraction helper:
This centralizes:
Previously duplicated across:
Added
aggregateTransactionsCreated a reusable aggregation utility:
Benefits:
HistoryChart Refactor
Split Models vs Props
Separated:
into dedicated files.
New:
Benefits:
Migrated to Shared Dashboard State
HistoryChart now consumes:
instead of individual props.
This aligns it with the new dashboard architecture.
LatestItems Refactor
Simplified Component Contract
Removed duplicated props:
Now inherited from shared
ComponentProps.Added Auto Reset on Flow Change
Improves UX when switching inflow/outflow views.
ProgressCard Refactor
Removed
ProgressCard.tsxDeleted unnecessary wrapper component.
Rendering logic now lives directly in:
Introduced
ProgressCard.props.tsSeparated props into dedicated interfaces:
Reworked Styling System
Removed dependency on:
Now fully driven by:
Benefits:
Improved Visual Consistency
Updated:
to use standardized dashboard colors.
TopTags & TopPayees Refactor
Removed Duplicated Aggregation Logic
Both adapters now use:
instead of maintaining separate filtering/aggregation implementations.
Benefits:
Migrated to Shared Component Props
Both components now consume:
via:
This aligns all dashboard widgets under the same architecture.
Theme System Cleanup
Consolidated AppTheme
Moved to:
and removed unused duplicate implementations.
Added Explicit Color Mode Context
Introduced:
with:
modesetModetoggleColorModeThis provides a cleaner foundation for future theme controls.
Simplified Theme Creation
Replaced older MUI experimental color scheme setup with:
Benefits:
Added Global CssBaseline
is now applied centrally inside
AppTheme.Type Safety Improvements
Removed Optional Fields Where Invalid
Several previously optional fields are now required:
Benefits:
Cleanup Summary
Removed
Dashboard.view.tsxProgressCard.tsxAdded
Result
The dashboard system is now: