Skip to content

[Due for payment 2026-09-09] Button wrappers: align legacy button-specific props (success/danger → variant) in ConfirmModal & FormAlertWithSubmitButton #99057

Closed

Description

@MelvinBot

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

Background

The composed Button collapsed several legacy config props into new conventions — success/danger booleans → variant="success"/variant="danger", small/medium/large → size, shouldBlendOpacity → blendOpacity, etc.

The sub-issue for ButtonWithDropdownMenu's public API alignment (#95179) is done, and BaseWidgetItem's buttonProps → buttonVariant collapse is handled in #98878 / PR #98861. This issue does the same public-API alignment for the remaining Button wrappers that still expose legacy button-specific props and still render the old @components/Button internally.

This is the "fuller alignment" the plan flagged as a separate decision (reference): renaming a wrapper's own public props to the composed conventions, which ripples to that wrapper's callers.

Scope

1. ConfirmModal → ConfirmContent

  • ConfirmContent.tsx still imports the old ./Button and renders <Button success=... danger=...> (L251-L290).
  • Both ConfirmModal.tsx and ConfirmContent.tsx (L51-L55) expose their own public success?: boolean / danger?: boolean props.
  • Change: collapse the wrapper's public success/danger → a single variant prop and migrate ConfirmContent's internal <Button> to @components/ButtonComposed.
  • Blast radius: ConfirmModal is referenced by ~167 files; only the callers that actually pass success/danger (~16 files) need updating.

2. FormAlertWithSubmitButton

  • FormAlertWithSubmitButton.tsx still imports the old ./Button and forwards the legacy button-specific concepts under differently-named props:
  • Change: migrate the internal <Button> to @components/ButtonComposed (variant/size/blendOpacity). Decide per-prop whether to align the public API (e.g. keep isSubmitActionDangerous/useSmallerSubmitButtonSize as domain-meaningful names vs. renaming) — favor mapping to composed conventions internally while keeping the public names that read well at call sites, matching the plan's guidance.
  • Blast radius: ~45 caller files.

Not in this issue (already handled): ButtonWithDropdownMenu (#95179, done), BaseWidgetItem (#98878 / PR #98861). SettlementButton, AnimatedSettlementButton, AnimatedSubmitButton, and FloatingGPSButton already use the composed API. AddToWalletButton wraps the native wallet button, not our Button.

Migration rules

Follow the established prop-change rules and mirror the approach used in #95179:

  • success / danger (wrapper public + internal) → variant="success" / variant="danger" (CONST.BUTTON_VARIANT)
  • small / medium / large → size={CONST.BUTTON_SIZE...}
  • shouldBlendOpacity → blendOpacity
  • Internal @components/Button → @components/ButtonComposed
  • Update every caller that passes a changed prop.

Acceptance criteria

  • ConfirmModal/ConfirmContent public success/danger collapsed to variant; ConfirmContent renders @components/ButtonComposed.
  • FormAlertWithSubmitButton renders @components/ButtonComposed; its forwarded button-specific props map to composed conventions.
  • No remaining @components/Button import in the two wrappers (ConfirmContent, FormAlertWithSubmitButton).
  • All affected callers updated (ConfirmModal callers passing success/danger; ~45 FormAlertWithSubmitButton callers).
  • eslint-seatbelt count reduced accordingly.
  • No visual regressions in confirm modals and form-submit footers (variant color, size, disabled/loading, press).

Dependencies

  • Blocked by batch 1: the deprecation guard must exist before merge.
  • Can run in parallel with the remaining migration batches.
Issue OwnerCurrent Issue Owner: @ZhenjaHorbach

Activity

  1. Guccio163 commented on Aug 31, 2026

    @Guccio163
    Contributor

    I think we can close this one then

  2. melvin-bot commented on Aug 31, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  3. added and removed
    ReviewingHas a PR in review
    on Sep 2, 2026
  4. changed the title [-]Button wrappers: align legacy button-specific props (success/danger → variant) in ConfirmModal & FormAlertWithSubmitButton[/-] [+][Due for payment 2026-09-09] Button wrappers: align legacy button-specific props (success/danger → variant) in ConfirmModal & FormAlertWithSubmitButton[/+] on Sep 2, 2026
  5. melvin-bot commented on Sep 2, 2026

    @melvin-bot

    @ZhenjaHorbach

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.65-3 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-09-09. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

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

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions