Skip to content

Button migration batch 9: ref / other (manual review) #95178

Description

@mountiny

Sub-issue of #83762.
Migration plan: Guccio163 comment.

Batch

Files

  • src/components/ButtonWithDropdownMenu/index.tsx ×3 ⚠️ SKIP (Migrate ComposedButton to ButtonWithDropdownMenu #93789)
  • src/components/PDFView/PDFPasswordForm.tsx
  • src/components/Search/FilterDropdowns/DropdownButton.tsx ×2
  • src/components/Search/SearchPageHeader/SearchActionsBarCreateButton.tsx
  • src/components/Search/SearchPageHeader/SearchAdvancedFiltersButton.tsx
  • src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx ×2
  • src/pages/inbox/report/actionContents/ReimbursementQueuedContent.tsx ×2
  • src/pages/iou/MoneyRequestAmountForm.tsx
  • src/pages/iou/request/step/IOURequestStepDistanceManual.tsx
  • src/pages/media/AttachmentModalScreen/AttachmentModalBaseContent/index.tsx
  • src/pages/workspace/accounting/PolicyAccountingPage.tsx ×2

Migration rules

Mechanical swap per prop-change rules:

  • Import: @components/Button@components/ButtonComposed
  • text / icon / related props → <Button.Text> / <Button.Icon> children
  • success / dangervariant="success" / variant="danger"
  • small / medium / largesize={CONST.BUTTON_SIZE.SMALL | MEDIUM | LARGE}
  • link<LinkButton> from @components/ButtonComposed/composed/LinkButton
  • Forwarded size props: update DROPDOWN_BUTTON_SIZEBUTTON_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/buttonSizevariant/size) — tracked separately
  • Keep each wrapper's public API as-is; map to composed Button internally only

Acceptance criteria

  • Every listed file fully migrated (no remaining @components/Button import), except explicit SKIP entries
  • ref/unusual prop cases manually verified
  • eslint-seatbelt count reduced accordingly
  • PR author spot-checks representative screens with ref/keyboard/unusual behavior

Dependencies

  • Blocked by: #93789
  • Blocked by batch 1: deprecation guard must exist before merge
Issue OwnerCurrent Issue Owner: @mikolajpochec

Metadata

Metadata

Labels

Type

No type

Projects

Status
SUBISSUE

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions