Repository navigation
Conversation
|
Found potential problems with the pull request:
|
|
/review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 3 new findings on 58d3075. The verdict and the full list are in the summary comment.
|
/review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 3 new findings and 1 moved to a new line on 25e3177. The verdict and the full list are in the summary comment.
|
/review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 finding moved to a new line on 69a6fe0. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 finding moved to a new line on 69a6fe0. The verdict and the full list are in the summary comment.
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
src/components/TouchableRipple/TouchableRipple.tsx:363 |
🆕 The 150ms hover fade is gone: transition still names background-color, hover is now a background image |
Not in the reviewers' prompt (1 file)
src/components/__tests__/__snapshots__/TouchableRippleWeb.test.tsx.snap: generated or a lockfile, so its lines were left out
Reviewed with this repository's own Sentinel configuration (9029fbcd5df0).
💬 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.
There was a problem hiding this comment.
Apex Sentinel: 1 finding moved to a new line on 40b9845. The verdict and the full list are in the summary comment.
| !isInteractive && styles.disabled, | ||
| typeof style === 'function' ? style(state) : style, | ||
| // After `style`, so a background set there does not hide the hover. | ||
| state.hovered && isInteractive && getHoverStyle(hoverColor), |
There was a problem hiding this comment.
🆕 🟡 Minor · The 150ms hover fade is gone: transition still names background-color, hover is now a background image
On web, hovering an interactive TouchableRipple pops the state layer in and out at full opacity instead of easing over 150ms. styles.touchable still declares transition: '150ms background-color', but hover moved to backgroundImage which CSS cannot transition. The migration note added in this PR documents only the backgroundColor/backgroundImage swap, not the fade loss, so consumers upgrading will read it as a no-visual-change fix.
Suggested change
Either remove transition: '150ms background-color' from styles.touchable or re-implement the fade as an opacity-transitioned absolutely-positioned child View, and add a line to the TouchableRipple section of the migration guide that hover no longer fades in on web.
Details
Also raised here
Also raised at this location by persona javascript: Hover no longer fades: the 150ms transition in styles.touchable no longer covers it — On web, moving the mouse onto a row now snaps the hover layer on and off instantly, where the previous backgroundColor hover faded over 150ms. Cause: styles.touchable still declares transition: '150ms background-color' (TouchableRipple.tsx:413), but the hover layer is now a backgroundImage gradient (utils.ts:81) and browsers do not interpolate gradients, so that transition applies to nothing the component animates any more — it only still affects a consumer's own backgroundColor change. If the instant pop is acceptable, the now-dead background-color transition should go (or say why it stays); if the fade is wanted, the layer needs to be an overlay child whose opacity transitions rather than a background image. The migration note at docs/6.x/docs/guides/migration.md:942 documents the paint order but not this loss of the fade, which is what a consumer will notice on every hover.
persona: senior-developer, javascript, react-native-paper
Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.
Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.
Motivation
This is a followup to: #5224 (comment)
On web,
TouchableRipplepaints hover as its ownbackgroundColor, and abackgroundColorinstyleovverides it. So a selectedDrawer.Itemor a selectedList.Itemfrom #5224, shows no hover effect.Hover is now a
linear-gradientbackground image afterstyle. It paints on top of the background color and keeps the border radius. Hover no longer fades in as it cannot animate background image.Related issue
Follow-up to #5224 (comment)
Screenshots / Videos
Test plan
In the web example:
Drawer.Item. The hover layer shows on top of the selected color, with rounded corners.Button. They look as before.