Skip to content

feat(measures): Rav Chaim Naeh, volume measures (revi'is–kor) and metric units - #772

Open
WildHagai wants to merge 1 commit into
kdroidFilter:masterfrom
WildHagai:feat/measures-naeh-volume-metric
Open

WildHagai wants to merge 1 commit into
kdroidFilter:masterfrom
WildHagai:feat/measures-naeh-volume-metric

Conversation

@WildHagai

Copy link
Copy Markdown

What changed

  • Adds Rav Chaim Naeh (גר״ח נאה) as an amma opinion: etzba 2 cm, so amma 48 cm and mil 960 m. Opinions are listed smallest amma first.
  • Adds a length/volume switch to the card. Volume units: רביעית, לוג, קב, סאה, איפה, כור. Each opinion's revi'it is its etzba cubed (2×2×2.7 cubic etzbaos): Naeh 86.4 ml, Chazon Ish about 152 ml. The Igros Moshe is left out of volume, because R' Moshe's revi'it is a separate ruling and does not follow from his amma.
  • Adds metric units to the picker: mm, cm, m, km, ml and liter. Between a Torah unit and a metric one, the main result is a range over the opinions shown, with one row per opinion.
  • An opinion added after a user saved their choices is shown until they untick it, through a new offered setting.
  • Fixes a startup loop between MeasuresWidget and MeasuresSettings, where each needed the other before it existed. The loop predates this PR; the new tests exposed it.
  • The default card is 5 grid rows tall instead of 4, to fit the extra opinion row.

Sources (each line index checked against the library text)

  • Naeh's 2 cm etzba: קיצור שו״ע ילקוט יוסף, או״ח תרל, ד
  • Revi'it = 2×2×2.7 etzbaos: פסחים קט, א
  • Se'ah = 6 kav, kav = 4 log, log = 4 revi'it: רמב״ם עירובין א, יג
  • Kor = 30 se'ah = 10 eifa: רמב״ם ערכין ד, ד

All figures are cited.

Please check: the Yalkut Yosef citation uses the book title as it appears in the library file (קיצור שע ילקוט יוסף החדש - אורח חיים, with no quote mark). It's worth opening that citation once in the app to confirm the database stores the title the same way.

Tests

  • MeasuresTest: 12/12 pass. They cover volume conversions, revi'it per opinion, metric conversions, number formatting, the setting for newly added opinions, and card height.
  • ktlintCheck passes.

🤖 Generated with Claude Code

- Rav Chaim Naeh as an amma opinion (etzba 2 cm, amma 48 cm), cited from
  Kitzur Shulchan Aruch Yalkut Yosef, OC 630:4.
- A length/volume switch. Volumes: revi'is, log, kav, se'ah, eifah, kor
  (Rambam Eruvin 1:13, Arachin 4:4). Each opinion's revi'is is its etzba
  cubed times 2x2x2.7 (Pesachim 109a): Naeh 86.4 ml, Chazon Ish ~152 ml.
  The Igros Moshe is left out of volumes, since R' Moshe's revi'is is not
  derived from his amma.
- Metric units in the picker: mm, cm, m, km and ml, liter. Between Torah
  and metric units the result is a range over the opinions shown.
- An opinion added after the user saved a choice is shown until unticked.
- Fix an init cycle between MeasuresWidget and MeasuresSettings.

Signed-off-by: Chagai Yisroel Wild <wildhagai@puzzlesoft.co.il>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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