From b153ddf858347e96c468eafc8bdb961af2667540 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:06:00 -0500 Subject: [PATCH] feat: more shopping list enhancements (#2587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix new position calculataion * ensure consistent list item ordering * fix recipe ref overflow on small screens * added recipe ref elevation * tweaked line height (for long notes) * removed unused user dependency * remove old shopping list items when there's >100 * 🤷 * cleaned up function generator * fixed test * fix potential type error * made max position calc more efficient --- .../Recipe/RecipeIngredientListItem.vue | 2 +- .../components/Domain/Recipe/RecipeList.vue | 8 +- frontend/pages/shopping-lists/_id.vue | 15 +++- mealie/app.py | 1 + .../groups/controller_shopping_lists.py | 4 +- .../services/group_services/shopping_lists.py | 5 +- mealie/services/scheduler/tasks/__init__.py | 2 + .../delete_old_checked_shopping_list_items.py | 70 +++++++++++++++ ..._delete_old_checked_shopping_list_items.py | 90 +++++++++++++++++++ 9 files changed, 189 insertions(+), 8 deletions(-) create mode 100644 mealie/services/scheduler/tasks/delete_old_checked_shopping_list_items.py create mode 100644 tests/unit_tests/services_tests/scheduler/tasks/test_delete_old_checked_shopping_list_items.py diff --git a/frontend/components/Domain/Recipe/RecipeIngredientListItem.vue b/frontend/components/Domain/Recipe/RecipeIngredientListItem.vue index bde6e75ba5a3..0e16277fbb3d 100644 --- a/frontend/components/Domain/Recipe/RecipeIngredientListItem.vue +++ b/frontend/components/Domain/Recipe/RecipeIngredientListItem.vue @@ -54,7 +54,7 @@ export default defineComponent({ } .note { - line-height: 0.8em; + line-height: 1.25em; font-size: 0.8em; opacity: 0.7; } diff --git a/frontend/components/Domain/Recipe/RecipeList.vue b/frontend/components/Domain/Recipe/RecipeList.vue index 78f3c5e6b3b2..f4aac3012382 100644 --- a/frontend/components/Domain/Recipe/RecipeList.vue +++ b/frontend/components/Domain/Recipe/RecipeList.vue @@ -1,6 +1,12 @@