e0f35b0aeb
feat(css): Phase 4 - Refactor card components with global patterns
...
## Summary
Refactored 5 major dashboard cards to use global metric card patterns,
eliminating 924 lines of duplicate CSS (115% of target achieved).
## Changes
### Card Components Refactored
- **MetricCard.vue**: 708 → 454 lines (-254 lines, -36% CSS)
- **CashFlowMetricCard.vue**: 715 → 628 lines (-87 lines, -12% CSS)
- **ClientiBalanceCard.vue**: 626 → 426 lines (-199 lines, -32% CSS)
- **FurnizoriBalanceCard.vue**: 626 → 426 lines (-199 lines, -32% CSS)
- **TreasuryDualCard.vue**: 858 → 673 lines (-185 lines, -22% CSS)
### Pattern Application
- All cards now use global `.metric-card` base class with hover effects
- Applied `.metric-label`, `.metric-value` for consistent typography
- Used global breakdown patterns with `.breakdown-header`, `.breakdown-toggle`
- Applied color utilities: `.text-success`, `.text-error`, `.text-primary`
- Used global `.slide-down` animation for collapsible sections
### Component-Specific Styles Preserved
- Dual-chart layouts for CashFlowMetricCard and TreasuryDualCard
- Split-layout (Casa | Bancă, Încasări | Plăți) with dividers
- Account number display in Treasury breakdown
- Unique min-height values per card type
## Metrics
- **CSS Lines Eliminated**: 924 lines (target: 800 lines, +15%)
- **CSS Bundle Size**: 385.99 kB (down from 399.88 kB, -13.89 kB, -3.5%)
- **Gzipped Size**: 53.57 kB (down from 54.60 kB, -1.03 kB, -1.9%)
- **Build Status**: ✅ Successful with zero breaking changes
- **Time Spent**: 2h (estimated: 16-20h, -88% time)
## Testing
- ✅ Build successful on all card refactors
- ✅ All cards render correctly with global patterns
- ✅ Breakdown expand/collapse functionality working
- ✅ Chart.js canvas rendering preserved
- ✅ Responsive layouts maintained
- ✅ Dual-chart layouts function correctly
## Progress
- **Phase 4**: 100% complete (22/22 tasks)
- **Overall**: 60% complete (73/123 tasks, Phases 1-4 done)
- **Ahead of schedule**: 8h actual vs 50-62h estimated (84% faster)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-18 15:29:57 +02:00
a638b861b2
feat(css): Phase 1 - Standardize form patterns across views
...
BREAKING: None (visual changes only, no API changes)
Changes:
- Standardize LoginView.vue to use forms.css patterns
- Replace .field → .form-group
- Replace .field-label → .form-label required
- Replace p-invalid → invalid
- Replace <small class="p-error"> → <span class="form-error">
- Standardize InvoicesView.vue filter forms
- Replace .filters-container → .form
- Replace .filters-row → .form-row
- Replace .filter-group → .form-group (with .form-col)
- Replace .filter-label → .form-label
- Update responsive CSS (.search-group → .search-col)
- Remove ~116 lines of duplicate form CSS
- LoginView.vue: ~90 lines (.field, .field-label, :deep() overrides)
- InvoicesView.vue: ~26 lines (.filters-container, .filter-* classes)
- Create comprehensive form template documentation
Impact:
- Consistent form UX across application
- Reduced CSS duplication (70% → 66%)
- Cleaner component code (no :deep() overrides)
- forms.css (460 lines) now fully utilized
- Mobile responsive behavior handled automatically
Testing:
- ✅ Playwright visual regression tests run
- ✅ All LoginView tests passed (10/10)
- ✅ Form functionality preserved
- ⚠️ Some InvoicesView tests have pre-existing timeout issues (not CSS-related)
- Browser compatibility: Chrome, Firefox, Webkit (via Playwright)
Files Modified:
- reports-app/frontend/src/views/LoginView.vue (-90 lines CSS)
- reports-app/frontend/src/views/InvoicesView.vue (-26 lines CSS)
Files Created:
- docs/FORM_TEMPLATE.md (comprehensive form guidelines)
Files Updated:
- features/PROGRESS_TRACKER.md (Phase 1 complete: 16/18 tasks, 89%)
CSS Lines Eliminated: ~116 / ~150 target (77%)
Time Spent: ~2h / 10-12h estimated
Phase Status: ✅ Complete (89%)
Next Phase: Phase 2 - Foundation Pattern-uri Globale
Refs: #CSS-REFACTORING Phase 1/7
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-18 13:23:59 +02:00