Skip to content

feat: add user setting to show ingredient notes inline#4704

Open
guguinhaaax wants to merge 1 commit into
TandoorRecipes:developfrom
guguinhaaax:feature/show-ingredient-notes-inline
Open

feat: add user setting to show ingredient notes inline#4704
guguinhaaax wants to merge 1 commit into
TandoorRecipes:developfrom
guguinhaaax:feature/show-ingredient-notes-inline

Conversation

@guguinhaaax

Copy link
Copy Markdown

Fixes #455

Previously, ingredient notes were hidden behind a tooltip icon requiring a hover or tap to view. This made notes hard to discover and inconvenient to use, especially on mobile devices or while cooking.

This PR adds a new user preference show_ingredient_notes that allows users to choose whether ingredient notes are displayed inline (below the ingredient) or as a tooltip (previous behavior).

Changes:

  • cookbook/models.py: added show_ingredient_notes BooleanField (default=True)
  • cookbook/migrations/0243_userpreference_show_ingredient_notes.py: migration for new field
  • cookbook/serializer.py: exposed show_ingredient_notes in UserPreferenceSerializer
  • vue3/src/components/display/IngredientsTable.vue: render note inline when setting is enabled, tooltip otherwise
  • vue3/src/components/settings/CosmeticSettings.vue: added checkbox to toggle the setting
  • vue3/src/locales/en.json: added translation strings for the new setting

Fixes TandoorRecipes#455

Previously, ingredient notes were hidden behind a tooltip icon requiring
a hover or tap to view. This made notes hard to discover and inconvenient
to use, especially on mobile devices or while cooking.

This PR adds a new user preference `show_ingredient_notes` that allows
users to choose whether ingredient notes are displayed inline (below the
ingredient) or as a tooltip (previous behavior).

Changes:
- cookbook/models.py: added `show_ingredient_notes` BooleanField (default=True)
- cookbook/migrations/0243_userpreference_show_ingredient_notes.py: migration for new field
- cookbook/serializer.py: exposed `show_ingredient_notes` in UserPreferenceSerializer
- vue3/src/components/display/IngredientsTable.vue: render note inline when setting is enabled, tooltip otherwise
- vue3/src/components/settings/CosmeticSettings.vue: added checkbox to toggle the setting
- vue3/src/locales/en.json: added translation strings for the new setting
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ingredient Notes Rework

3 participants