nextcloud / nextcloud/cookbook

Automatically round ingredient amounts to useful precision

Open
#1,390 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
HTML
Stars
641
Forks
113
Avg merge
21h 31m
Merged PRs (30d)
26

Description

Description
Recipe pulled from URL shows long floating point values for ingredients

Reproduction
Steps to reproduce the behavior:

  1. add recipe from URL: https://www.allrecipes.com/recipe/246195/chef-johns-homemade-eggnog/

Expected behavior
Should either display "0.3 Cups" or "1/3 Cup" for sugar

Actual behavior
Ingredients list shows 0.33333334326744 cups of sugar

Screenshots
image

Browser
1.46.144 Chromium: 108.0.5359.128 (Official Build) (64-bit)

Versions
Nextcloud server version: 25.0.2
Cookbook version: 0.10.1
Database system: MySQL


Depends on #116

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the recipe import and ingredient-list display paths for the reproduced Allrecipes recipe; the payload does not name specific files or tests. Done means the sugar amount is shown with useful precision, such as 0.3 Cups or 1/3 Cup, rather than 0.33333334326744 cups, while accounting for dependency #116.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.