openfoodfoundation / openfoodnetwork

Connect suppliers, distributors and consumers to trade local produce.
https://www.openfoodnetwork.org
GNU Affero General Public License v3.0
1.11k stars 718 forks source link

Products listed with units of 'items' not displaying consistently #9160

Open lbwright22 opened 4 years ago

lbwright22 commented 4 years ago

Description

A product is listed with units = items. Units given to the variants of this product are highly dependent on exact nomenclature in the variant 'unit' column. This is confusing to shop managers and looks messy to customers. See slack thread: https://openfoodnetwork.slack.com/archives/CDLKH9MM0/p1598430113019800

Expected Behavior

Example Strawberry Jam: Product units = 'items' with name 'jar' Variant units = '250' Displays as '250 jars' Variant units = '250 g' displays as '250 g jar' Variant units = '250g' displays as '250g jar'

Actual Behaviour

Example Strawberry Jam: Product units = 'items' with name 'jar' Variant units = '250' Displays as '250 jars' Variant units = '250 g' displays as '250 jars g' Variant units = '250g' displays as '250g'

Steps to Reproduce

  1. Set up product with units = 'items' and give the item a name
  2. For the variants of this product enter in units = number only
  3. For variants of this product enter in units = number_space_letter
  4. For variants of this product enter in units = number_no_space_letter
  5. View how each of options 2-4 display on display as box in product listing, shop front, order listing, order cycle

Animated Gif/Screenshot

items_space items_display items_noletter items_nospace items_oc items_order

Workaround

Severity

S5

Your Environment

Possible Fix

Erioldoesdesign commented 4 years ago

Design perspective: Agree that in this example the best legible example is '250g jar'

Anything that avoids plurals like: jars because essentially we want customers to be certain they are buying 1 jar of jam that is 250g weight.

I would also avoid something like '250 g jar' mostly because the space would mean a screenreader for sight-impaired (blind) folks would put a longer pause in between reading aloud '250' and 'g'.

Curious to know if this is a problem when you have different weight measurements 🤔

A general design rule is that all info that is reliant on other info to understand context should be close together :)

guidoDutra commented 3 years ago

Looking at the product edit page (/admin/products) it seems like the problem is in the unit value field formatting rather than the unit size (unit category, such as Weight (g), Volume (L), or Items). I think the VALUE field is meant to be used only for numbers (quantity of units), and should not include "g" or any other value. See below screenshot:

image

See that the same issue happens with any unit, the only difference being that if you set "100g" for an item whose untit is "g" the first "g" suffixing the number will be parsed out.

My suggestion would be to contrain the unit amount input to only accept numbers. What do you guys think?

Erioldoesdesign commented 3 years ago

I think this needs some user testing and insight to test what user expectations are acceptable for correcting field inputs and suggested field input help text

BackendDev-Auction commented 3 years ago

hey , want to give a shot at this, though the last comment suggests we dont exactly know what needs to be done? Does this require further user testing, or should I resolve using issue description?

RachL commented 3 years ago

@BackendDev-Auction Thank you very much for drawing attention here. Apologies for the late answer :( You are right that this needs a better specification. We will work on it and put it back on the board. Maybe best if you can pick up another issue in the meantime?

RachL commented 2 years ago

Transferring this to BUU epic: we need to look at this within BUU work.

RachL commented 4 months ago

FYI this is still the case with the new UI