docs(04-01): complete click navigation and project filter plan
This commit is contained in:
parent
b57eb93097
commit
fbe64d1e0b
4 changed files with 115 additions and 14 deletions
|
|
@ -27,12 +27,12 @@ Requirements for initial release. Each maps to roadmap phases.
|
||||||
- [ ] **HEAT-04**: Day-of-week labels (Mon/Wed/Fri) on Y-axis
|
- [ ] **HEAT-04**: Day-of-week labels (Mon/Wed/Fri) on Y-axis
|
||||||
- [ ] **HEAT-05**: Month labels along the top showing month boundaries
|
- [ ] **HEAT-05**: Month labels along the top showing month boundaries
|
||||||
- [ ] **HEAT-06**: Empty days render with a distinct "no data" color
|
- [ ] **HEAT-06**: Empty days render with a distinct "no data" color
|
||||||
- [ ] **HEAT-07**: Clicking a day cell navigates to Kimai timesheet view filtered to that date
|
- [x] **HEAT-07**: Clicking a day cell navigates to Kimai timesheet view filtered to that date
|
||||||
- [ ] **HEAT-08**: Color scheme uses Kimai's theme CSS variables
|
- [ ] **HEAT-08**: Color scheme uses Kimai's theme CSS variables
|
||||||
|
|
||||||
### Interactivity
|
### Interactivity
|
||||||
|
|
||||||
- [ ] **INTR-01**: Dropdown filter to view heatmap for a specific project or activity
|
- [x] **INTR-01**: Dropdown filter to view heatmap for a specific project or activity
|
||||||
|
|
||||||
### Polish
|
### Polish
|
||||||
|
|
||||||
|
|
@ -97,8 +97,8 @@ Which phases cover which requirements. Updated during roadmap creation.
|
||||||
| HEAT-06 | Phase 3 | Pending |
|
| HEAT-06 | Phase 3 | Pending |
|
||||||
| HEAT-08 | Phase 3 | Pending |
|
| HEAT-08 | Phase 3 | Pending |
|
||||||
| TEST-03 | Phase 3 | Pending |
|
| TEST-03 | Phase 3 | Pending |
|
||||||
| HEAT-07 | Phase 4 | Pending |
|
| HEAT-07 | Phase 4 | Complete |
|
||||||
| INTR-01 | Phase 4 | Pending |
|
| INTR-01 | Phase 4 | Complete |
|
||||||
| TEST-04 | Phase 4 | Pending |
|
| TEST-04 | Phase 4 | Pending |
|
||||||
| POLI-01 | Phase 5 | Pending |
|
| POLI-01 | Phase 5 | Pending |
|
||||||
| POLI-02 | Phase 5 | Pending |
|
| POLI-02 | Phase 5 | Pending |
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ Plans:
|
||||||
**UI hint**: yes
|
**UI hint**: yes
|
||||||
|
|
||||||
Plans:
|
Plans:
|
||||||
- [ ] 04-01: Day cell click navigation + project filter dropdown
|
- [x] 04-01: Day cell click navigation + project filter dropdown
|
||||||
- [ ] 04-02: Vitest tests for click navigation and filter behavior
|
- [ ] 04-02: Vitest tests for click navigation and filter behavior
|
||||||
|
|
||||||
### Phase 5: Polish
|
### Phase 5: Polish
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,14 @@ gsd_state_version: 1.0
|
||||||
milestone: v1.0
|
milestone: v1.0
|
||||||
milestone_name: milestone
|
milestone_name: milestone
|
||||||
status: executing
|
status: executing
|
||||||
stopped_at: Completed 03-03-PLAN.md
|
stopped_at: Completed 04-01-PLAN.md
|
||||||
last_updated: "2026-04-08T11:21:00Z"
|
last_updated: "2026-04-08T13:31:58.924Z"
|
||||||
last_activity: 2026-04-08
|
last_activity: 2026-04-08
|
||||||
progress:
|
progress:
|
||||||
total_phases: 5
|
total_phases: 5
|
||||||
completed_phases: 0
|
completed_phases: 0
|
||||||
total_plans: 2
|
total_plans: 4
|
||||||
completed_plans: 1
|
completed_plans: 2
|
||||||
percent: 50
|
percent: 50
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -21,12 +21,12 @@ progress:
|
||||||
See: .planning/PROJECT.md (updated 2026-04-08)
|
See: .planning/PROJECT.md (updated 2026-04-08)
|
||||||
|
|
||||||
**Core value:** At a glance, see where your time went -- a visual map of tracking activity that makes patterns obvious
|
**Core value:** At a glance, see where your time went -- a visual map of tracking activity that makes patterns obvious
|
||||||
**Current focus:** Phase 2: Plugin Scaffold + Data Layer
|
**Current focus:** Phase 4 — Heatmap Interaction
|
||||||
|
|
||||||
## Current Position
|
## Current Position
|
||||||
|
|
||||||
Phase: 2 of 5 (Plugin Scaffold + Data Layer)
|
Phase: 4 (Heatmap Interaction) — EXECUTING
|
||||||
Plan: 2 of 2 in current phase
|
Plan: 2 of 2
|
||||||
Status: Ready to execute
|
Status: Ready to execute
|
||||||
Last activity: 2026-04-08
|
Last activity: 2026-04-08
|
||||||
|
|
||||||
|
|
@ -55,6 +55,7 @@ Progress: [██░░░░░░░░] 20%
|
||||||
| Phase 2 P02-01 | 5min | 5 tasks | 8 files |
|
| Phase 2 P02-01 | 5min | 5 tasks | 8 files |
|
||||||
| Phase 03 P01 | 3min | 4 tasks | 7 files |
|
| Phase 03 P01 | 3min | 4 tasks | 7 files |
|
||||||
| Phase 03 P03 | 2min | 4 tasks | 1 files |
|
| Phase 03 P03 | 2min | 4 tasks | 1 files |
|
||||||
|
| Phase 04 P01 | 2min | 2 tasks | 7 files |
|
||||||
|
|
||||||
## Accumulated Context
|
## Accumulated Context
|
||||||
|
|
||||||
|
|
@ -76,6 +77,7 @@ Recent decisions affecting current work:
|
||||||
- [Phase 2]: Removed final from HeatmapService to allow PHPUnit mocking
|
- [Phase 2]: Removed final from HeatmapService to allow PHPUnit mocking
|
||||||
- [Phase 03]: IIFE format with KimaiHeatmap global for browser compat
|
- [Phase 03]: IIFE format with KimaiHeatmap global for browser compat
|
||||||
- [Phase 03]: kimai.initialized event for deferred widget init, javascriptRequest fallback for AJAX
|
- [Phase 03]: kimai.initialized event for deferred widget init, javascriptRequest fallback for AJAX
|
||||||
|
- [Phase 04]: Render project filter only when user has tracked projects
|
||||||
|
|
||||||
### Pending Todos
|
### Pending Todos
|
||||||
|
|
||||||
|
|
@ -87,6 +89,6 @@ None yet.
|
||||||
|
|
||||||
## Session Continuity
|
## Session Continuity
|
||||||
|
|
||||||
Last session: 2026-04-08T11:21:00Z
|
Last session: 2026-04-08T13:31:58.922Z
|
||||||
Stopped at: Completed 03-03-PLAN.md
|
Stopped at: Completed 04-01-PLAN.md
|
||||||
Resume file: None
|
Resume file: None
|
||||||
|
|
|
||||||
99
.planning/phases/04-heatmap-interaction/04-01-SUMMARY.md
Normal file
99
.planning/phases/04-heatmap-interaction/04-01-SUMMARY.md
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
---
|
||||||
|
phase: 04-heatmap-interaction
|
||||||
|
plan: 01
|
||||||
|
subsystem: ui
|
||||||
|
tags: [d3, heatmap, click-navigation, project-filter, typescript, esbuild]
|
||||||
|
|
||||||
|
requires:
|
||||||
|
- phase: 03-heatmap-rendering
|
||||||
|
provides: d3 heatmap SVG rendering, esbuild bundle, Twig widget template
|
||||||
|
provides:
|
||||||
|
- Click-through navigation from heatmap cells to Kimai timesheet filtered by date
|
||||||
|
- Project filter dropdown that re-fetches and re-renders heatmap
|
||||||
|
- getUserProjects service method for querying user project list
|
||||||
|
affects: [04-02-PLAN, polish]
|
||||||
|
|
||||||
|
tech-stack:
|
||||||
|
added: []
|
||||||
|
patterns: [onCellClick callback pattern for cell interaction, flex wrapper layout for widget + sidebar controls]
|
||||||
|
|
||||||
|
key-files:
|
||||||
|
created: []
|
||||||
|
modified:
|
||||||
|
- Service/HeatmapService.php
|
||||||
|
- Widget/HeatmapWidget.php
|
||||||
|
- Resources/views/widget/heatmap.html.twig
|
||||||
|
- assets/src/heatmap.ts
|
||||||
|
- assets/src/types.ts
|
||||||
|
- Resources/public/heatmap.css
|
||||||
|
- Resources/public/heatmap.js
|
||||||
|
|
||||||
|
key-decisions:
|
||||||
|
- "Render project filter only when user has tracked projects (skip empty dropdown)"
|
||||||
|
- "Use encodeURIComponent for daterange param in navigation URL (T-04-03 mitigation)"
|
||||||
|
|
||||||
|
patterns-established:
|
||||||
|
- "Callback injection: renderHeatmap accepts optional onCellClick for cell interaction"
|
||||||
|
- "Flex wrapper: heatmap-wrapper div with heatmap-svg-area + heatmap-filter side by side"
|
||||||
|
|
||||||
|
requirements-completed: [HEAT-07, INTR-01]
|
||||||
|
|
||||||
|
duration: 2min
|
||||||
|
completed: 2026-04-08
|
||||||
|
---
|
||||||
|
|
||||||
|
# Phase 4 Plan 1: Click Navigation & Project Filter Summary
|
||||||
|
|
||||||
|
**Click-through day cell navigation to Kimai timesheet with daterange filter, plus project filter dropdown that re-fetches and re-renders the heatmap in place**
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
- **Duration:** 2 min
|
||||||
|
- **Started:** 2026-04-08T13:29:12Z
|
||||||
|
- **Completed:** 2026-04-08T13:31:15Z
|
||||||
|
- **Tasks:** 2
|
||||||
|
- **Files modified:** 7
|
||||||
|
|
||||||
|
## Accomplishments
|
||||||
|
- Heatmap cells navigate to Kimai timesheet filtered by clicked date via window.location.href
|
||||||
|
- Project filter dropdown renders with Tabler form-select classes, re-fetches data on change
|
||||||
|
- CSS provides cursor:pointer hover affordance and flex layout for heatmap + filter
|
||||||
|
- All 20 existing Vitest tests still pass
|
||||||
|
|
||||||
|
## Task Commits
|
||||||
|
|
||||||
|
Each task was committed atomically:
|
||||||
|
|
||||||
|
1. **Task 1: Backend -- getUserProjects, widget getData, Twig data attributes** - `3df754e` (feat)
|
||||||
|
2. **Task 2: Frontend -- click navigation, filter dropdown, CSS, esbuild rebuild** - `b57eb93` (feat)
|
||||||
|
|
||||||
|
## Files Created/Modified
|
||||||
|
- `Service/HeatmapService.php` - Added getUserProjects() returning distinct projects user has tracked time for
|
||||||
|
- `Widget/HeatmapWidget.php` - Removed final, injected HeatmapService, getData() returns project list
|
||||||
|
- `Resources/views/widget/heatmap.html.twig` - Added data-projects and data-timesheet-url attributes
|
||||||
|
- `assets/src/types.ts` - Added ProjectOption interface
|
||||||
|
- `assets/src/heatmap.ts` - Refactored init() with click handler, project filter dropdown, re-fetch logic
|
||||||
|
- `Resources/public/heatmap.css` - Added click affordance styles and flex wrapper layout
|
||||||
|
- `Resources/public/heatmap.js` - Rebuilt bundle with all frontend changes
|
||||||
|
|
||||||
|
## Decisions Made
|
||||||
|
- Render project filter only when user has tracked projects (avoids empty dropdown)
|
||||||
|
- Use encodeURIComponent for daterange param per T-04-03 threat mitigation
|
||||||
|
|
||||||
|
## Deviations from Plan
|
||||||
|
|
||||||
|
None - plan executed exactly as written.
|
||||||
|
|
||||||
|
## Issues Encountered
|
||||||
|
None
|
||||||
|
|
||||||
|
## User Setup Required
|
||||||
|
None - no external service configuration required.
|
||||||
|
|
||||||
|
## Next Phase Readiness
|
||||||
|
- Click navigation and project filter are functional
|
||||||
|
- Ready for 04-02 (tests for interaction features)
|
||||||
|
|
||||||
|
---
|
||||||
|
*Phase: 04-heatmap-interaction*
|
||||||
|
*Completed: 2026-04-08*
|
||||||
Loading…
Add table
Reference in a new issue