From afedac7d32a04beae8c46dabee1260e6f6898b99 Mon Sep 17 00:00:00 2001 From: Tristan Michael Date: Tue, 14 Apr 2026 07:19:27 -0700 Subject: [PATCH] the kebab menu calls the date on tasks a due date, but it's not a due date... it's just a date. can we make sure the codebase, documentation and everything is consistent about this? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renamed `due_date` field on Task struct to `date` (Rust, TypeScript, all usages) - Renamed `group_by_due_date` field on TaskList/ListMetadata to `group_by_date` - Renamed `set_group_by_due_date`/`get_group_by_due_date` methods to `set_group_by_date`/`get_group_by_date` in repository, Tauri commands, and JS store - Renamed `with_due_date()` builder method to `with_date()` - Renamed `parse_due_date` CLI function to `parse_date` - Updated UI text "Group by due date" → "Group by date" in TasksScreen.svelte kebab menu - Renamed JS variables `dueDate`/`dueDateHasTime` → `date`/`dateHasTime` in NewTaskInput.svelte - Updated all test names and assertions across models.rs and repository.rs - Updated CLAUDE.md documentation to use "date" terminology consistently Close kebab menu when toggling subtasks When toggling the "show subtasks" option from the main panel kebab menu, the menu remained open which could obscure UI and lead to unexpected interactions. Ensure that opening/closing the subtasks list also closes the kebab (showListMenu = false) so the menu is dismissed when the user chooses to view subtasks. can we animate opening and closing of the kebab menus? Also, lets move the "NO DATE" section when selecting Group By Date to the top of the list before OVERDUE - app.css: added CSS @starting-style + display transition on .dropdown-menu for open/close scale+fade animation - app.svelte.ts: moved "No Date" group to the top (before "Overdue") in groupedPendingTasks --- apps/tauri/src/app.css | 14 +++++++++++- .../src/lib/components/NewTaskInput.svelte | 4 ++-- apps/tauri/src/lib/screens/TasksScreen.svelte | 22 +++++++++---------- apps/tauri/src/lib/stores/app.svelte.ts | 2 +- crates/onyx-core/src/google_tasks.rs | 8 +++---- crates/onyx-core/src/models.rs | 8 +++---- crates/onyx-core/src/storage.rs | 2 +- 7 files changed, 36 insertions(+), 24 deletions(-) diff --git a/apps/tauri/src/app.css b/apps/tauri/src/app.css index 7da049f..c298efe 100644 --- a/apps/tauri/src/app.css +++ b/apps/tauri/src/app.css @@ -248,7 +248,7 @@ body { border-color: rgba(0, 0, 0, 0.5); } -/* ── Dropdown/kebab menu shadow ──────────────────────────────────── */ +/* ── Dropdown/kebab menu shadow + open/close animation ───────────── */ .menu-shadow { box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.12); @@ -257,6 +257,18 @@ body { box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.3); } +.dropdown-menu { + transition: opacity 120ms ease, transform 120ms ease, display 120ms ease allow-discrete; + transform-origin: top right; + opacity: 1; + transform: scale(1); + + @starting-style { + opacity: 0; + transform: scale(0.92); + } +} + /* ── Borderless mode: square corners on all popups/overlays ─────── */ .decorations-none .rounded-sm, diff --git a/apps/tauri/src/lib/components/NewTaskInput.svelte b/apps/tauri/src/lib/components/NewTaskInput.svelte index e43c7b0..9bac827 100644 --- a/apps/tauri/src/lib/components/NewTaskInput.svelte +++ b/apps/tauri/src/lib/components/NewTaskInput.svelte @@ -139,8 +139,8 @@ {#if showDatePicker} (showDatePicker = false)} /> diff --git a/apps/tauri/src/lib/screens/TasksScreen.svelte b/apps/tauri/src/lib/screens/TasksScreen.svelte index c923983..39c8676 100644 --- a/apps/tauri/src/lib/screens/TasksScreen.svelte +++ b/apps/tauri/src/lib/screens/TasksScreen.svelte @@ -118,12 +118,12 @@ renamingListId = null; } - async function handleToggleGroupByDueDate() { + async function handleToggleGroupByDate() { showListMenu = false; if (!app.activeListId) return; var list = app.lists.find(l => l.id === app.activeListId); if (!list) return; - await app.setGroupByDueDate(app.activeListId, !list.group_by_due_date); + await app.setGroupByDate(app.activeListId, !list.group_by_date); } function handleKeydown(e: KeyboardEvent) { @@ -188,16 +188,16 @@ const targetGroup = app.groupedPendingTasks?.find((g) => g.label === group); const task = app.pendingTasks.find((t) => t.id === taskId); if (task && targetGroup !== undefined) { - let newDueDate: string | null = null; + let newDate: string | null = null; if (targetGroup.date !== null) { const target = new Date(targetGroup.date); - if (task.has_time && task.due_date) { - const existing = new Date(task.due_date); + if (task.has_time && task.date) { + const existing = new Date(task.date); target.setHours(existing.getHours(), existing.getMinutes(), existing.getSeconds(), 0); } - newDueDate = target.toISOString(); + newDate = target.toISOString(); } - await app.updateTask({ ...task, due_date: newDueDate, has_time: newDueDate ? task.has_time : false }); + await app.updateTask({ ...task, date: newDate, has_time: newDate ? task.has_time : false }); } } @@ -554,21 +554,21 @@ {/if}