Skip to content

Conversation

@tmlmt
Copy link
Owner

@tmlmt tmlmt commented Jan 16, 2026

Description

Refactored the ingredient quantity data structure to simplify and improve consistency. This change replaces the nested groupQuantity property with direct properties on the IngredientQuantityGroup interface, making it extend QuantityWithPlainUnit. Similarly, renamed alternativeQuantities to quantities in the AlternativeIngredientRef interface for better clarity.

The PR updates all component templates to use the new structure, including proper property access in IngredientItem.vue, QuantityWithEquivalents.vue, and StepContent.vue. The type guard isSimpleGroup now checks for the presence of a quantity property instead of groupQuantity.

Related Issue: N/A

Type of change

  • Enhancement (refactoring, style or performance improvement)

Breaking Changes

This change flattens the ingredient quantity data structure:

  • IngredientQuantityGroup now extends QuantityWithPlainUnit instead of containing it
  • groupQuantity property is removed, with its properties moved to the parent object
  • alternativeQuantities is renamed to quantities in AlternativeIngredientRef

How Has This Been Tested?

  • Existing unit tests have been updated to use the new structure
  • All tests pass with the refactored code
  • Manual testing of the components in the playground

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have run pnpm lint and my changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Copy link
Owner Author

tmlmt commented Jan 16, 2026

Copy link
Owner Author

tmlmt commented Jan 16, 2026

Merge activity

  • Jan 16, 1:04 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jan 16, 1:04 AM UTC: @tmlmt merged this pull request with Graphite.

@tmlmt tmlmt merged commit e73cbd0 into v3 Jan 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants