From 50a92c165cc93f35b941fac5e903287a72499cc7 Mon Sep 17 00:00:00 2001 From: Hugo van Rijswijk Date: Mon, 21 Aug 2023 17:32:09 +0200 Subject: [PATCH] feat: improve readability of ingredients list (#2502) * feat: improve readability of notes in ingredients list Makes the notes in the ingredients list more readable by making them slightly opaque. This creates a better visual separation between the notes and the rest of the ingredient. * Use server display if available * Move note to newline and make quantity more distinct * Use safeMarkdown for shopping list * Use component * Wrap unit in accent color * Update RecipeIngredientListItem to set food in bold --- .../Domain/Recipe/RecipeContextMenu.vue | 14 +++-- .../Recipe/RecipeIngredientListItem.vue | 58 +++++++++++++++++++ .../Domain/Recipe/RecipeIngredients.vue | 20 +++---- .../Domain/ShoppingList/ShoppingListItem.vue | 5 +- frontend/composables/recipes/index.ts | 2 +- .../recipes/use-recipe-ingredients.test.ts | 42 ++++++++++++++ .../recipes/use-recipe-ingredients.ts | 24 ++++++-- 7 files changed, 140 insertions(+), 25 deletions(-) create mode 100644 frontend/components/Domain/Recipe/RecipeIngredientListItem.vue create mode 100644 frontend/composables/recipes/use-recipe-ingredients.test.ts diff --git a/frontend/components/Domain/Recipe/RecipeContextMenu.vue b/frontend/components/Domain/Recipe/RecipeContextMenu.vue index a5016bd753db..32ad0fb1e4f7 100644 --- a/frontend/components/Domain/Recipe/RecipeContextMenu.vue +++ b/frontend/components/Domain/Recipe/RecipeContextMenu.vue @@ -114,7 +114,10 @@ color="secondary" /> - + @@ -168,13 +171,13 @@ + diff --git a/frontend/components/Domain/Recipe/RecipeIngredients.vue b/frontend/components/Domain/Recipe/RecipeIngredients.vue index 18120934d01d..f69d6ab2c731 100644 --- a/frontend/components/Domain/Recipe/RecipeIngredients.vue +++ b/frontend/components/Domain/Recipe/RecipeIngredients.vue @@ -11,7 +11,7 @@ - + @@ -21,12 +21,12 @@ " }); + + expect(parseIngredientText(ingredient, false)).not.toContain("