fix(fxa-settings): prevent CJK button labels breaking one character per line#20724
Open
sreecharan-desu wants to merge 1 commit into
Open
fix(fxa-settings): prevent CJK button labels breaking one character per line#20724sreecharan-desu wants to merge 1 commit into
sreecharan-desu wants to merge 1 commit into
Conversation
…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. Fixes mozilla#18683 Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a flexbox/layout issue in fxa-settings where CJK (Chinese/Japanese/Korean) CTA button labels could be squeezed into extremely narrow widths and end up rendering one character per line.
Changes:
- Updated shared CTA styling to prevent flex items from shrinking and to keep CTA labels on one line.
- Applied additional CTA non-shrinking / no-wrapping rules within settings unit-row action areas.
- Allowed modal/button groups to wrap when space is constrained by adding
flex-wrapto the button container.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/fxa-settings/src/styles/unit-row.css | Prevent CTA buttons/links inside unit-row actions from shrinking and wrapping. |
| packages/fxa-settings/src/components/Settings/SubRow/index.tsx | Allow passkey delete modal action buttons to wrap as a group. |
| packages/fxa-settings/src/components/Settings/Modal/index.tsx | Allow generic modal action buttons to wrap as a group. |
| packages/fxa-react/styles/ctas.css | Adjust CTA sizing behavior and add higher-specificity utilities to override flex-1 shrink behavior and prevent wrapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| {hasButtons && ( | ||
| <div className="flex justify-center mx-auto mt-6 max-w-64"> | ||
| <div className="flex flex-wrap justify-center gap-2 mx-auto mt-6 max-w-64"> |
| </p> | ||
| </FtlMsg> | ||
| <div className="flex justify-center mx-2 mt-6"> | ||
| <div className="flex flex-wrap justify-center gap-2 mx-2 mt-6"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
shrink-0andwhitespace-nowrapto shared CTA styles (with specificity high enough to overrideflex-1on modal buttons).Fixes #18683
Test plan
Made with Cursor