Repository navigation
Conversation
Under Reduce Motion, a release and the end of a refresh fade the list instead of moving it. A new case records, on each frame, how much of a row shows, counting the list and any copy of it, and requires half or more. Today both fades dip to blank, so the case fails in Chromium and in WebKit.
The animator fades a move under Reduce Motion as a dip: out, land, back in. Its opacity passes through 0, so the list went blank as a release or the end settled it. Core's internal entry gains a cross-fade through a copy. A copy of the element fades out where it shows, laid next to the box that clips it, while the element lands and fades in on the same easing. RefreshControl plays it for its settle and its end when Reduce Motion makes them fades. Content too large to copy keeps the animator's dip. The transient copies that component style authoring allows gain this one.
A raw page with a RefreshControl list in a card, above rows that make the document scroll. A pull past the spinner refreshes for 1.5 s.
Not for merge. A page compares two ways a pulled RefreshControl list returns under Reduce Motion, behind a switch: A cross-fades with a brief copy of the list, and B uses one list that fades out where it was, then fades in at rest. Content inside the page's B marker skips the copy, so the animator plays its own form.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approval waits on an engineering owner choosing which Reduce Motion form RefreshControl ships for a release and for a refresh's end: A, the cross-fade through a copy, which needs the new architecture:component-style-authoring INV7 item, or B, the animator's existing fade out and in, which needs no record change. An engineering owner records approval of the INV7 item by commenting /approve-spec <full head SHA> on the pull request that lands it, and the author may do so if they are an engineering owner. If A is chosen, fix these first:
- At release, the copy's clip-path removes the refresh indicator, so the indicator drops from fully shown to 0.001 in one frame instead of fading out, which breaks
design:reduced-motionDR2 (packages/core/src/motion/reducedMotionCrossFade.ts:131-137). clipToreads the scroller's and the copy's boxes right afterplaceOverwrites the copy's position, so every release and end forces extra layout passes, which breaksarchitecture:react-component-runtimeINV18 (reducedMotionCrossFade.ts:122-130).- The new INV7 item allows a copy for content "that a release moves", but the code also makes one at a refresh's end (
packages/lab/src/RefreshControl/refreshTouchController.ts:644), so word the item for both moves or keep the animator's form for the end.
The preview-only selector in refreshTouchController.ts:288-294 must stay off main.
[Automated review]
| side nav collapse or expand (`component:AppShell` FR17); the SideNav rail's | ||
| old state during a collapse or expand (`component:SideNav` FR6); or one moving preview while a | ||
| old state during a collapse or expand (`component:SideNav` FR6); the old | ||
| place of content that a release moves under Reduce Motion, fading out as the |
There was a problem hiding this comment.
"content that a release moves" leaves out the refresh's end, which also lays a copy (refreshTouchController.ts:644, crossFadeContent(finish, false)) and is not started by a release. Word the item for both moves, or keep the animator's form for the end.
| if ( | ||
| element == null || | ||
| fade == null || | ||
| element.closest('[data-refresh-reduce-motion-form="dip"]') != null |
There was a problem hiding this comment.
Non-blocking: this preview switch makes any page that carries data-refresh-reduce-motion-form="dip" turn the cross-fade off. It is fine on a branch that never merges, but it must not reach main.
| /** | ||
| * @file reducedMotionCrossFade.ts | ||
| * @input An element, a Reduced Motion fade (reducedMotion.ts), the change | ||
| * that moves the element, and the box that clips it | ||
| * @output playReducedMotionCrossFade and its handle | ||
| * @position Motion foundation, beside reducedMotion.ts's dip, for a change | ||
| * that a component cross-fades itself instead of through the animator. Lab | ||
| * reaches it through internal/touch.ts. | ||
| * | ||
| * A copy of the element as it shows now fades out where it is, and the | ||
| * element changes at once and fades in. The two fades run together, so the | ||
| * element's area shows the old state, the new one or both on every frame. A | ||
| * dip fades out, lands and fades back in, so the area goes blank between the | ||
| * two. The copy is inert and hidden from assistive technology | ||
| * (transientCopy.ts). It is laid next to the box that clips the element, | ||
| * never inside a scroll container. So a scroll that the change makes does not | ||
| * move it. | ||
| */ |
There was a problem hiding this comment.
Non-blocking (INV29): the header runs to 18 lines, and its second paragraph repeats the function's JSDoc. Suggested: "A dip blanks the area between the two states. A copy keeps one of them on screen on every frame. The copy is laid outside the scroll container, so a scroll that the change makes does not move it."
The copy was clipped to the element's own box, so it never showed what the element draws outside that box. RefreshControl's spinner sits above its list: under Reduce Motion it dipped to nearly nothing at a release and went in one frame as a refresh ended. The copy is now the scroll container's visible part, in an inert holder next to it, so the spinner fades with the list. Every read comes before the first write, so laying the copy out costs one layout. The interaction case also records the spinner. It shows at half or more through the release, and it fades out as the refresh ends.
There was a problem hiding this comment.
Approval waits on an engineering owner choosing which Reduce Motion form RefreshControl ships for a release and for a refresh's end: A, the cross-fade through a copy, which needs the new architecture:component-style-authoring INV7 item, or B, the animator's existing fade out and in, which needs no record change. An engineering owner records approval of the INV7 item by commenting /approve-spec <full head SHA> on the pull request that carries it, and the author may do so if they are an engineering owner. The spinner now fades with the list at release and at the refresh's end, which resolves the earlier indicator and layout findings; if A is chosen, one fix remains:
- The new INV7 item allows a copy only for content "that a release moves", but the code also lays one when a refresh ends (
packages/lab/src/RefreshControl/refreshTouchController.ts:644), so word the item for both moves or keep the animator's form for the end.
[Automated review]
|
Closing: preview only. The choice it showed is settled in #11087. |
Preview only, not for merge. Stack: #11087 → this preview.
Primary intent
A preview page for the design owner's choice of how a pulled RefreshControl list returns under Reduce Motion. No other template fits a page that exists only to be compared on a phone.
User or maintainer impact
None for callers: this branch never merges. It holds #11087 and two commits. One adds the page and a preview-only switch. The other makes A's copy the scroller's visible part, so the spinner fades with the list.
Problem and solution fit
Under Reduce Motion, a pulled list returns by a fade. #11087 cross-fades it with a brief copy of the list. The other way keeps one list: it fades out where it was, then fades in at rest. The page shows both on one list, behind a switch.
Authority
design:reduced-motionDR2 sets the fade: opacity only, within 200 ms. Which form ships is the design owner's call, witharchitecture:component-style-authoringINV7.Change and evidence
/pages/refresh-control-ab/is a raw sandbox page whose document scrolls. A switch picks "A: cross-fade with a brief copy" or "B: one list, out then in". A line says whether Reduce Motion is on.Scope
Components: RefreshControl
Testing
At 39e5541, with 1 worker: