From 7647873fecc02567bb600c00a5f3045de6b402ae Mon Sep 17 00:00:00 2001 From: Legit003 Date: Tue, 28 Jul 2026 22:16:16 +0000 Subject: [PATCH] docs: add SearchInput tabular-nums documentation (GrantFox FWC26) Document font-variant-numeric: tabular-nums applied to amounts/counts in SearchInput. Covers implementation approach, affected elements, prop table, test coverage, accessibility notes, and browser support. Closes #740 --- docs/tabular-nums-search-input.md | 137 ++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 docs/tabular-nums-search-input.md diff --git a/docs/tabular-nums-search-input.md b/docs/tabular-nums-search-input.md new file mode 100644 index 0000000..1966032 --- /dev/null +++ b/docs/tabular-nums-search-input.md @@ -0,0 +1,137 @@ +# Tabular Numerals in SearchInput (GrantFox FWC26) + +## Summary + +`font-variant-numeric: tabular-nums` is applied to every amount and count +displayed in the `SearchInput` component. This ensures digits occupy a fixed, +equal-width cell so numeric values (result counts, status chip counts, monetary +amounts) do not shift surrounding layout when values update — for example, "1" +and "999" take the same horizontal space as a column. + +This is part of the GrantFox FWC26 campaign (Stellar Wave) UI/UX requirement +to align digits vertically across both light and dark themes. + +--- + +## Files changed + +| File | Change | +|------|--------| +| `src/pages/SearchInput.tsx` | Applied `font-variant-numeric: tabular-nums` via inline styles and `numeric-tabular tabular-nums` CSS classes to the container, input field, result count badge, amount badge, and all status chip count spans. | +| `src/styles/typography.css` | Contains the `.numeric-tabular` / `.tabular-nums` utility classes that provide the CSS property at the class level (imported globally via `main.tsx`). | +| `src/pages/SearchInput.test.tsx` | Added focused test suite `"Tabular-nums numeric displays (#740 / b#063)"` covering all numeric display elements. | + +--- + +## Where tabular-nums applies in SearchInput + +| Element | Mechanism | +|---------|-----------| +| `.search-input-container` wrapper | `className="numeric-tabular tabular-nums"` + `style={{ fontVariantNumeric: 'tabular-nums' }}` | +| `` text field | `className="search-input-field tabular-nums numeric-tabular"` + inline style | +| `search-amount-display` span | `className="search-input-amount tabular-nums numeric-tabular"` + inline style | +| `search-result-count` span | `className="search-input-result-count tabular-nums numeric-tabular"` + inline style | +| Each status filter chip `