From 3a11914fc5688560ce6d23116247edc076bfb7a5 Mon Sep 17 00:00:00 2001 From: Oier Bravo Urtasun Date: Tue, 14 Apr 2026 03:05:07 +0200 Subject: [PATCH] feat(lists+tasks): inline add-form at end of list, suggestions below input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UX change per direct user request: - Add-item / add-task form no longer sticks to the bottom of the viewport. It's now the last element of the unchecked/pending section, sitting just above the Checked/Completed section (option `a` of the review). - On /lists/[id] the frequency suggestion chips moved from ABOVE the input to BELOW it, forming a two-line block (input row on top, chips on the second line). Chips keep their responsive behavior — horizontal scroll on mobile, wrap on desktop (ItemSuggestions already handles that). - Empty-state message still shows when the list has no items; the form renders below it so you can add the first item without scrolling. - The form disappears while selection mode is active on /lists/[id] (selection chrome takes over the bottom). Implementation /lists/[id]/+page.svelte - Removed the `absolute bottom-0` sticky form block. - New `addItemForm` Svelte snippet rendered at the end of unchecked items AND in the empty-state branch, gated by `!selectionMode`. - ItemSuggestions moved inside the snippet, below the input. - pb-32 scroll padding reduced to pb-16/md:pb-6 (no more sticky overlapping the last row). /tasks/[id]/+page.svelte - Same treatment with an `addTaskForm` snippet (no suggestions). Tests All existing D- / T-UI- / selection tests pass unchanged: the locators are placeholder-based and the form is still findable regardless of placement. `data-testid="add-item-form"` / `"add-task-form"` added as future-proof hooks. Verification just test-all → exit 0, 233 green, 2 skipped. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/routes/(app)/lists/[id]/+page.svelte | 96 ++++++++++--------- .../src/routes/(app)/tasks/[id]/+page.svelte | 53 +++++----- 2 files changed, 79 insertions(+), 70 deletions(-) diff --git a/apps/web/src/routes/(app)/lists/[id]/+page.svelte b/apps/web/src/routes/(app)/lists/[id]/+page.svelte index f34e648..1b63d85 100644 --- a/apps/web/src/routes/(app)/lists/[id]/+page.svelte +++ b/apps/web/src/routes/(app)/lists/[id]/+page.svelte @@ -670,7 +670,7 @@ -
+
@@ -692,6 +692,7 @@

{m.list_items_empty()}

{m.list_items_empty_hint()}

+ {@render addItemForm()} {:else} {#if uncheckedItems.length > 0} @@ -823,6 +824,10 @@
{/if} + + {@render addItemForm()} + {#if checkedItems.length > 0}
@@ -945,54 +950,51 @@
{/if} - -
- - - - -
-
- - -
- -
-
+ + {#snippet addItemForm()} + {#if !selectionMode} +
+
+
+ + +
+ +
+ + +
+ {/if} + {/snippet} + {#if overlayItem}
{m.tasks_empty()}

{m.tasks_empty_hint()}

+ {@render addTaskForm()} {:else} {#if pendingTasks.length > 0} @@ -312,6 +313,9 @@ {/if} + + {@render addTaskForm()} + {#if completedTasks.length > 0}
@@ -358,27 +362,30 @@ {/if} - -
-
-
- -
- -
- + + + {#snippet addTaskForm()} +
+
+
+ +
+ +
+
+ {/snippet}