Skip to content

refactor(button): share the shape morph between Button and IconButton - #5292

Merged
Doberjohn merged 1 commit into
mainfrom
@Doberjohn/reland-shape-morph
Nov 23, 2026
Merged

Doberjohn merged 1 commit into
mainfrom
@Doberjohn/reland-shape-morph

Conversation

@Doberjohn

@Doberjohn Doberjohn commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Re-lands #5264 by @lukewalczak, merged early and reverted by #5279 to keep it out of 6.0.0-alpha.4. The code is unchanged.

Button and IconButton now share useShapeMorph, capped against the inner corner as Button was. With the default spring the curve is unchanged, so nothing changes on screen. #5264 was approved before the move to shared utils and the new tests, so those need a review.

Related issue

Follow-up to #5103.

Screenshots / Videos

image

Outlined extra-large IconButton mid-press, iOS above and Android below, main left, this branch right:

Test plan

Same 12 files as #5264's merge commit. Lint, typecheck and tests pass. On iOS and Android, outlined extra-large Button and IconButton, pressed and toggled on main and here: the corner radius matches frame by frame.

Re-lands #5264, which #5279 reverted to keep it out of 6.0.0-alpha.4.

Button and IconButton now share useShapeMorph, which caps the spring curve
against the inner corner, as Button already did (IconButton capped against
the outer one). With the default spring both caps give the same curve. The
ripple color helper moves to TouchableRipple/utils, so IconButton no longer
imports from Button.

Co-authored-by: Luke Walczak <[email protected]>
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 6174db1

No open findings.

2 findings below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (277b37195819).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@Doberjohn
Doberjohn merged commit bce91c4 into main Nov 23, 2026
17 checks passed
@Doberjohn
Doberjohn deleted the @Doberjohn/reland-shape-morph branch November 23, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants