From 91a52c1973ee263699f1e220345483b79372a61a Mon Sep 17 00:00:00 2001 From: Ryan Kegel Date: Wed, 25 Feb 2026 19:45:31 -0500 Subject: [PATCH] Refactor Time Selector and Scheduler UI; Implement TimePickerPopover Component - Updated TimeSelector.vue styles for smaller dimensions and font sizes. - Added new API proxy for '/events' in vite.config.ts. - Created bug specifications for various UI issues and fixes in bugs-1.0.5-001.md and bugs-1.0.5-002.md. - Introduced TimePickerPopover.vue for a new time selection interface in the chore scheduler. - Refactored ScheduleModal.vue to replace checkbox rows with a chip-based design for selecting specific days. - Enhanced chore scheduling logic to ensure proper handling of time extensions and UI updates. --- .github/specs/bugs-1.0.5-001.md | 162 ++++++++ .github/specs/bugs-1.0.5-002.md | 125 +++++++ .../feat-calendar-schedule-refactor-01.md | 182 +++++++++ backend/api/chore_schedule_api.py | 7 +- backend/db/task_extensions.py | 5 + backend/events/sse.py | 12 +- backend/models/chore_schedule.py | 6 + .../src/__tests__/ScheduleModal.spec.ts | 13 + frontend/vue-app/src/assets/colors.css | 1 + frontend/vue-app/src/common/backendEvents.ts | 24 +- frontend/vue-app/src/common/models.ts | 2 + .../src/components/child/ChildView.vue | 44 ++- .../src/components/child/ParentView.vue | 114 ++++-- .../child/__tests__/ChildView.spec.ts | 46 +++ .../child/__tests__/ParentView.spec.ts | 31 ++ .../src/components/shared/ScheduleModal.vue | 353 +++++++++++++----- .../components/shared/TimePickerPopover.vue | 261 +++++++++++++ .../src/components/shared/TimeSelector.vue | 33 +- frontend/vue-app/vite.config.ts | 5 + 19 files changed, 1250 insertions(+), 176 deletions(-) create mode 100644 .github/specs/bugs-1.0.5-001.md create mode 100644 .github/specs/bugs-1.0.5-002.md create mode 100644 .github/specs/feat-calendar-chore/feat-calendar-schedule-refactor-01.md create mode 100644 frontend/vue-app/src/components/shared/TimePickerPopover.vue diff --git a/.github/specs/bugs-1.0.5-001.md b/.github/specs/bugs-1.0.5-001.md new file mode 100644 index 0000000..e201d18 --- /dev/null +++ b/.github/specs/bugs-1.0.5-001.md @@ -0,0 +1,162 @@ +# Bug List + +**Feature Bugs:** .github/specs/feat-calendar-chore/feat-calendar-chore.md + +## Bugs + +### Kabab menu icon should only appear when the item is 'selected' + +When a chore is 'selected' (clicked on for the first time) the kebab menu should show. The kebab menu on the chore should hide again if anywhere else is clicked except the item or it's kebab menu +This is similar to how the 'edit' icon appears on penalties and rewards. + +**Fix — `ParentView.vue`:** + +- Add `selectedChoreId = ref(null)` alongside `activeMenuFor` +- In the chore card-click handler, set `selectedChoreId.value = item.id`; clicking the same card again deselects it +- In `onDocClick` (the capture-phase outside-click handler), also clear `selectedChoreId.value = null` when clicking outside both the card and the kebab wrap +- Change the `.kebab-btn` from always-rendered to `v-show="selectedChoreId === item.id"` + +#### Additional Test Cases With This Fix + +- [x] Kebab button is not visible before a chore card is clicked +- [x] Kebab button becomes visible after a chore card is clicked +- [ ] Kebab button hides when clicking outside the card and kebab area _(integration only — covered by onDocClick logic, not unit-testable)_ +- [x] Kebab button hides when a different card is clicked + +### User Test Findings: + +- chore-inactive::before applies an inset and background that is too dark. It should more like a gray disabled state. +- an inactive chore shows a dark kebab menu icon, so it is very hard to see since it is too dark. + +**Fix applied:** + +- `::before` overlay changed from `rgba(0,0,0,0.45)` → `rgba(160,160,160,0.45)` and grayscale `60%` → `80%` for a lighter, more neutral gray disabled appearance +- Added `:deep(.chore-inactive) .kebab-btn { color: rgba(255,255,255,0.85) }` so the kebab icon remains visible against the gray overlay + +--- + +### In the scheduler, the cancel button should look like others + +The cancel button doesn't follow current css design rules. It should look like other cancel buttons +Incorrect cancel button: https://git.ryankegel.com/ryan/chore/attachments/a4a3a0eb-0acc-481d-8794-4d666f214e0a +Correct cancel button: https://git.ryankegel.com/ryan/chore/attachments/63033ee6-35e8-4dd3-8be4-bce4a8c576fc + +**Fix — `ScheduleModal.vue`:** + +- Change `