Skip to content

fix(fxa-settings): prevent CJK button labels breaking one character per line - #21014

Draft
vpomerleau wants to merge 2 commits into
mainfrom
contrib/pr-20724-cjk-button-wrapping
Draft

fix(fxa-settings): prevent CJK button labels breaking one character per line#21014
vpomerleau wants to merge 2 commits into
mainfrom
contrib/pr-20724-cjk-button-wrapping

Conversation

@vpomerleau

@vpomerleau vpomerleau commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Because

This pull request

Issue that this pull request solves

Mirror of #20724 — see that PR for the issue reference.

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

This comment was marked as outdated.

@vpomerleau
vpomerleau force-pushed the contrib/pr-20724-cjk-button-wrapping branch from fa280e8 to 95ce9ff Compare August 13, 2026 19:33
@vpomerleau
vpomerleau marked this pull request as ready for review August 13, 2026 19:35
@vpomerleau
vpomerleau requested a review from a team as a code owner August 13, 2026 19:35
@vpomerleau
vpomerleau marked this pull request as draft August 17, 2026 17:36
@vpomerleau

Copy link
Copy Markdown
Contributor Author

Marked as draft, there are some issues with button layout and latin languages with long text strings.

@sreecharan-desu

sreecharan-desu commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

pushed a follow-up on #20724 for the latin layout — swapped whitespace-nowrap for break-keep (word-break: keep-all).

checked the modal max-w-64 pair and a squeezed unit-row with the real l10n strings (en/de/nl/ja/ko). didn't run the full settings app, just the same flex markup against those strings.

squeezed unit-row (the original cjk stacking). left is no keep-all, right is keep-all:

CJK squeeze: ja stacks per character without keep-all, stays a normal button with keep-all

modal pair in max-w-64. nowrap is what makes the long latin confirms unbreakable — de Zugangsschlüssel löschen and nl Wachtwoordsleutel verwijderen stay one line and get very wide. keep-all still stops ja/ko from stacking per character; en can sit on one row; de/nl still wrap as a pair because those compounds are long, they just aren't locked to one giant line:

Modal CTAs: nowrap vs keep-all for en, de, nl, ko

…er line

Flex-shrink on settings row and modal CTA buttons was squeezing Japanese,
Chinese, and Korean labels to a single character per line. Keep button text
on one line and let paired modal actions wrap as a group when space is tight.

Use child mx-2 margins for modal button spacing instead of gap-2 to avoid
doubled horizontal spacing that caused premature wrapping.

Fixes #18683
whitespace-nowrap stopped CJK from stacking one character per line, but
it also blocked wrapping for long English and German strings in tight
flex layouts. Use break-keep so CJK still will not split between
characters and latin can wrap on spaces.
@vpomerleau
vpomerleau force-pushed the contrib/pr-20724-cjk-button-wrapping branch from 95ce9ff to 4f6ef6f Compare August 25, 2026 20:30
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.

3 participants