Skip to content

Reset Switch ripple tint when thumbColor is cleared, fix getOutlineWidth - #59451

Open
Abbondanzo wants to merge 2 commits into
react:mainfrom
Abbondanzo:export-D127268268
Open

Abbondanzo wants to merge 2 commits into
react:mainfrom
Abbondanzo:export-D127268268

Conversation

@Abbondanzo

Copy link
Copy Markdown
Contributor

Summary:
Two follow-ups to the Switch background-color fix (parent import).

  1. Clearing thumbColor left the live ripple tinted with the old thumb
    color. setThumbColor stored null but skipped recoloring the existing
    ripple, so a Switch with backgroundColor + thumbColor kept the thumb
    tint on its pressed ripple after thumbColor was removed. Now a null
    thumbColor resets the ripple effect to the background's own content
    color, matching what the next setBackgroundColor would build.
  2. BackgroundStyleApplicator.getOutlineWidth returned outlineOffset
    instead of outlineWidth, so readers got the offset value (or null when
    only a width was set).

Changelog:
[Android][Fixed] - Fix Switch keeping the thumbColor ripple tint after thumbColor is removed, and fix getOutlineWidth returning the outline offset

Differential Revision: D127268268

…oad the correct commit data.

Differential Revision: D127266607
Summary:
Two follow-ups to the Switch background-color fix (parent import).

1. Clearing thumbColor left the live ripple tinted with the old thumb
color. setThumbColor stored null but skipped recoloring the existing
ripple, so a Switch with backgroundColor + thumbColor kept the thumb
tint on its pressed ripple after thumbColor was removed. Now a null
thumbColor resets the ripple effect to the background's own content
color, matching what the next setBackgroundColor would build.
2. BackgroundStyleApplicator.getOutlineWidth returned outlineOffset
instead of outlineWidth, so readers got the offset value (or null when
only a width was set).

Changelog:
[Android][Fixed] - Fix Switch keeping the thumbColor ripple tint after thumbColor is removed, and fix getOutlineWidth returning the outline offset

Differential Revision: D127268268
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 24, 2026
@meta-codesync

meta-codesync Bot commented Oct 24, 2026

Copy link
Copy Markdown

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D127268268.

@github-actions

Copy link
Copy Markdown

Visual regression

No visual differences at cfba379c9208.

ios: no capture

This branch has not been deployed

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant