[NoQA] Button - <LinkButton/> component implementation#91824
Conversation
|
One thing that I've noticed when implementing this PR: When Button's styles are being overwritten, we have to adjust the value basing on the children's presence - since Button.Text component is adding 4px by itself, overwriting the whole Button's padding doesn't include it (and it did before). For example: if we have the old Button with inline horizontal padding = 12px, we have to make it 8px when a Text is the only child or left padding = 12px, right padding = 8px if there is a left icon, because Text's own 4px will add to the target value. If overwriting value is 0px, then we have to simply also remove Text's padding with inline style (to avoid setting negative padding). All in all we have only a couple of places when the padding is changed and it's ~1% of all Button use-cases, so we may prioritise these scenarios to make sure to remember this 💡 |
…-fork into Guccio163/button/link
Explanation of Change
Added a
<LinkButton/>component that wraps the link variant style logic, part of the Button composable migration (name was changed from Link to LinkButton to avoid eslint errors regarding Link-named components.Fixed Issues
$ #90195
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 Link across the range of 4 affected scenarios:
Please verify that both sides (old and new Button implementations) look exactly the same, beside that in "BaseOnboardingWorkspaces — “Show more”", so text + iconRight one:
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
Screen.Recording.2026-05-27.at.20.04.48.mov
MacOS: Chrome / Safari
Screen.Recording.2026-05-27.at.18.54.49.mov