openfoodnetwork icon indicating copy to clipboard operation
openfoodnetwork copied to clipboard

[BUU] Change unit number and unit display

Open mariocarabotta opened this issue 1 year ago • 1 comments

Screenshot 2024-03-13 at 3 19 38 pm | Screenshot 2024-03-13 at 3 22 06 pm

  • on click show overlay with numeric field pre-selected
  • if display unit is empty, show placeholder as {number}{unit scale abbreviation}
  • if item is selected in unit scale, show placeholder as {number} {item label}
  • "display unit as" optional field
  • if "display unit as" is filled, once clicking outside, display it in the column (rather than the numeric value)

🎨 Design prototype: Units - Product List

mariocarabotta avatar Jun 19 '23 01:06 mariocarabotta

estimate: 2 days

mariocarabotta avatar Feb 20 '24 04:02 mariocarabotta

Estimate updated to 4 days.

I've done some more digging and discovered another feature in the current screen. I'll implement these technical requirements:

When product weight/volume/items is selected (variant_unit_with_scale):

  1. Update hidden product fields variant_unit and variant_unit_scale based on dropdown selection (variant_unit_with_scale). See bulk_product_update_spec.js.coffee#L503
  2. Variant display_as placeholder is updated by OptionValueNamer using onscreen variant/product data. See ofnDisplayAs

When a variant unit value is updated (unit_value_with_description):

  1. Update hidden variant fields unit_value and unit_description from text field (unit_value_with_description). See bulk_product_update_spec.js.coffee#L564

dacook avatar Mar 18 '24 04:03 dacook