Repository navigation
Conversation
…-fork into Guccio163/button/padding-gaps
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…-fork into Guccio163/button/padding-gaps
…-fork into Guccio163/button/padding-gaps
…-fork into Guccio163/button/padding-gaps
|
@shawnborton @ZhenjaHorbach One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
For ButtonWithIcons calls that provide iconRight with a fixed or full-width button, replacing ButtonIconRight with the generic icon drops the old mlAuto/left-padding wrapper, so the right icon now sits immediately next to the text instead of at the trailing edge. That regresses the existing iconRight semantics used for disclosure/dropdown-style buttons; please preserve the right-icon wrapper spacing/alignment here.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
🚧 @shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
@shawnborton I pushed the testing patch, comparisons are under "/debug/button-showcase" |
|
🚧 @shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Just checked it out and it seems identical to me! No notes on my end, curious if the rest of the @Expensify/design might find anything though. |
|
Yeah apologies - we went back and forth on that a few times and we left off saying that we would just leave it as it currently is for now, since that was technically easier for @Guccio163 to implement. |
|
Ah ok. Cool. Down to keep pushing forward! But let the record show that I think I prefer having equal padding on both sides—makes them feel more button-y to me. |
|
@Guccio163 |
|
@dannymcclain I think it actually depends on the icon being used. Here is a comparison of the old (uneven) vs. new (even) paddings. Since this icon is more vertical, the extra horizontal space adds to the right padding, ironically making it look visually unbalanced to me 😃
|
e248aef to
5b5d058
Compare
…-fork into Guccio163/button/padding-gaps
|
@ZhenjaHorbach I just reverted the last commit with testing page and comparisons for designers, right now all checks should pass ✅ |
1000% 😂 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-05-22.10.41.26.movAndroid: mWeb Chrome2026-05-22.10.38.20.moviOS: HybridApp2026-05-22.10.41.26.moviOS: mWeb Safari2026-05-22.10.38.20.movMacOS: Chrome / Safari2026-05-22.10.35.27.mov |
|
@Guccio163 @mountiny |
|
But changes look good! |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.80-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is an internal refactoring of |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.81-2 🚀
|



Explanation of Change
Implements the foundation cleanup for from #90194:
Changed gap/padding logic while preserving the pre-PR visual. Instead of compensating for icons with negative margins, the same visual result is achieved by splitting horizontal padding between a smaller paddingHorizontal on the wrapper button and paddingHorizontal on Button.Text. The wrapper no longer calls getButtonPaddingStyle, the per-icon mr/ml/pl adjustments are gone, and spacing between primitives comes from primitives' own paddings and conditional gap defined in the wrapper. Two intentional deltas from Button/index.tsx:
Unified loading-state policy. isLoading && opacity0 now lives on the wrapper in Button.tsx, so it uniformly hides all children - including Button.IconRight (previously unaffected) and any custom children. Removed from ButtonText, ButtonDoubleLineText, and the icon primitives; dropped isLoading from ButtonContext.
Removed the extraSmall size due to no real usages in the codebase. Replaced CONST.DROPDOWN_BUTTON_SIZE with a new CONST.BUTTON_SIZE (small / medium / large only) inside ButtonComposed, and dropped the extraSmall branches in ButtonText, the icon primitive, the loading spinner, and style util tests.
Merged ButtonIconLeft / ButtonIconRight into ButtonIcon. Once side-specific margins were gone, the side is already determined by JSX order. Exposed as Button.Icon; ButtonIcons.tsx is deleted.
Fixed Issues
$ #90194
PROPOSAL:
Tests
ButtonComposed that is being edited is not wired up to any production screen yet.
To verify the visual correctness of the new components, apply the attached patch file to your local branch and navigate to /debug/button-showcase. The page renders a side-by-side comparison of the old Button/index.tsx and the new ButtonWithIcons across the range of affected scenarios:
Please verify that both sides (old and new Button implementations) look exactly the same, beside two cases:
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
android_web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios_web.mov
MacOS: Chrome / Safari
Screen.Recording.2026-05-18.at.21.58.01.mov