Skip to content

cook server - ingredients list does not render fractional quantity if a unit of measure is specified. #258

@melaniejones731

Description

@melaniejones731

What is the issue?

When ingredients are fractional, they are not rendered in the cook server UI if a unit of measure is specified

Image

Where can this issue be reproduced?

cook --version
cookcli 0.21.0 - in food we trust

How can this issue be reproduced?

I tried to attach a .cook file, but it was not a supported format by github.
Here is the content of the file I used:

---
title: Classic Chicken Salad Wraps with roasted potato wedges
servings: 4
prep_time: 35
time: 60
description: We love a fancy chicken salad, but there's always room in our hearts for the original. Stuff it into your favorite wraps for a quick, satisfying dinner that can also travel well for lunches or outings. Smarts The key to getting the creamy texture of classic, deli-style chicken salad is to finely chop the chicken and vegetables. If you prefer your chicken salad more on the chunky side, feel free to leave it in larger pieces.
diet: original
protein: ['Chicken, non-ground']
cuisine: ['American']
tags: ['Make Ahead']
rating: 5
course: dinner
source: Cook Smarts
---

== Ingredients for Classic Chicken Salad Wraps ==

@Rotisserie chicken{1/2}, bones removed and meat finely chopped (1 1/2 to 2 1/2 cups)
@Celery{2%stalks}, diced
@Onions, medium and red{1/2}, diced
@Mayonnaise{1/3%cup}
@Yogurt, plain or Greek{1/3%cup}
@Lemon juice{1%tsp}
@Mustard, Dijon{1%tsp}
@Dill, dried{1/2%tsp}
@Garlic powder{1/4%tsp}
@Black pepper{1/4%tsp}
@Lettuce, romaine{1%large heart}, thinly sliced
@Tomatoes, medium{1}, chopped
@Tortillas, burrito-sized{4}, (sub any flatbread or wraps)

== Ingredients for Roasted Potato Wedges ==

@Potatoes, russet{1%lb}, peeled (or not) and sliced into thin wedges
@Oil, cooking{2%Tbsp}
@Garlic powder{1%tsp}
@Salt{3/4%tsp}
@Paprika, smoked{1/2%tsp}
@Black pepper{1/4%tsp}

== Prep ==

Chicken - (Skip if prepped ahead for Tuesday.) - Remove meat from bones and chop. (Can be done up to 5 days ahead)

Celery [see video](https://vimeo.com/88029892) / Onions [see video](https://vimeo.com/85304971) - (If prepping right before cooking, get oven heating before continuing with prep.) Prep as directed and combine. (Can be done up to 5 days ahead)

Make dressing - #whisk together mayonnaise, yogurt, lemon juice, mustard, dill, garlic powder (portion for chicken salad), and pepper (portion for chicken salad). Taste and season with some salt and some additional pepper, if needed. (Can be done up to 5 days ahead)

Make chicken salad - In a large bowl, combine chicken, celery, and onions. Add dressing and toss everything together until evenly mixed. Taste and adjust seasonings, if needed. (Can be done up to 5 days ahead)

Potatoes [see video](https://vimeo.com/74259310) - Slice potatoes into thin wedges.

== Make ==

Heat oven to 400F / 204C degrees.

Place a wire rack over a #sheet pan{}. Toss potato wedges with cooking oil and then season with garlic powder (portion for potatoes), salt, paprika, and pepper (portion for potatoes). Spread potatoes out on the wire rack so that none of the potatoes are touching.

Roast potato wedges until tender and golden brown, 30 to 35 minutes.

While potatoes are roasting, slice the lettuce and chop the tomatoes. Set out tortilla wraps.

If chicken salad was made ahead of time, give it a stir.

When potatoes are nearly done, assemble wraps. Lay tortillas out onto a clean work surface. Spread chicken salad down the center and top with lettuce and tomatoes. Roll up the tortilla, tucking the sides in as you go. Repeat with remaining wraps.

Slice wraps in half and serve with roasted potato wedges on the side. Feel free to include any dipping sauces you like. Enjoy!


> **Community Reviews:**
> Original: 5★ (21)
> Gluten-free: 4★ (3)
> Paleo: 0★ (0)
> Vegetarian: 4★ (5)

> **Nutrition Facts:**
> Calories: 607
> Total Fat: 25g / 38% dv
> Saturated Fat: 6g / 28% dv
> Cholesterol: 114mg / 38% dv
> Sodium: 1268mg / 53% dv
> Total Carbohydrate: 58g / 19% dv
> Dietary Fiber: 8g / 31% dv
> Sugars: 8g
> Protein: 41g

To reproduce the issue:

(assumes you have installed cook cli)

  1. from commandline in directory including above file, issue cook server
  2. navigate to localhost, select the recipe, and add to shopping list
  3. navigate to shopping list
  4. observe that the quantity of fractional ingredients that include a unit (such as dill, mayonnaise) are not rendered
  5. observe that the quantity of fractional ingredients that do not include a unit (such as chicken, onion), are appropriately rendered

A separate issue is observed with the cook shopping-list command:

Black pepper             0.5 tsp <- user would expect 0.25 tsp or 1/4 tsp
Celery                   2 stalks
Dill, dried              1/2 tsp
Garlic powder            1.25 tsp <- user would expect 1/4 tsp
Lemon juice              1 tsp
Lettuce, romaine         1 large heart
Mayonnaise               1/3 c
Mustard, Dijon           1 tsp
Oil, cooking             2 Tbsp
Onions, medium and red   0.5
Paprika, smoked          1/2 tsp
Potatoes, russet         1 lb
Rotisserie chicken       0.5
Salt                     3/4 tsp
Tomatoes, medium         1
Tortillas, burrito-sized 4
Yogurt, plain or Greek   1/3 c

Note Ingredients "Black Pepper" and "Garlic Powder" are both fractional ingredients that appear next to each other in my list. They are listed after dill, which renders correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions