mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-18 17:05:48 +00:00
* fix(tasks): make detail-panel add-subtask work in the Planner (#8617) The detail panel and context menu delegated "Add subtask" to AddSubtaskInputService.requestOpen(), a signal consumed only by the <task> row that renders the parent. The Planner renders tasks as <planner-task>, so the request was dropped and nothing happened (regression from #8423; Today view still worked). - task-detail-panel now hosts its own inline <add-subtask-input> (works in every view; also fixes the input opening behind the bottom panel on mobile). It controls the sub-task section's expansion via a signal and focuses the input after the expand animation completes; animates in/out with [@expandFade]. - task-detail-item gains expandedChange/afterExpand outputs so the panel can control/observe the Material expansion panel. - context menu addSubTask() reverts to direct addSubTaskTo() (a transient menu has no place to host the inline draft). Adds a Planner e2e repro and updates the affected unit specs. * fix(tasks): address multi-review findings for #8617 add-subtask - Focus the inline input via a deferred timeout in onSubTasksAfterExpand: with animations disabled Material fires afterExpand synchronously within the same CD pass, before the addSubtaskInput viewChild is committed, so the first collapsed→expand "Add subtask" click left the input unfocused. - Reset isSubTasksExpanded on task switch so the sub-task section doesn't stay sticky-expanded across tasks (the panel instance is reused). - Return focus to the "Add subtask" button when the draft is closed via Escape, instead of dropping focus to <body>. - Refresh the now-stale AddSubtaskInputService doc comment. - Assert the draft input is focused in the Planner e2e (the focus path was previously uncovered). * fix(tasks): keep context-menu add-subtask on the inline-draft bus The earlier context-menu change to addSubTaskTo() was unnecessary: the context menu's "Add sub-task" entry is gated behind isAdvancedControls, which only the <task> row enables. planner-task and schedule-event leave it false, so the entry is hidden there — meaning the menu action is only ever reachable from a rendered <task> row, where requestOpen() works. Reverting restores the v18.12 inline-draft UX for that path and shrinks the diff. (#8617 was only ever reachable via the detail panel, which the self-hosted input fix already covers.) * test(tasks): cover add-subtask focus with animations disabled Guards the deferred-focus fix: with animations disabled Material fires the expansion panel's afterExpand synchronously, before the panel's add-subtask-input viewChild is committed. Verified this test fails without the setTimeout deferral and passes with it. |
||
|---|---|---|
| .. | ||
| add-subtask-with-detail-panel-open.spec.ts | ||
| drag-task-into-subtask.spec.ts | ||
| finish-day-quick-history-with-subtasks.spec.ts | ||
| finish-day-quick-history.spec.ts | ||
| simple-subtask.spec.ts | ||
| task-list-start-stop.spec.ts | ||