Repository navigation
[Due for payment 2026-07-29] Button migration batch 1: text-only plain — workspace + settings #95169
Copy link
Copy link
Closed
Description
Sub-issue of #83762.
Migration plan: Guccio163 comment.
This is batch 1 of the old Button → composed Button migration. It must merge first — it introduces the deprecation guard that blocks new usages of the legacy component.
Batch
- Shape: text-only · plain
- Area: workspace + settings
- Scope: 39 files / 43 usages (re-scan after Migrate ComposedButton to ButtonWithDropdownMenu #93789)
Files
workspace:
src/pages/workspace/accounting/ClaimOfferPage.tsx×2src/pages/workspace/accounting/intacct/DynamicSageIntacctPrerequisitesPage.tsxsrc/pages/workspace/accounting/intacct/import/SageIntacctUserDimensionsPage.tsxsrc/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldPage.tsxsrc/pages/workspace/accounting/qbd/QuickBooksDesktopSetupPage.tsxsrc/pages/workspace/accounting/qbd/RequireQuickBooksDesktopPage.tsxsrc/pages/workspace/companyCards/WorkspaceCompanyCardEditTransactionStartDatePage.tsxsrc/pages/workspace/companyCards/assignCard/TransactionStartDateStep.tsxsrc/pages/workspace/copyPolicySettings/CopyPolicySettingsConfirmPage.tsxsrc/pages/workspace/distanceRates/PolicyCommuterExclusionsPage.tsxsrc/pages/workspace/downgrade/DowngradeIntro.tsx×2src/pages/workspace/downgrade/PayAndDowngradePage.tsxsrc/pages/workspace/hr/HRApprovalModePageBase.tsxsrc/pages/workspace/hr/merge/MergeHRGroupsPage.tsxsrc/pages/workspace/members/WorkspaceOwnerChangeCheck.tsxsrc/pages/workspace/rules/RulesProhibitedDefaultPage.tsxsrc/pages/workspace/rules/RulesRequireFieldsPage.tsxsrc/pages/workspace/tags/ImportMultiLevelTagsSettingsPage.tsxsrc/pages/workspace/travel/WorkspaceTravelInvoicingSection.tsxsrc/pages/workspace/upgrade/GenericFeaturesView.tsx×2src/pages/workspace/upgrade/UpgradeIntro.tsx
settings:
src/pages/settings/ExitSurvey/DynamicExitSurveyConfirmPage.tsxsrc/pages/settings/Profile/Avatar/EditUserAvatarContent.tsxsrc/pages/settings/Profile/Contacts/ContactMethodsPage.tsxsrc/pages/settings/Security/DeviceManagementPage.tsxsrc/pages/settings/Security/TwoFactorAuth/DisablePage.tsxsrc/pages/settings/Security/TwoFactorAuth/DisabledPage.tsxsrc/pages/settings/Security/TwoFactorAuth/DynamicTwoFactorAuthPage.tsxsrc/pages/settings/Security/TwoFactorAuth/DynamicVerifyPage.tsxsrc/pages/settings/Security/TwoFactorAuth/ReplaceDeviceVerifyNewPage.tsxsrc/pages/settings/Security/TwoFactorAuth/ReplaceDeviceVerifyOldPage.tsxsrc/pages/settings/Subscription/CancelSubscriptionPage/index.tsx×2src/pages/settings/Subscription/SubscriptionPlan/SaveWithExpensifyButton/index.tsxsrc/pages/settings/Subscription/SubscriptionPlan/index.tsxsrc/pages/settings/Subscription/SubscriptionSize/subPages/Confirmation.tsxsrc/pages/settings/Wallet/ImportTransactionsPage.tsxsrc/pages/settings/Wallet/PersonalCardEditTransactionStartDatePage.tsxsrc/pages/settings/Wallet/PersonalCards/upgrade/UpgradeIntro.tsxsrc/pages/settings/Wallet/UnshareBankAccount/UnshareBankAccount.tsx
Deprecation guard (this batch only)
Add no-restricted-imports for @components/Button (importNames: ['default'] only — keep ButtonProps type importable) in config/eslint/eslint.config.mjs, and seed the existing-usage baseline into config/eslint/eslint.seatbelt.tsv.
Migration rules
Mechanical swap per prop-change rules:
- Import:
@components/Button→@components/ButtonComposed text/icon/ related props →<Button.Text>/<Button.Icon>childrensuccess/danger→variant="success"/variant="danger"small/medium/large→size={CONST.BUTTON_SIZE.SMALL | MEDIUM | LARGE}link→<LinkButton>from@components/ButtonComposed/composed/LinkButton- Forwarded size props: update
DROPDOWN_BUTTON_SIZE→BUTTON_SIZEwhere applicable
// before
<Button success large text="Add members" icon={Plus} iconRight={ArrowRight} onPress={onAdd} />
// after
<Button variant="success" size={CONST.BUTTON_SIZE.LARGE} onPress={onAdd}>
<Button.Icon src={Plus} />
<Button.Text>Add members</Button.Text>
<Button.Icon src={ArrowRight} />
</Button>Out of scope
- Renaming wrapper public APIs (
ButtonWithDropdownMenusuccess/buttonSize→variant/size) — tracked separately - Keep each wrapper's public API as-is; map to composed Button internally only
Acceptance criteria
-
no-restricted-importsblocks new@components/Buttondefault imports - eslint-seatbelt baseline seeded for existing imports
- All 39 listed files migrated to
@components/ButtonComposed - No visual regressions in workspace + settings flows
Dependencies
- Blocked by: #93789 — re-scan file list after merge
- Re-scan note:
maincurrently has ~282 files importing@components/Button(2026-07-02); counts may shift after Migrate ComposedButton to ButtonWithDropdownMenu #93789
Issue Owner
Current Issue Owner: @ZhenjaHorbachReactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
jmgraa commentedon Jul 2, 2026
@mountiny Could you assign me to this issue? I am already taking care of it: #95046
[-]Button migration batch 1: text-only plain — workspace + settings[/-][+][Due for payment 2026-07-29] Button migration batch 1: text-only plain — workspace + settings[/+]melvin-bot commentedon Jul 22, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 22, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.41-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-07-29. 🎊
For reference, here are some details about the assignees on this issue:
ZhenjaHorbach commentedon Jul 22, 2026
@mountiny
Let's close this!