Skip to content

Button migration batch 5: text-only styled — search+reports #95174

Description

@mountiny

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

Batch

Files

  • src/components/ReportActionItem/ActionableItemButtons.tsx
  • src/components/ReportActionItem/IssueCardMessage.tsx ×2
  • src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx
  • src/components/Search/FilterComponents/AdvancedFilters/AmountFilterContent.tsx
  • src/components/Search/FilterComponents/AdvancedFilters/DateFilterContent.tsx
  • src/components/Search/FilterComponents/AdvancedFilters/ReportFieldFilterContent.tsx
  • src/components/Search/FilterComponents/AdvancedFilters/TextInputFilterContent.tsx
  • src/components/Search/FilterComponents/DateFilterBase.tsx
  • src/components/Search/FilterDropdowns/ActionButtons.tsx ×2
  • src/components/Search/SearchFilterPageFooterButtons.tsx ×2
  • src/components/Search/SearchFiltersAmountBase.tsx
  • src/components/Search/SearchList/ListItem/ActionCell/DeferredActionCell.tsx
  • src/components/Search/SearchList/ListItem/ActionCell/index.tsx ×2 (has link → LinkButton)
  • src/components/Search/SearchList/ListItem/TaskListItemRow.tsx
  • src/components/Search/SearchList/ListItem/TransactionGroupListExpanded.tsx (has link → LinkButton)
  • src/components/SpendRules/SpendRuleRestrictionTypeToggle.tsx ×3
  • src/components/SpendRules/SpendRuleRestrictionTypeToggleRevamp.tsx ×3
  • src/pages/Search/SearchAdvancedFiltersContentPage/DateFilterContentPageWrapper.tsx
  • src/pages/Search/SearchAdvancedFiltersContentPage/ReportFieldFilterContentPageWrapper.tsx
  • src/pages/Search/SearchAdvancedFiltersPage/SearchAdvancedFiltersBase.tsx ×2
  • src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersReportFieldPage/index.tsx
  • src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersWithdrawalTypePage.tsx ×2
  • src/pages/Search/SearchEditMultiple/SearchEditMultiplePage.tsx

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)
  • <Button link> usages swapped to LinkButton
  • eslint-seatbelt count reduced accordingly
  • PR author spot-checks 2–3 representative screens

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