nextcloud / nextcloud/cookbook
Fix unicode fraction conversion
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 641
- Forks
- 113
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 26
Description
Description
When using unicode fractions, the web UI reports the ingredient to not be parsable but in fact it is parsable and correctly calculated.
Reproduction
Steps to reproduce the behavior:
- Create or edit a recipe
- Add an ingredient with a unicode fraction, e.g. ¾
- Save and view the recipe
- Change the recipe yield to trigger recalculation
Expected behavior
No warning is shown to the user
Actual behavior
A warning sign is shown to the user indicating a problem with the calculation (see screenshots).
Screenshots
After changing the yield amount:
Browser
Firefox
Versions
Nextcloud server version: 30
Cookbook version: 0.11.1
Database system: MySQL
Maybe @Weissnix4711 or @j0hannesr0th, can you have a look at this? Ideally, I would say that the same Regex is used to check and to do the actual calculation to avoid such conflicts. That would mean some restructuring but should be managable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the ingredient parsing, warning display, and recalculation paths described in the reproduction, then compare how unicode fractions are validated and calculated. Reproduce the issue with ¾ and changing the recipe yield. Done means the valid ingredient recalculates without showing a warning.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100