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

feat: Default To Fractions When Unit Is Empty #3587

Conversation

michael-genson
Copy link
Collaborator

What type of PR is this?

(REQUIRED)

  • feature

What this PR does / why we need it:

(REQUIRED)

Units decide whether a quantity should use a fraction or a decimal. If there is no unit, we default to decimal. I can't think of a single situation where we would prefer this. Here are some examples where we prefer a fraction:

  • 1/2 onion
  • 3 1/2 chicken breasts
  • 1/4 tomato

This PR makes fractions the default, unless specified by the unit.

Which issue(s) this PR fixes:

(REQUIRED)

Closes #3582

Testing

(fill-in or delete this section)

I added a backend and frontend test to check for this scenario, and manually verified in the app.

@michael-genson michael-genson force-pushed the feat/default-to-fractions-when-unit-is-null branch from 741c221 to d97c973 Compare May 11, 2024 20:46
@michael-genson michael-genson merged commit c82549c into mealie-recipes:mealie-next May 12, 2024
10 checks passed
@michael-genson michael-genson deleted the feat/default-to-fractions-when-unit-is-null branch May 12, 2024 19:15
boc-the-git pushed a commit to boc-the-git/mealie that referenced this pull request May 23, 2024
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
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.

[BUG] - Fractions of ingredient quantities less than 1 aren't displayed when no unit is selected
2 participants