timetracker/.tasks/done/TT-007-entries-feature-ui.md
2026-08-03 21:51:48 +02:00

73 lines
3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TT-007 — Entries Feature UI
**Type:** Story
**Priority:** High
**Labels:** ui, feature, entries
**Depends on:** TT-005
**Blocks:**
---
## Summary
Implement the Entries screen — a chronological list of all time entries with
the ability to manually add, edit, and delete entries.
## UI Specification
### EntriesScreen layout
```
┌──────────────────────────────┐
│ AppBar: "Entries" [+ Add] │
│ [Date range filter chips] │
├──────────────────────────────┤
│ Monday, 2026-07-12 │
│ ┌─────────────────────────┐ │
│ │ 🟦 My Project 2h 30m│ │
│ │ 09:00 11:30 "Standup"│ │
│ └─────────────────────────┘ │
│ ┌─────────────────────────┐ │
│ │ 🟩 Backend 1h 00m│ │
│ │ 13:00 14:00 │ │
│ └─────────────────────────┘ │
│ Total: 3h 30m │
│ │
│ Sunday, 2026-07-11 │
│ ... │
└──────────────────────────────┘
```
### Widgets to build
| Widget | File | Description |
|--------|------|-------------|
| `EntriesScreen` | `entries_screen.dart` | Root screen with date-grouped list |
| `EntryListTile` | `widgets/entry_list_tile.dart` | Single entry row with swipe-to-delete |
| `DayHeader` | `widgets/day_header.dart` | Section header with date + daily total |
| `EntryFormSheet` | `widgets/entry_form_sheet.dart` | BottomSheet for create/edit |
| `DateRangeFilter` | `widgets/date_range_filter.dart` | Chip row: Today / This week / This month |
### Entry Form Fields
- Project (required, dropdown/picker)
- Start date + time (DateTimePicker)
- End date + time (DateTimePicker)
- Note (optional, text field)
- Tags (optional, multi-select chip input)
- Duration is auto-computed from start/end
## Acceptance Criteria
- [ ] Entries grouped by date, newest first
- [ ] Each group shows daily total duration
- [ ] Swipe-to-delete with undo `SnackBar`
- [ ] Tap entry → opens edit form pre-filled
- [ ] "+ Add" button → opens empty create form
- [ ] Form validates: end time must be after start time
- [ ] DateRangeFilter chips change the displayed entries reactively
- [ ] Widget test: empty state shows placeholder text
- [ ] Widget test: list renders entries from provider
## Files to create / modify
- `lib/features/entries/presentation/entries_screen.dart` (replace stub)
- `lib/features/entries/presentation/widgets/entry_list_tile.dart`
- `lib/features/entries/presentation/widgets/day_header.dart`
- `lib/features/entries/presentation/widgets/entry_form_sheet.dart`
- `lib/features/entries/presentation/widgets/date_range_filter.dart`
- `test/features/entries/entries_screen_test.dart`