Repository navigation
refactor: migrate direct Button usages to composed Button (PR1 — workspace + settings) - #95046
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
I've looked through a couple of files and it looks good, 2 notes:
- I've already implemented the seatbelt in a separate PR, so it'll be just a matter of merging, good job though
- The same PR will change how a couple of props are being passed to the
Button.KeyboardShortcutand removes thepressOnEntersince it is redundant - it could require conflict resolution and will simplify migration, so the extraction of the onPress functions will not be needed anymore
Beside that one export change, LGTM! 👀
|
|
6bce5b0 to
990b589
Compare
990b589 to
74367bb
Compare
|
@ZhenjaHorbach Please 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] |
|
@ZhenjaHorbach all updated, ready for merge |
|
Will complete checklist today or tomorrow! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-07-17.10.48.29.mov2026-07-17.10.48.49.mov2026-07-17.10.49.19.mov2026-07-17.10.54.08.mov2026-07-17.10.55.01.mov2026-07-17.10.55.18.movAndroid: mWeb Chrome2026-07-17.10.39.40.mov2026-07-17.10.40.10.mov2026-07-17.10.40.34.mov2026-07-17.10.41.19.mov2026-07-17.10.41.55.mov2026-07-17.10.42.57.moviOS: HybridApp2026-07-17.10.48.29.mov2026-07-17.10.48.49.mov2026-07-17.10.49.19.mov2026-07-17.10.54.08.mov2026-07-17.10.55.01.mov2026-07-17.10.55.18.moviOS: mWeb Safari2026-07-17.10.39.40.mov2026-07-17.10.40.10.mov2026-07-17.10.40.34.mov2026-07-17.10.41.19.mov2026-07-17.10.41.55.mov2026-07-17.10.42.57.movMacOS: Chrome / Safari2026-07-17.10.26.00.mov2026-07-17.10.26.54.mov2026-07-17.10.28.47.mov2026-07-17.10.30.23.mov2026-07-17.10.31.20.mov |
|
@jmgraa |
|
@ZhenjaHorbach waiting for your confirmation |
|
LGTM! |
|
🚧 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.41-0 🚀
|
|
🤖 Help site review: no docs changes required. I reviewed the changes in this PR against the help site content under This is a purely mechanical component migration — swapping direct
Since the help site documents product features and workflows — not internal component structure — there is nothing to update. No draft PR was created. @jmgraa, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Hi @jmgraa. Could you please share more detailed testing steps for this PR? |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.4.41-4 🚀
Bundle Size Analysis (Sentry): |
|
There wasn't much to test. This is refactoring. |
Explanation of Change
This is the first batch (PR1 of 9) of an ongoing effort to migrate every direct
<Button>usage (import Button from '@components/Button') over to the new composedButtonComposed, so the oldButtoncomponent can eventually be deprecated. This batch covers 39 files / 43 button instances — all of them the simplest shape in the migration: text-only, plain (no icon), in the workspace + settings areas.I want to be upfront about the nature of this PR so it's easy to review: the change is almost entirely mechanical. Each swap follows a fixed set of prop-mapping rules — for example
success/dangercollapse intovariant,small/largecollapse intosize,text=""moves into a<Button.Text>child, andpressOnEnterbecomes a<Button.KeyboardShortcut>child. No business logic, callbacks, disabled/loading conditions, or navigation targets were changed; every prop is either renamed 1:1, mapped to its documented equivalent, or passed straight through unchanged. In short, these buttons should look and behave exactly as they did before.On the videos: because the change is this repetitive and low-risk, I did not record a clip for all 21 screens. Recording every one would mostly be showing the same "text renders, correct color/size, press works" check over and over. Instead I've attached a few representative clips that exercise the parts of the mapping that carry the most regression risk — the
variantcolors (success/danger/default), thesizemapping, disabled/loading states, and theEnter-key shortcut (<Button.KeyboardShortcut>).Fixed Issues
$ #95169
PROPOSAL: #83762 (comment)
Tests
For every migrated button, verify that behaviour is unchanged from before the migration:
success= green,danger= red, default = grey.isLoading).<Button.KeyboardShortcut>).Offline tests
Same as test
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari (11 recordings)
s1.mov
s2.mov
s3.mov
s5.mov
s6.mov
s9.mov
w1.mov
w3.mov
w4.mov
w5.mov
w6.mov
Android: Native (2 recordings)
android1.mov
android2.mov
iOS: Native (3 recordings)
ios1.mov
ios2.mov
ios3.mov