Skip to content

Conversation

Mrigakshi-Rathore
Copy link
Contributor

@Mrigakshi-Rathore Mrigakshi-Rathore commented Oct 4, 2025

  • Fixed small quantity conversion for vanilla extract, baking powder, and salt
  • Updated conversion database with correct gram values per teaspoon
  • Improved ingredient parsing logic for fractions and mixed numbers
  • Added proper imperial unit conversion system
  • Enhanced error handling and user feedback

Description

Fixes the "Ambiguous Measurement" error that was occurring when converting recipes with small quantities. Small ingredients like vanilla extract, baking powder, and salt were showing 0g instead of proper gram values.

Changes Made

  • Fixed conversion logic for small quantities (vanilla, baking powder, salt)
  • Updated conversion database with correct gram values per teaspoon
  • Improved ingredient parsing for fractions and mixed numbers
  • Added proper imperial unit conversion
  • Enhanced error handling and user feedback

Testing Verified

✅ Vanilla extract: 1 tsp → 4.2g (was 0g)
✅ Baking powder: 1 tsp → 4.8g (was 0g)
✅ Salt: 1/4 tsp → 1.4g (was 0g)
✅ All other ingredients maintain correct conversions

Files Modified

  • assets/js/convert.js - Complete conversion logic overhaul

Closes #823

Screenshot:

BEFORE:
https://github.com/user-attachments/assets/363fc1bf-84cc-49b8-8b71-f12ce696f099

AFTER:
https://github.com/user-attachments/assets/363be0e0-7fd6-43f5-9cad-dadb305f3319

- Fixed small quantity conversion for vanilla extract, baking powder, and salt
- Updated conversion database with correct gram values per teaspoon
- Improved ingredient parsing logic for fractions and mixed numbers
- Added proper imperial unit conversion system
- Enhanced error handling and user feedback
Copy link

github-actions bot commented Oct 4, 2025

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@supriya46788 supriya46788 merged commit e3fc203 into supriya46788:main Oct 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Disclaimer / Accuracy Notice Page

2 participants