Skip to content

fix: render name labels with proportional figures, not tabular (OK-57876)#12443

Closed
PatrickChoo wants to merge 2 commits into
OneKeyHQ:xfrom
PatrickChoo:fix/no-tnum-on-name-labels
Closed

fix: render name labels with proportional figures, not tabular (OK-57876)#12443
PatrickChoo wants to merge 2 commits into
OneKeyHQ:xfrom
PatrickChoo:fix/no-tnum-on-name-labels

Conversation

@PatrickChoo

@PatrickChoo PatrickChoo commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes OK-57876. Since #12391 made tabular figures (tnum) the app-wide default, user-facing names render with tabular digits — which is wrong for names.

Roobert's tabular 1 is a different glyph: to fill the wider tabular advance it nearly doubles in width (23.3px → 45.4px at 72px) and gains a foot serif. In an account name like A1787 or a wallet name like OneKey Pro2-1-6, that reads as a typo rather than a name.

Tabular figures exist to align columns of ticking numeric data. A name is an identifier, not data — so names now opt out via fontVariant={PROPORTIONAL_NUMS} (the escape hatch shipped with the default).

The rule

  • Numeric data (balances, prices, amounts, percentages, counts) → stays tabular. Unchanged.
  • Names / identifiers / prose (account, wallet, device, address-book, market category, marketing copy) → proportional.

Tabular is for digits that sit in a column and tick. Everything a human reads as words gets the font's natural figures.

Changes

Component layer (the choke-points):

  • ListItem: the primary/title text now defaults to proportional. A list item's title is a name; its secondary is where numeric data lives, and that stays tabular. This covers many lists in one place. Callers can still override via primaryTextProps.
  • Badge.Text: previously hard-coded tabular and silently dropped the fontVariant prop (it is styled from raw tamagui text). It now honors fontVariant (default stays tabular), so a badge holding a name can opt out.

Name render sites (account + wallet names, incl. the ones that pass an element-form primary and therefore bypass the ListItem default):

  • Account: AccountSelectorAccountListItem (the reported A1787), AccountRenameButton, AddressListItem, UniversalSearchAddressItem
  • Wallet: WalletListItem (the wallet rail, incl. Hidden #1), WalletRenameButton, DeviceInfoCard, DeviceManagementListModal
  • Triggers: AccountSelectorTriggerBase, AccountSelectorTriggerDApp
  • Badges: AddressInfo, AddressInput (wallet/account name + address-book name)

Content names & prose:

  • CategoryFilterItem — market category chips (Test 0702, Mag 7, Crude Oil). Shared, so it covers the market / perps / stock category selectors at once.
  • MarketBannerItem — banner title only. The % change rendered right under it is data and stays tabular.
  • SwapProviderListPanel — marketing copy (hero lines, description, the 400+ DEXs / 20+ Chains / 24/7 badges).

Verification

  • tsgo --noEmit: 0 errors. oxlint --type-aware --deny-warnings on all 17 files: clean.
  • Glyph confirmed by rendering the shipped Roobert-Regular.ttf directly in both variants: the tabular 1 nearly doubles in width and gains a foot serif; the proportional 1 does not.
  • Live web probes confirm the split holds:
    • Market: Test 0702, AI Tech, Mag 7, Crude Oil → proportional; +0.27%, -3.10%, 10x → still tabular.
    • Swap: Find the best rate, 400+ DEXs, 20+ Chains → proportional; $0.00 balances → still tabular.
    • Settings (ListItem titles): Language, Default currency, Theme → proportional.

@PatrickChoo

Copy link
Copy Markdown
Collaborator Author

Superseded by #12452, which inverts the tabular-numerals default instead of patching each surface. Under that change names (OK-57876), addresses, prose, inputs and hero numbers are all correct with zero annotations, so the opt-outs this PR added are no longer needed.

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