Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Toggle display of ingredient references in recipe instructions #1268

Merged
merged 4 commits into from
Jul 10, 2022

Conversation

Miroito
Copy link
Contributor

@Miroito Miroito commented May 24, 2022

Feature Description

  • A new button has been added to the RecipeInstructions component to toggle the display of linked ingredients to steps.
  • The new button is only visible if at least one step contains at least one linked ingredient. It is otherwise hidden.

@hay-kot
Copy link
Collaborator

hay-kot commented Jun 2, 2022

Thanks for giving this a go. I think I'd rather integrate the "Cook" button into the recipe page instead of what you've done here.

I've outlined what I was thinking in a new Task

What do you think?

@Miroito
Copy link
Contributor Author

Miroito commented Jun 2, 2022

What do you think?

I answered in the task.

tldr; I think the cook button needs a change but not sure how it should look like. The rest I can start already

@hay-kot
Copy link
Collaborator

hay-kot commented Jun 2, 2022

What do you think?

I answered in the task.

tldr; I think the cook button needs a change but not sure how it should look like. The rest I can start already

I think you could just toggle the text between "Cook" and "View" ?

We can always change what look of the button based on user feedback.

@Miroito Miroito force-pushed the ing-ref branch 3 times, most recently from 0294651 to 0542869 Compare June 13, 2022 17:13
@Miroito
Copy link
Contributor Author

Miroito commented Jul 3, 2022

Changes

  • Cook mode is no longer its own page.
  • The button only appears if there is at least one ingredient linked to any instruction step.
  • Cook mode hides everything other than the header and the recipe instructions, additionally, it displays linked ingredients under the instructions if any.

Preview

Cook mode off

image

Cook mode on

image

@hay-kot
Copy link
Collaborator

hay-kot commented Jul 10, 2022

Looks great, made a few small styling changes to increase padding and added support for scaling while in cook mode. Great work and thank you for your patience! 🙏

@hay-kot hay-kot merged commit c64da1f into mealie-recipes:mealie-next Jul 10, 2022
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.

2 participants