Skip to content

[Due for payment 2026-07-29] Button migration batch 1: text-only plain — workspace + settings #95169

Closed

Description

@mountiny

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

Files

workspace:

  • src/pages/workspace/accounting/ClaimOfferPage.tsx ×2
  • src/pages/workspace/accounting/intacct/DynamicSageIntacctPrerequisitesPage.tsx
  • src/pages/workspace/accounting/intacct/import/SageIntacctUserDimensionsPage.tsx
  • src/pages/workspace/accounting/netsuite/import/NetSuiteImportCustomFieldPage.tsx
  • src/pages/workspace/accounting/qbd/QuickBooksDesktopSetupPage.tsx
  • src/pages/workspace/accounting/qbd/RequireQuickBooksDesktopPage.tsx
  • src/pages/workspace/companyCards/WorkspaceCompanyCardEditTransactionStartDatePage.tsx
  • src/pages/workspace/companyCards/assignCard/TransactionStartDateStep.tsx
  • src/pages/workspace/copyPolicySettings/CopyPolicySettingsConfirmPage.tsx
  • src/pages/workspace/distanceRates/PolicyCommuterExclusionsPage.tsx
  • src/pages/workspace/downgrade/DowngradeIntro.tsx ×2
  • src/pages/workspace/downgrade/PayAndDowngradePage.tsx
  • src/pages/workspace/hr/HRApprovalModePageBase.tsx
  • src/pages/workspace/hr/merge/MergeHRGroupsPage.tsx
  • src/pages/workspace/members/WorkspaceOwnerChangeCheck.tsx
  • src/pages/workspace/rules/RulesProhibitedDefaultPage.tsx
  • src/pages/workspace/rules/RulesRequireFieldsPage.tsx
  • src/pages/workspace/tags/ImportMultiLevelTagsSettingsPage.tsx
  • src/pages/workspace/travel/WorkspaceTravelInvoicingSection.tsx
  • src/pages/workspace/upgrade/GenericFeaturesView.tsx ×2
  • src/pages/workspace/upgrade/UpgradeIntro.tsx

settings:

  • src/pages/settings/ExitSurvey/DynamicExitSurveyConfirmPage.tsx
  • src/pages/settings/Profile/Avatar/EditUserAvatarContent.tsx
  • src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx
  • src/pages/settings/Security/DeviceManagementPage.tsx
  • src/pages/settings/Security/TwoFactorAuth/DisablePage.tsx
  • src/pages/settings/Security/TwoFactorAuth/DisabledPage.tsx
  • src/pages/settings/Security/TwoFactorAuth/DynamicTwoFactorAuthPage.tsx
  • src/pages/settings/Security/TwoFactorAuth/DynamicVerifyPage.tsx
  • src/pages/settings/Security/TwoFactorAuth/ReplaceDeviceVerifyNewPage.tsx
  • src/pages/settings/Security/TwoFactorAuth/ReplaceDeviceVerifyOldPage.tsx
  • src/pages/settings/Subscription/CancelSubscriptionPage/index.tsx ×2
  • src/pages/settings/Subscription/SubscriptionPlan/SaveWithExpensifyButton/index.tsx
  • src/pages/settings/Subscription/SubscriptionPlan/index.tsx
  • src/pages/settings/Subscription/SubscriptionSize/subPages/Confirmation.tsx
  • src/pages/settings/Wallet/ImportTransactionsPage.tsx
  • src/pages/settings/Wallet/PersonalCardEditTransactionStartDatePage.tsx
  • src/pages/settings/Wallet/PersonalCards/upgrade/UpgradeIntro.tsx
  • src/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> children
  • success / 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_SIZE where 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 (ButtonWithDropdownMenu success/buttonSize → variant/size) — tracked separately
  • Keep each wrapper's public API as-is; map to composed Button internally only

Acceptance criteria

  • no-restricted-imports blocks new @components/Button default imports
  • eslint-seatbelt baseline seeded for existing imports
  • All 39 listed files migrated to @components/ButtonComposed
  • No visual regressions in workspace + settings flows

Dependencies

Issue OwnerCurrent Issue Owner: @ZhenjaHorbach

Activity

  1. jmgraa commented on Jul 2, 2026

    @jmgraa
    Contributor

    @mountiny Could you assign me to this issue? I am already taking care of it: #95046

  2. assigned and unassigned on Jul 2, 2026
  3. changed the title [-]Button migration batch 1: text-only plain — workspace + settings[/-] [+][Due for payment 2026-07-29] Button migration batch 1: text-only plain — workspace + settings[/+] on Jul 22, 2026
  4. melvin-bot commented on Jul 22, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  5. melvin-bot commented on Jul 22, 2026

    @melvin-bot

    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 requires payment through NewDot Manual Requests
    • @jmgraa does not require payment (Contractor)
  6. ZhenjaHorbach commented on Jul 22, 2026

    @ZhenjaHorbach
    Contributor

    @mountiny
    Let's close this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions