From c8a6fd294e1ce2fd9f04c51f4f523bb8115f0cac Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 17 Feb 2026 22:17:42 +0200 Subject: [PATCH] docs: add custom dropdowns and date pickers implementation plan --- ...om-dropdowns-datepickers-implementation.md | 1103 +++++++++++++++++ 1 file changed, 1103 insertions(+) create mode 100644 docs/plans/2026-02-17-custom-dropdowns-datepickers-implementation.md diff --git a/docs/plans/2026-02-17-custom-dropdowns-datepickers-implementation.md b/docs/plans/2026-02-17-custom-dropdowns-datepickers-implementation.md new file mode 100644 index 0000000..05ed136 --- /dev/null +++ b/docs/plans/2026-02-17-custom-dropdowns-datepickers-implementation.md @@ -0,0 +1,1103 @@ +# Custom Dropdowns & Date Pickers Implementation Plan + +> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. + +**Goal:** Replace all 6 native `` elements with custom Vue 3 components matching ZeroClock's dark UI. + +**Architecture:** Two new components (`AppSelect`, `AppDatePicker`) using `` for overflow-safe positioning. Each renders a styled trigger + a floating panel positioned via `getBoundingClientRect()`. Click-outside detection and keyboard navigation built in. Then swap every native element across 5 views. + +**Tech Stack:** Vue 3 Composition API (` +``` + +**Step 2: Add dropdown animation to main.css** + +In `src/styles/main.css`, add after the existing `animate-modal-enter` block (after line 120): + +```css +/* Dropdown animations */ +@keyframes dropdown-enter { + from { + opacity: 0; + transform: translateY(-4px) scale(0.98); + } + to { + opacity: 1; + transform: translateY(0) scale(1); + } +} + +.animate-dropdown-enter { + animation: dropdown-enter 150ms ease-out; +} +``` + +**Step 3: Verify it builds** + +Run: `npx vite build` +Expected: Build succeeds (component isn't used yet, but it must compile) + +**Step 4: Commit** + +```bash +git add src/components/AppSelect.vue src/styles/main.css +git commit -m "feat: add AppSelect custom dropdown component" +``` + +--- + +### Task 2: Create AppDatePicker Component + +**Files:** +- Create: `src/components/AppDatePicker.vue` + +**Context:** This component replaces all 6 native `` elements. The v-model is a `YYYY-MM-DD` string (same format as native date input). The calendar popover is teleported to body. It needs month navigation, today highlighting, and selected-day highlighting. + +**Step 1: Create the component file** + +Write `src/components/AppDatePicker.vue` with this complete implementation: + +```vue + + + +``` + +**Step 2: Verify it builds** + +Run: `npx vite build` +Expected: Build succeeds + +**Step 3: Commit** + +```bash +git add src/components/AppDatePicker.vue +git commit -m "feat: add AppDatePicker custom calendar component" +``` + +--- + +### Task 3: Replace Selects in Timer.vue + +**Files:** +- Modify: `src/views/Timer.vue:29-59` (template selects), `src/views/Timer.vue:121` (imports) + +**Context:** Timer.vue has 2 native selects: +1. Project selector (line 29-42): `v-model="selectedProject"`, options from `activeProjects`, disabled when `timerStore.isRunning` +2. Task selector (line 46-59): `v-model="selectedTask"`, options from `projectTasks`, disabled when `timerStore.isRunning || !selectedProject` + +**Step 1: Add import** + +In the `