Repository navigation
feat!: modernize List-related components to the latest MD3 specs - #5224
Conversation
|
/review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 3 new findings on cd9dfe1. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 70280c9. 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 new finding on f68bc28. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
A pressable List.Item now defaults to role="button". React Native gives `role` precedence over `accessibilityRole`, so the default hid a role that a caller set with `accessibilityRole`, such as "checkbox" on a selectable row, and screen readers announced a button instead. The default now applies only when the caller sets neither, and the selected state on web follows the caller's `accessibilityRole` too.
The row detects a wrapped description with onTextLayout, which React Native Web doesn't support, so on web a three-line row keeps 8dp of vertical padding and is 80dp tall.
The chevron's CSS transition keeps its duration, easing and reduce motion handling, now built with the getTransition helper that Badge, Checkbox and TextInput use since callstack#5112.
This comment has been minimized.
This comment has been minimized.
|
Since this one's in our hands, I pushed a few small things on top:
Everything else from the last round looks good to me. CI is green on the new head, so I'll merge after a last check on devices. |
When a fully expanded List.Accordion started to collapse, its content disappeared for one or two frames on Android and web, and the rows below jumped up before the collapse animated. The content left the layout flow in the React commit, but the wrapper's height only changed from `auto` to a number when Reanimated applied it a frame later, so the wrapper shrank to nothing for that frame. The content now leaves and rejoins the flow through an animated style, in the same frame as the height changes.
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.
|
The last check on devices turned up one thing: when a fully expanded accordion started to collapse, its content disappeared for a frame or two on Android and web, and the rows below jumped up before the collapse animated. The content left the layout flow in the React commit, but the wrapper's height only switched from 7d3b1cc switches the content's |
Motivation
Takes over #5143. Brings
List.ItemandList.Accordionin line with the MD3 list spec: tokens, spacing and typography, selected state, animated accordion, andleadingandtrailingslots onList.Item.leftandrightonList.Itemare deprecated.Related issue
Closes #4976
Part of #4930
Screenshots / Videos
list-accordion.mp4
Test plan
In the List example: