From e71b31e9cc1f9eea4e87e533bf612891ba36d505 Mon Sep 17 00:00:00 2001 From: miah <144297490+miah120@users.noreply.github.com> Date: Mon, 4 May 2026 11:15:01 -0500 Subject: [PATCH] feat: Improve add shopping list item form (#7091) Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Michael Genson --- .../ShoppingList/ShoppingListAddItemForm.vue | 105 +++++++++ .../Domain/ShoppingList/ShoppingListItem.vue | 1 + .../ShoppingList/ShoppingListItemDetails.vue | 85 +++++++ .../ShoppingList/ShoppingListItemEditor.vue | 208 +++++------------- .../app/components/global/InputLabelType.vue | 13 +- .../use-shopping-list-item-editor.ts | 54 +++++ frontend/app/lang/messages/en-US.json | 1 + frontend/app/pages/shopping-lists/[id].vue | 31 ++- 8 files changed, 331 insertions(+), 167 deletions(-) create mode 100644 frontend/app/components/Domain/ShoppingList/ShoppingListAddItemForm.vue create mode 100644 frontend/app/components/Domain/ShoppingList/ShoppingListItemDetails.vue create mode 100644 frontend/app/composables/shopping-list-page/use-shopping-list-item-editor.ts diff --git a/frontend/app/components/Domain/ShoppingList/ShoppingListAddItemForm.vue b/frontend/app/components/Domain/ShoppingList/ShoppingListAddItemForm.vue new file mode 100644 index 000000000..ba2c4d71b --- /dev/null +++ b/frontend/app/components/Domain/ShoppingList/ShoppingListAddItemForm.vue @@ -0,0 +1,105 @@ + + + diff --git a/frontend/app/components/Domain/ShoppingList/ShoppingListItem.vue b/frontend/app/components/Domain/ShoppingList/ShoppingListItem.vue index 91133c5bd..2664e07eb 100644 --- a/frontend/app/components/Domain/ShoppingList/ShoppingListItem.vue +++ b/frontend/app/components/Domain/ShoppingList/ShoppingListItem.vue @@ -145,6 +145,7 @@ :labels="labels" :units="units" :foods="foods" + class="ma-2" @save="save" @cancel="toggleEdit(false)" @delete="$emit('delete')" diff --git a/frontend/app/components/Domain/ShoppingList/ShoppingListItemDetails.vue b/frontend/app/components/Domain/ShoppingList/ShoppingListItemDetails.vue new file mode 100644 index 000000000..18f5899e2 --- /dev/null +++ b/frontend/app/components/Domain/ShoppingList/ShoppingListItemDetails.vue @@ -0,0 +1,85 @@ + + + diff --git a/frontend/app/components/Domain/ShoppingList/ShoppingListItemEditor.vue b/frontend/app/components/Domain/ShoppingList/ShoppingListItemEditor.vue index 34d461c0f..cfd8bd053 100644 --- a/frontend/app/components/Domain/ShoppingList/ShoppingListItemEditor.vue +++ b/frontend/app/components/Domain/ShoppingList/ShoppingListItemEditor.vue @@ -1,112 +1,60 @@ diff --git a/frontend/app/components/global/InputLabelType.vue b/frontend/app/components/global/InputLabelType.vue index 89dde7dc9..74fc6e462 100644 --- a/frontend/app/components/global/InputLabelType.vue +++ b/frontend/app/components/global/InputLabelType.vue @@ -7,12 +7,15 @@ item-title="name" return-object :items="filteredItems" - :prepend-icon="icon || $globals.icons.tags" + :prepend-inner-icon="icon || (search ? $globals.icons.search : $globals.icons.tags)" + :menu-icon="search ? '' : undefined" + :rounded="search ? true : '4px'" + :custom-filter="() => true" + :variant="search ? 'solo-filled' : undefined" + color="primary" auto-select-first clearable - color="primary" hide-details - :custom-filter="() => true" @keyup.enter="emitCreate" >