Skip to content

Demo controls for fmtQuantity lossless + null precision#873

Open
lbwexler wants to merge 2 commits into
developfrom
lossless-quantity-format
Open

Demo controls for fmtQuantity lossless + null precision#873
lbwexler wants to merge 2 commits into
developfrom
lossless-quantity-format

Conversation

@lbwexler

Copy link
Copy Markdown
Member

Wires up the Other › Format Numbers demo panel to exercise recent formatting changes from hoist-react.

Changes

  • Added lossless, useMillions, and useBillions switches, shown only when fmtQuantity is the selected formatter.
  • Added a null option to the precision picker, exercising fmtNumber's new full-precision handling.
  • Added two sample values (7,100,100 and 7,120,000) that demonstrate the lossless cutoff (7,100,100 stays full; 7,120,000 collapses cleanly to 7.12m).

Dependency

Depends on the lossless option added in the corresponding hoist-react PR. Run with inline hoist (or once a snapshot including it is published) to see the new behavior. Typecheck/lint pass against the current published snapshot since the options object is passed dynamically.

lbwexler added 2 commits June 24, 2026 13:24
…ormats demo

Wires up the Number Formats panel to exercise recent fmtNumber/fmtQuantity changes:

- `lossless`, `useMillions`, `useBillions` switches, shown only when `fmtQuantity` is selected.
- A `null` option on the precision picker, exercising `fmtNumber`'s full-precision handling.
- Two sample values (7,100,100 and 7,120,000) that demonstrate the lossless cutoff.

Depends on the `lossless` option from the corresponding hoist-react PR - run with inline
hoist (or a snapshot that includes it) to see the new behavior.
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