Repository navigation
refactor(button): share the shape morph between Button and IconButton - #5264
Open
lukewalczak wants to merge 5 commits into
Open
lukewalczak wants to merge 5 commits into
lukewalczak wants to merge 5 commits into
Conversation
|
Found potential problems with the pull request:
|
This comment has been minimized.
This comment has been minimized.
Doberjohn
changed the base branch from
feat/refactor-icon-button-component
to
main
November 20, 2026 15:02
Move the corner morph into a shared useShapeMorph hook. IconButton now caps the spring curve against the inner corner, as Button does, so the inner corner of an outlined button can't overshoot below 0.
Doberjohn
force-pushed
the
refactor/shared-shape-morph
branch
from
November 20, 2026 15:02
e9e6e27 to
3dabed2
Compare
kachmashk
approved these changes
Nov 20, 2026
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 3dabed2. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
Apex Sentinel · ✅ Approve · review of
|
| 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.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 616a2b0. The verdict and the full list are in the summary comment.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Button and IconButton each built the corner morph themselves, and the copies had drifted: IconButton capped the spring curve for the outer corner, so on an outlined button the inner corner could overshoot below 0.
Both now use
useShapeMorphfromsrc/utils, which caps the curve against the inner corner and applies it to both corners. Button behaves as before. The ripple color helper moved toTouchableRipple/utils, so IconButton no longer imports fromButton. Renamed:getButtonShapeCurvePoints→getShapeCurvePoints,getButtonRippleColor→getRippleColorFromContent.Related issue
Follow-up to #5103.
Screenshots / Videos
No visual change except outlined IconButton, whose inner corner no longer overshoots. Checked on iOS and Android.
Test plan
Open the Button and IconButton examples on iOS and Android, pick outlined + extra-large, then press, release and toggle.