Update antfarm, ashboard, dashboard +3 more (+3 ~6)

This commit is contained in:
Echo
2026-02-10 12:52:23 +00:00
parent c1d4ed1b03
commit c7bea57cd3
9 changed files with 265 additions and 30 deletions

View File

@@ -452,9 +452,48 @@ CODEBASE PATTERNS UPDATE:
- dashboard/test_habits_form_submit.py (created)
- dashboard/habits.json (reset to empty for testing)
[✓] Story 12.0: Frontend - Habit card styling
Commit: c1d4ed1
Date: 2026-02-10
Implementation:
- Enhanced habit card styling to match dashboard aesthetic
- Changed card border-radius from --radius-md to --radius-lg for smoother appearance
- Changed streak font-size from --text-lg to --text-xl for prominent display
- Added green background tint (rgba(34, 197, 94, 0.1)) for checked habit cards
- Added 'checked' CSS class to habit-card when checkedToday is true
- Implemented pulse animation on checkbox hover for unchecked habits
- Animation scales checkbox subtly (1.0 to 1.05) with 1.5s ease-in-out timing
- Styled frequency badge as dashboard tag with inline-block, bg-elevated, border, padding
- Updated JavaScript createHabitCard to add 'checked' class to card element
- Updated JavaScript checkHabit to add 'checked' class on successful check
- Updated error rollback to remove 'checked' class if check fails
- Added mobile responsiveness with @media (max-width: 768px) query
- Mobile styles: full width cards, reduced padding, smaller icons (36px, 28px)
- All CSS uses CSS variables for theming consistency
Tests:
- Created dashboard/test_habits_card_styling.py with 10 comprehensive tests
- Tests for file existence
- Tests for card using --bg-surface with --border (acceptance criteria 1)
- Tests for --radius-lg border radius on cards (acceptance criteria 6)
- Tests for streak using --text-xl font size (acceptance criteria 2)
- Tests for checked habit green background tint (acceptance criteria 3)
- Tests for pulse animation on unchecked checkbox hover (acceptance criteria 4)
- Tests for frequency badge dashboard tag styling (acceptance criteria 5)
- Tests for mobile responsiveness with full width cards (acceptance criteria 7)
- Tests for checked class in createHabitCard function
- Summary test verifying all 7 acceptance criteria
- All 10 tests pass ✓ (acceptance criteria 8)
- All previous tests (schema, API, HTML, modal, display, check, form) still pass ✓
Files modified:
- dashboard/habits.html (updated CSS and JavaScript for styling enhancements)
- dashboard/test_habits_card_styling.py (created)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NEXT STEPS:
- Continue with remaining 7 stories
- Continue with remaining 6 stories
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━