Skip to content

feat: apply tabular-nums to amounts/counts in MarketplacePage (FWC26) - #840

Open
obafemimathew01-hue wants to merge 1 commit into
CalloraOrg:mainfrom
obafemimathew01-hue:feat/tabular-nums-marketplace-fwc26
Open

feat: apply tabular-nums to amounts/counts in MarketplacePage (FWC26)#840
obafemimathew01-hue wants to merge 1 commit into
CalloraOrg:mainfrom
obafemimathew01-hue:feat/tabular-nums-marketplace-fwc26

Conversation

@obafemimathew01-hue

Copy link
Copy Markdown

Apply font-variant-numeric: tabular-nums to amounts/counts in MarketplacePage (GrantFox FWC26)

Summary

Digits in the Marketplace count bar ("Showing 1–12 of 47 APIs") and the mobile Filters badge
were rendered with proportional numerals, causing the label to shift width as the user pages
through results or applies filters. This PR locks all visible counts to fixed-width (tabular)
numerals so the layout stays stable.

Changes

src/styles/typography.css

  • .numeric-tabular / .tabular-nums — canonical utility class sets font-variant-numeric:
    tabular-nums
  • .marketplace-count — belt-and-suspenders container rule; any future numeric descendant is
    automatically tabular without needing an explicit class
  • .marketplace-filter-badge — fixes the mobile active-filter count badge so single- and
    double-digit counts don't shift the button width

src/pages/MarketplacePage.tsx

  • Each digit in the "Showing X–Y of N APIs" label is wrapped in
  • The mobile Filters badge carries both marketplace-filter-badge and numeric-tabular

src/pages/MarketplacePage.test.tsx

  • New "MarketplacePage tabular-nums (FWC26)" describe block with 6 focused regression tests
    covering: span presence, digit-only content, zero-result empty state, container class
    integrity, badge class, and badge aria-label semantics

Testing

All 27 MarketplacePage tests pass (vitest run). No new TypeScript errors introduced.

Accessibility

Change is purely typographic — no colour, contrast, or interactive behaviour is affected.
Tabular numerals are supported by all modern browsers and do not impact screen reader output.

Closes #720

- Add font-variant-numeric: tabular-nums to .numeric-tabular, .tabular-nums,
  .marketplace-count, and .marketplace-filter-badge in typography.css
- Wrap all digit spans in MarketplacePage count bar with .numeric-tabular
- Add marketplace-filter-badge + numeric-tabular classes to mobile filter badge
- Add focused FWC26 regression test suite in MarketplacePage.test.tsx

Closes #FWC26
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.

Add tabular-nums to numeric displays on MarketplacePage [b#043]

1 participant