Skip to content

chore(sandbox): preview only, two Reduce Motion returns of a pulled list - #11093

Closed
vjeux wants to merge 5 commits into
meta:mainfrom
vjeux:preview/refresh-control-reduce-motion-ab
Closed

vjeux wants to merge 5 commits into
meta:mainfrom
vjeux:preview/refresh-control-reduce-motion-ab

Conversation

@vjeux

@vjeux vjeux commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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-motion DR2 sets the fade: opacity only, within 200 ms. Which form ships is the design owner's call, with architecture:component-style-authoring INV7.

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.
  • A preview-only marker on the page's list makes RefreshControl skip the copy, so the animator plays its own form: fade out, land, fade in.

Scope

Components: RefreshControl

  • This PR has one primary intent.
  • Independently removable deltas were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

At 39e5541, with 1 worker:

  • RefreshControl's interaction spec: Chromium 26 passed (1 skipped), WebKit in CI's container 21 passed (6 skipped).
  • Motion's seven interaction specs pass in both engines.
  • The list-and-spinner case fails 3 of 3 per engine on main 2569989, and with A's earlier copy, which hid the spinner.
  • The page in Chromium at a phone's size, under Reduce Motion, three takes each:
    • A: a row shows at 0.750 or more, and the spinner at 0.750 or more through the release. At the end the spinner fades out over 200 ms.
    • B: the row drops to 0.000 at the release and at the end, and the spinner drops to 0.000 at the release.

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.
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 10, 2026 9:43pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 10, 2026
@astracat-bot

astracat-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 10, 2026, 9:52 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-motion DR2 (packages/core/src/motion/reducedMotionCrossFade.ts:131-137).
  • clipTo reads the scroller's and the copy's boxes right after placeOver writes the copy's position, so every release and end forces extra layout passes, which breaks architecture:react-component-runtime INV18 (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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +3 to +20
/**
* @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.
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

@vjeux

vjeux commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Closing: preview only. The choice it showed is settled in #11087.

@vjeux vjeux closed this Nov 12, 2026

This branch was successfully deployed

1 active deployment
Preview — 39e55417 Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant