Skip to content

Sync EdgeText's shrink floor with edge-login-ui-rn - #6343

Merged
peachbits merged 1 commit into
developfrom
matthew/edgetext-min-font-parity
Nov 18, 2026
Merged

peachbits merged 1 commit into
developfrom
matthew/edgetext-min-font-parity

Conversation

@peachbits

Copy link
Copy Markdown
Contributor

Description

Brings EdgeText's shrink-to-fit floor back in sync with edge-login-ui-rn, whose EdgeText must match this one. login-ui ported the floor from here in EdgeApp/edge-login-ui-rn#312, and its review reworked it:

  • DEFAULT_MINIMUM_FONT_SCALE (0.65) is exported instead of repeating 0.65.
  • EdgeText only computes minimumFontSize when the text is allowed to shrink. Text with shrinking off no longer carries a floor it never uses.
  • UnscaledText defaults minimumFontScale to 0.65 and floors whenever it shrinks. Before, it only floored when the caller passed a scale.
  • The doc comment covers the 4pt (iOS) and 4dp (Android) defaults, how Android applies the floor to nested text runs, and that React Native 0.89 makes the floor and patches/react-native+0.86.0.patch unnecessary.

The only visible behavior change: FiatIcon and CryptoIcon shrink their fallback symbol text without a minimumFontScale, so it could shrink down to React Native's 4pt/4dp floor and now stops at 65%. The longest fiat symbols (for example د. م., Nfk, ден) need roughly 80% or more at the icon's font size, so they shouldn't be affected. That estimate is from the font sizes, not checked on a device.

Snapshots gain minimumFontScale={0.65} on UnscaledText and drop minimumFontSize where shrinking is off.

Tested: jest (170 suites, 1645 tests), tsc and eslint pass. Not tested on a device.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

edge-login-ui-rn ported EdgeText's minimumFontSize floor and its review
reworked it. Bring those changes back so the two copies match again:

- Export DEFAULT_MINIMUM_FONT_SCALE (0.65) instead of repeating 0.65.
- Only compute the floor when the text is allowed to shrink. Text with
  shrinking off no longer carries a minimumFontSize it never uses.
- Default UnscaledText's minimumFontScale to 0.65, and floor it
  whenever it shrinks. The fallback symbols in FiatIcon and CryptoIcon
  shrank with no floor before, so down to React Native's 4pt/4dp.
- Document the 4pt (iOS) and 4dp (Android) defaults, how Android floors
  nested text runs, and that React Native 0.89 makes this unnecessary.

Snapshots gain minimumFontScale on UnscaledText and drop minimumFontSize
where shrinking is off.
@peachbits
peachbits force-pushed the matthew/edgetext-min-font-parity branch from 37424bf to 4604550 Compare November 18, 2026 08:54
@peachbits

Copy link
Copy Markdown
Contributor Author

This is a port from EdgeApp/edge-login-ui-rn#312 and was reviewed there.

@peachbits
peachbits merged commit 9b9b551 into develop Nov 18, 2026
7 checks passed
@peachbits
peachbits deleted the matthew/edgetext-min-font-parity branch November 18, 2026 09:42
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