Skip to content

Conversation

@tmlmt
Copy link
Owner

@tmlmt tmlmt commented Jan 30, 2026

Description

Improved unit conversion and quantity display with a new "best unit" algorithm that intelligently selects the most appropriate unit for displaying quantities. This enhancement makes recipes more readable by using natural units and fractions where appropriate.

Resolves: #52

Type of change

  • New feature (non-breaking change which adds functionality)
  • Enhancement (refactoring, style or performance improvement)
  • Documentation change (improvement to the Vitepress documentation or playground)

Breaking Changes

None. The changes maintain backward compatibility while improving the display of quantities.

How Has This Been Tested?

  • Added comprehensive unit tests for the new best unit algorithm
  • Added tests for fraction approximation and display
  • Verified existing recipe parsing tests pass with the new unit selection logic
  • Tested recipe scaling with various unit combinations

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 30, 2026

Copy link
Owner Author

tmlmt commented Jan 30, 2026

Merge activity

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

@tmlmt tmlmt merged commit d699250 into v3 Jan 30, 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.

1 participant