Repository navigation
Conversation
|
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.
The list now stays visible through a Reduce Motion release and refresh end. Approval waits on an engineering-owner decision about the record change, and two fixes are needed either way.
Spec decision: this pull request adds a new permitted transient copy to architecture:component-style-authoring INV7 (the old place of content that a release moves under Reduce Motion). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request; as an engineering owner, you may record it yourself.
Required fixes:
clipToclamps each inset at 0 (packages/core/src/motion/reducedMotionCrossFade.ts:131-137), so the copy never shows the indicator band the content draws above itself, and under Reduce Motion the spinner vanishes in one frame when a refresh ends and drops to near 0 at a release; clip the copy to the scroller's visible box instead (for example a holder likevisiblePartCopy's) and cover the indicator in the new interaction case.clipToreads layout (reducedMotionCrossFade.ts:122-130) right afterplaceOverwrites the copy's position, which forces another layout in the task that starts each cross-fade; read the scroller's box together withrectbefore any write, or use the holder, which needs no read.
[Automated review]
|
/approve-spec e0362d7 |
There was a problem hiding this comment.
Changes requested. An engineering owner approved the record changes for this head (the new INV7 copy kind and the INV13 sentence), so what remains is two fixes in the cross-fade.
- The copy's clip stops at its own box (
Math.max(0, value)inpackages/core/src/motion/reducedMotionCrossFade.ts:136), so it never shows the indicator band that sits above the content, and under Reduce Motion the spinner vanishes in one frame when a refresh ends and blinks at a release; clip the copy to the scroller's visible box without the clamp (or in a holder, asvisiblePartCopydoes), update the unit case that expects the clamped inset, and cover the indicator in the new interaction case. clipToreads layout (reducedMotionCrossFade.ts:122-130) right afterplaceOverwrites the copy's position, which forces another layout in the task that starts each cross-fade; read the scroller's box together withrectbefore any write, and take the host's scale fromplaceOver.
The branch also needs a rebase: apps/sandbox/src/app/sandboxPages.ts and apps/sandbox/scripts/next-export-routes.json conflict with main.
Claims and files checked
- Claims
- The changeset's fix, the list kept in view at a Reduce Motion release and refresh end: verified (a row stays at 0.750 or more in Chromium; the new interaction case).
- The changeset's cross-fade instead of blanking: verified (
reducedMotionCrossFade.ts:78-85). - The cross-fade comes from a new internal touch export and apps import nothing new: verified (
internal/touch.ts:126-127; no public export changes). - The shared animator fades a move as a dip through opacity 0: verified (
reducedMotion.ts,playReducedMotionDip; a row reaches 0.001 on main). - A row never shows below 0.75: verified for the list; the indicator is not covered by that measure.
- Content too large to copy keeps the dip: verified (
isCopyablecaps at 1,500 elements;crossFadeContentthen returns null). - A finger landing mid-fade ends it with the list where it was heading: verified (
refreshTouchController.ts:837-842cancels after the landing already ran). - The animator is unchanged: verified (no animator change).
- The copy is inert, next to the scroll container and clipped to it: verified, but the clip stops at the copy's own box (finding above).
- No public API in the documented entries; the internal touch entry gains the function and its type: verified.
- The record changes, one INV7 item and the INV13 sentence: verified.
- Line counts by area (product, tests, records, changeset, sandbox): verified.
- Seven unit cases for the cross-fade: verified.
- App bundle growth of 1,155 bytes gzip: not verified (no build ran).
- Test, build, typecheck and lint runs passing: not verified here (the test workflow did not run on the draft).
- The sandbox page is a raw page whose document scrolls: verified (
page.tsx).
- Files
.changeset/refresh-control-reduced-motion-cross-fade.md: clear.apps/sandbox/scripts/next-export-routes.json: conflicts withmain.apps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx: clear.apps/sandbox/src/app/sandboxPages.ts: conflicts withmain.docs/architecture/component-style-authoring.md: clear (approved).docs/architecture/react-component-runtime.md: clear (approved).packages/core/src/internal/touch.test.ts: clear.packages/core/src/internal/touch.ts: clear.packages/core/src/motion/animatedLayout.boundary.test.ts: clear.packages/core/src/motion/reducedMotionCrossFade.test.ts: the clip case pins the clamped inset.packages/core/src/motion/reducedMotionCrossFade.ts: both findings above, and three comment suggestions.packages/core/src/motion/transientCopy.ts: clear.packages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts: clear; it does not cover the indicator.packages/lab/src/RefreshControl/refreshTouchController.ts: clear apart from the indicator reset the first finding exposes.scripts/touch-support-bundle.test.mjs: clear.
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.
The invariant on the internal touch modules now names playReducedMotionCrossFade on the internal/touch subpath: what it does under Reduce Motion, and why the animator's dip and the Reduced Motion policy's dip do not cover it.
With Reduce Motion on a phone, Lab's RefreshControl list now cross-fades when a pull is released or a refresh ends, instead of blanking. The cross-fade is a new export of Core's internal/touch entry, so a patch changeset names @astryxdesign/core.
Under Reduce Motion, the copy of the list was clipped at its own box, so it hid the indicator band above the list. The spinner vanished in one frame when a refresh ended, and blinked at a release. The copy is now clipped to the scroller's visible box, past its own edges. The cross-fade reads the scroller's box with the list's, before it lays the copy, and takes the host's scale from placeOver. So laying the copy forces no second layout. The interaction case covers the indicator, and a unit case checks that nothing reads layout once the copy is laid.
e0362d7 to
5bbd943
Compare
|
Both fixed in 5bbd943, and the branch is rebased on main 8b9fbfa, with the sandbox route lists keeping both sides.
|
|
/approve-spec 5bbd943 |
There was a problem hiding this comment.
Changes requested. The list and spinner now stay in view through a Reduce Motion release and refresh end, and both earlier findings are fixed: the copy keeps the indicator band, and the scroller is read before any write. The record changes have an engineering owner's approval at this head, but two fixes remain.
- Miss: the new INV7 item allows the copy only where "a release moves" the content, but
refreshTouchController.ts:639also cross-fades through it at a refresh's end, so widen the item to cover the end (and get the widened item approved at that head) or keep the animator's dip there. - Miss: when the list is scrolled 1-59 px into the inset as a refresh ends,
finishreads and writesscrollTop(refreshTouchController.ts:154) after the copy is laid, so the page is laid out twice before the fade starts (INV18); cross-fade ontoanimateToand callfinishonce the cross-fade resolves, as the motion path does.
Two non-blocking comment-wording notes stay open inline.
Claims and files checked
- Changeset, the list stays in view at a release and an end under Reduce Motion on touch: verified in code (
refreshTouchController.ts:514,:639) and asserted by the new interaction case. - Changeset, the cross-fade comes from a new
internal/touchexport and apps import nothing new: verified (internal/touch.ts:126-127; no public export changes). - Before the change a row dips to about 0, after it stays at 0.75 or more: consistent with the code and with earlier Chromium traces of the same list path; not re-run here.
- The spinner now fades with the copy: verified in code (
reducedMotionCrossFade.ts:157-163) and asserted by the interaction case; not re-run here. - The copy is laid next to the scroller and clipped to its visible box past its own edges, with that box read before any write: verified (
reducedMotionCrossFade.ts:57-78, unit cases). - Content too large to copy gets null and keeps the dip: verified (
transientCopy.ts:47-52,refreshTouchController.ts:298-300). - A finger landing mid-fade ends it with the list where it was heading: verified (
refreshTouchController.ts:267-272,:837-842). - The animator is unchanged, and
placeOverreturns the host's scale: verified (transientCopy.ts:272). - Normal motion, a trackpad's release and the other Reduce Motion cases are unchanged: verified by the
'crossfade'gate (refreshTouchController.ts:283-290). - INV7 gains one copy kind and INV13 names the export: verified; the INV7 item covers only a release (finding above).
- Line counts per area and the eight unit cases: verified.
- Browser and unit pass counts and the app-level size figure: not rechecked.
- Files:
refreshTouchController.tsandcomponent-style-authoring.mdhave the findings above;reducedMotionCrossFade.tshas two non-blocking comment notes;.changeset/refresh-control-reduced-motion-cross-fade.md,next-export-routes.json, the sandbox page,sandboxPages.ts,react-component-runtime.md,internal/touch.ts,internal/touch.test.ts,animatedLayout.boundary.test.ts,reducedMotionCrossFade.test.ts,transientCopy.ts, the interaction spec andtouch-support-bundle.test.mjs: clear.
Under Reduce Motion, a release that left the list where it was, such as a pull pushed back past its start or a pull during a refresh that returns to the inset, still cross-faded. The list dimmed to about 0.75 under a copy. A move of 0.05 px or less, the controller's own at-target tolerance, now lands at once with no copy. Two interaction cases cover the pushed-back pull and the return to the inset.
|
/approve-spec 402e9bd |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
Under Reduce Motion on a touch screen, RefreshControl keeps its list and spinner in view through a pull's release and a refresh's end, and a release that moves nothing now lands at once with no copy, which was the last open problem. An engineering owner approved both record changes for this head, and no blocking findings remain.
Claims and files checked
Claims:
- Changeset: under Reduce Motion on a phone the list stays in view when a pull is released or a refresh ends — verified (
refreshTouchController.ts:529,:661). - Changeset: it cross-fades to its new place instead of blanking — verified (
reducedMotionCrossFade.ts:83-93). - Changeset: the cross-fade comes from a new internal export, and apps import nothing new — verified (
internal/touch.ts:129-130; no public export). - The shared animator turns a Reduce Motion move into a dip through opacity 0 — verified (
reducedMotionPlan.ts:238-274). - A row never shows below 0.75 — verified from the keyframes (list 0.001 to 1, copy 1 to 0, one easing).
- The quoted reduced-motion rule and the new transient-copy item — verified against the records.
- The helper lays an inert copy next to the scroll container, clipped to its visible box, reads that box before any write, then lands the list and plays both fades; content too large to copy gets null and the dip plays — verified (
reducedMotionCrossFade.ts:60-93,transientCopy.ts:47-52). - The settle and the end use it; an end into the inset cross-fades onto its slide's end and then takes the scroll back; a refresh begun mid-fade stops it first; a release that moves nothing lands at once — verified (
refreshTouchController.ts:303-306,:529,:661-671,:929). - Normal motion, a trackpad's release and the other Reduce Motion cases are unchanged — verified (
refreshTouchController.ts:294-301); a move of 0.05 px or less, which the animator dipped, now lands at once, a difference no one can see. - Five interaction cases and eight unit cases — verified.
- The head adds one commit on top of a merge of main, and the merges keep both sides of the internal-entry sentence and the bundle test's names — verified.
- The sandbox page is test surface only — verified (a raw route in the sandbox app).
- No public API change; the internal entry, the new module and the placement helper's return value are as described — verified.
- The line counts per group — verified (1,236 added, 21 deleted).
- The record text is present tense with no narration — verified.
- Browser, unit, typecheck, lint, build and bundle-size results, and the failing runs on earlier revisions — the author's results, not rerun here; CI has not run on this head.
Files:
.changeset/refresh-control-reduced-motion-cross-fade.md— clearapps/sandbox/scripts/next-export-routes.json— clearapps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx— clearapps/sandbox/src/app/sandboxPages.ts— cleardocs/architecture/component-style-authoring.md— clear (owner-approved)docs/architecture/react-component-runtime.md— clear (owner-approved)packages/core/src/internal/touch.test.ts— clearpackages/core/src/internal/touch.ts— clearpackages/core/src/motion/animatedLayout.boundary.test.ts— clearpackages/core/src/motion/reducedMotionCrossFade.test.ts— clearpackages/core/src/motion/reducedMotionCrossFade.ts— clearpackages/core/src/motion/transientCopy.ts— clearpackages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts— clearpackages/lab/src/RefreshControl/refreshTouchController.ts— clearscripts/touch-support-bundle.test.mjs— clear
|
/approve-spec 25f17e1 |
There was a problem hiding this comment.
Changes requested: both record changes have an engineering owner's approval for this head, and the cross-fade works as described while the list stays mounted. Three things remain.
- Regression: the iPhone and Pixel runs in the description are at the previous head, and this head's merge of main changed two files this pull request changes plus the shared animator module, so
spec:AST-094DEC-31 does not carry them; run the side-by-side on the same phones at this head (iOS Safari on a real iPhone; Android Chrome with animations at normal scale and removed, plus a slow-device profile, as DEC-27 asks) and state each run in the description. - Miss: nothing cancels the Reduce Motion cross-fade when the list unmounts (
refreshTouchController.ts:272,:720-727), so its copy lingers over what replaced the list and the end'sfinishcan still scroll a surviving container, againstarchitecture:react-component-runtimeINV5; cancel it in the unmount cleanup and whencontentRefdetaches the list with no replacement, and add a case that unmounts mid-fade. - Miss: the description's "Unchanged: … a trackpad's release" is false on a coarse primary pointer, where a trackpad's release now cross-fades through the copy instead of dipping (
refreshTouchController.ts:528); say that it holds on a fine primary pointer.
A code change makes a new head, which needs a fresh /approve-spec for the two records and phone runs at that head. CI has not run on this draft head yet.
Claims and files checked
Claims:
- Changeset: with Reduce Motion on a phone, the list stays in view when a pull is released or a refresh ends: verified (
refreshTouchController.ts:529,:661). - Changeset: it cross-fades to its new place instead of blanking: verified (
reducedMotionCrossFade.ts:83-93). - Changeset: the cross-fade comes from a new internal export, and apps import nothing new: verified (
internal/touch.ts:129-130; no public export). - On the base, a Reduce Motion release and a refresh's end blank the list and spinner, because the shared animator plays a move as a dip through opacity 0: verified (
reducedMotionPlan.ts:239). - A copy fades out where the list showed, spinner band included, while the list lands and fades in on one easing: verified (
reducedMotionCrossFade.ts:79-93, negative top inset inclipTo). - A row never shows below 0.75: holds only as the test measures it, both drawings of a row together; each drawing bottoms near 0.5 mid-fade (non-blocking note).
- The quoted reduced-motion rule and the new transient-copy item: verified against the records.
- The helper lays an inert copy beside the scroll container, clipped to its visible box, reads that box before any write, then lands the list and plays both fades; content too large to copy falls back to the dip: verified (
reducedMotionCrossFade.ts:60-93,transientCopy.ts:47-51). - The settle and the end use it; an end into the inset cross-fades onto its slide's end, then takes the scroll back; a refresh begun mid-fade stops it first; a release that moves nothing lands at once: verified (
refreshTouchController.ts:303-306,:529,:661-671,:929). - Unchanged: normal motion, a trackpad's release and the other Reduce Motion cases: false for a trackpad's release on a coarse primary pointer, which now cross-fades (finding above); true on a fine primary pointer.
- Five new interaction cases and eight unit cases: verified.
- The head merges main into the previous head with no conflict, and the pull request's own text is unchanged by the merges: verified (the patch is identical to the previous head's).
- Browser, unit, accessibility, typecheck, lint, build and bundle-size results, and the failures on earlier revisions: the author's results, not rerun; CI has not run on this head.
- Phone runs on a real iPhone and a Pixel: stated for the previous head; runs at this head are pending (finding above).
- The sandbox page is test surface only: verified (a raw route in the sandbox app).
- No public API change; the internal entry gains the function and its type; the new module; the placement helper returns the host's scale: verified.
- The line counts per group: verified (1,236 added, 21 deleted).
- The record text is present tense, with no narration or project status: verified.
Files:
.changeset/refresh-control-reduced-motion-cross-fade.md: clearapps/sandbox/scripts/next-export-routes.json: clearapps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx: clearapps/sandbox/src/app/sandboxPages.ts: cleardocs/architecture/component-style-authoring.md: clear (owner-approved for this head)docs/architecture/react-component-runtime.md: clear (owner-approved for this head)packages/core/src/internal/touch.test.ts: clearpackages/core/src/internal/touch.ts: clearpackages/core/src/motion/animatedLayout.boundary.test.ts: clearpackages/core/src/motion/reducedMotionCrossFade.test.ts: clearpackages/core/src/motion/reducedMotionCrossFade.ts: clear (one wording note on the 0.75 comment)packages/core/src/motion/transientCopy.ts: clearpackages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts: clear (no case unmounts mid-fade)packages/lab/src/RefreshControl/refreshTouchController.ts: finding (the cross-fade is not released on unmount)scripts/touch-support-bundle.test.mjs: clear
Under Reduce Motion, nothing cancelled the cross-fade when the list unmounted. Its copy stayed over what replaced the list, and the end's deferred finish could still scroll. The controller now cancels it at unmount, and when its content element detaches with none in its place. A list element swapped mid-fade keeps the cross-fade, so the end still finishes. The scroll-container story can unmount its list on a window event, and an interaction case unmounts it in the middle of the end's cross-fade.
|
Thanks. In ae54d25, an unmount cancels the cross-fade: in the controller's unmount cleanup, and when its content element detaches with none in its place. A list element swapped mid-fade keeps the cross-fade, so the end still finishes. A new interaction case unmounts the list 60 ms into the end's cross-fade. At 25f17e1 the copy outlived the list; now it is gone before the next frame, and no scroll is written after. The description now limits the trackpad claim to a fine primary pointer, and the phone runs at this head follow. |
|
/approve-spec ae54d25 |
There was a problem hiding this comment.
Changes requested: the code and both record changes are ready, and an engineering owner approved the records for this head; one evidence gap remains.
- The phone runs in the description are for an earlier head and the runs at this head are marked pending;
spec:AST-094DEC-27 needs them at the exact head, and DEC-31 does not carry them because this head adds the unmount fix and its merges change the shared animator, so run the side-by-side on the same phones at this head (iOS Safari on a real iPhone; Android Chrome with animations at normal scale and removed, plus a slow-device profile) and state each run in the description.
Stating the runs needs no new commit, so the current /approve-spec stays valid. CI has not run on this draft head yet. A wording suggestion: "a row never shows below 0.75" counts both drawings of a row together, and each is near 0.5 mid-fade, so "the list area shows the old rows, the new rows or both on every frame" says it more exactly.
Claims and files checked
Claims:
- Changeset: with Reduce Motion on a phone, the list stays in view when a pull is released or a refresh ends: verified (
refreshTouchController.ts:536,:668; midpoint frames in Chromium phone emulation). - Changeset: it cross-fades to its new place instead of blanking: verified (
reducedMotionCrossFade.ts:83-93). - Changeset: the cross-fade comes from a new internal export, and apps import nothing new: verified (
internal/touch.ts:133-134; the API generator finds no public change). - On the base, a Reduce Motion release and a refresh's end blank the list and spinner: verified (base midpoint frames are blank).
- The shared animator plays the move as a dip through opacity 0: verified (the base's content fade holds at 0 until the list lands).
- A copy of the list, spinner band included, fades out as the list lands and fades in: verified (
reducedMotionCrossFade.ts:79-93; the end's midpoint frame shows the band in the copy). - A row never shows below 0.75: holds only counting both drawings of a row together; each drawing is near 0.5 mid-fade (wording suggestion above).
- The quoted reduced-motion rule and the new transient-copy item: verified against the records.
- The helper lays an inert copy beside the scroll container, clipped to its visible box past the copy's edges, reads that box before any write, and leaves content too large to copy to the dip: verified (
reducedMotionCrossFade.ts:60-81,transientCopy.ts:47-51). - The settle and the end use it; an end into the inset cross-fades onto its slide's end, then takes the scroll back: verified (
refreshTouchController.ts:536-550,:665-680). - A new refresh or an unmount stops it mid-fade, and a release that moves nothing lands at once: verified (
:948,:729-737,:913-921,:310-313). - Unchanged: normal motion, a trackpad's release on a fine primary pointer, and the other Reduce Motion cases: verified (
:301-306; a fine pointer gets an immediate change). - Six new interaction cases and eight unit cases: verified.
- The merge history in Testing: verified.
- Unit tests for the cross-fade, the internal entry, the copy mechanism, RefreshControl and the bundle test: verified (rerun, all pass); browser, accessibility, build, typecheck and lint results and the failures on earlier revisions: the author's, not rerun.
- Phone runs on a real iPhone and a real Android phone: stated for an earlier head; runs at this head are pending (finding above).
- The sandbox page is test surface only: verified.
- No public API change; the internal entry gains the function and its type; the new module; the placement helper returns the host's scale: verified.
- The line counts per group: verified.
- The bundle-size figures: the author's, at an earlier revision, not rerun.
- The record text is present tense, with no narration or project status: verified.
Files:
.changeset/refresh-control-reduced-motion-cross-fade.md: clearapps/sandbox/scripts/next-export-routes.json: clearapps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx: clearapps/sandbox/src/app/sandboxPages.ts: clearapps/storybook/stories/PullToRefresh.stories.tsx: cleardocs/architecture/component-style-authoring.md: clear (owner-approved for this head)docs/architecture/react-component-runtime.md: clear (owner-approved for this head)packages/core/src/internal/touch.test.ts: clearpackages/core/src/internal/touch.ts: clearpackages/core/src/motion/animatedLayout.boundary.test.ts: clearpackages/core/src/motion/reducedMotionCrossFade.test.ts: clearpackages/core/src/motion/reducedMotionCrossFade.ts: clearpackages/core/src/motion/transientCopy.ts: clearpackages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts: clearpackages/lab/src/RefreshControl/refreshTouchController.ts: clearscripts/touch-support-bundle.test.mjs: clear
|
Decision: D-20261112-609 |
Merge carry by Cindy's M&G lane; conflicts resolved in packages/core/src/internal/touch.ts (keeps both new re-exports: this branch's playReducedMotionCrossFade and main's useFocusAcrossSwap), its re-export test and the touch bundle's export list (both names), and docs/architecture/react-component-runtime.md (main's shorter prepareFocusReturnOnRemoval sentence plus this branch's playReducedMotionCrossFade sentences); no product change. Branch work by @vjeux.
|
/approve-spec 8e7ea02 |
There was a problem hiding this comment.
Changes requested. Run here, the cross-fade works: RefreshControl's interaction spec passes in Chromium, and the list no longer blanks at a Reduce Motion release or refresh end. An engineering owner has approved both record changes for this head, and none of the items below needs a code change.
- Phone runs missing at this head: the iPhone and Pixel runs are stated for the previous head, and this head's merge of
mainchangesinternal/touch.ts,motion/reducedMotion.tsand the shared animator, layer and gesture-host modules, so those runs no longer carry; please run the same side-by-side on this head and state each run in the description. - Claims overstate where the list stays in view: a list over 1,500 elements still dips, and rows that scroll into view fade in from near 0, so the changeset ("keeps its list in view…"), the title and the description's "A row never shows below 0.75" and "never dips to blank" need that bound.
- Newly live check: Reference-page sizes missing: this change grows
transientCopy.ts, so please state the first-load gzip delta on the four reference pages (docs, form, menu, table); a measurement here shows +0 B on each.
Claims and files checked
Review mode: full; reason: requested
- Title: a Reduce Motion release cross-fades the list. False: lists over 1,500 elements, a trackpad release under a fine pointer, and a release that moves nothing all skip the cross-fade.
- Changeset: the list stays in view at a release or a refresh end. False for lists over 1,500 elements.
- Changeset: the cross-fade comes from a new internal export, and apps import nothing new. Verified (
internal/touch.ts:131-134; the API report, run here, lists 0 rows). - Base behavior: the shared animator dips the list through opacity 0. Reported; this run's base frame shows opacity 0 at 100 ms.
- A copy of the list, spinner band included, fades out as the list lands and fades in. Verified (the unit clip case and the first new interaction case, run here).
- A row never shows below 0.75. False: rows that scroll into view show at 0.5 at the midpoint here, and lists over 1,500 elements dip.
- The quoted INV7 item and the INV13 sentences. Verified against the records at this head.
- The helper lays an inert copy beside the scroll container, clipped to its visible box, and reads that box before any write. Verified (unit cases run here).
- Content too large to copy keeps the dip. Verified (
transientCopy.ts:47-52). - The settle and the end use the helper; an end into the inset cross-fades onto its slide end and then takes the scroll back. Verified (interaction case run here).
- A new refresh or an unmount stops the cross-fade mid-fade, and a release that moves nothing lands at once. Verified (four interaction cases run here).
- Normal motion, a trackpad release under a fine pointer, and other Reduce Motion cases are unchanged. Verified by reading the diff and by the spec's other cases, run here.
- Regression tests: six interaction cases and eight unit cases. Verified by counting them.
- Red-first runs, earlier-head browser runs, device runs, bundle size and accessibility counts. Reported; the device runs are for the previous head (see the blocking finding).
- No public API change; the internal entry gains two names; a new internal module;
placeOverreturns the scale. Verified. - Per-category line counts. Verified (+323/-16, +895/-2, +10/-3, +7/-0, +145/-8).
- Merge carry: conflicts resolved by keeping both sides, no product change, and the checks pass. Verified: the pull request's own patch is unchanged apart from INV13's rewrap; the unit tests, the Core typecheck and the Lab source typecheck pass here.
- Writing rubric results. Present.
.changeset/refresh-control-reduced-motion-cross-fade.md: finding (claims)apps/sandbox/scripts/next-export-routes.json: clearapps/sandbox/src/app/(raw)/pages/refresh-control/page.tsx: clearapps/sandbox/src/app/sandboxPages.ts: clearapps/storybook/stories/PullToRefresh.stories.tsx: cleardocs/architecture/component-style-authoring.md: clear (owner-approved)docs/architecture/react-component-runtime.md: clear (owner-approved)packages/core/src/internal/touch.test.ts: clearpackages/core/src/internal/touch.ts: clear (it ends the device-evidence carry)packages/core/src/motion/animatedLayout.boundary.test.ts: clearpackages/core/src/motion/reducedMotionCrossFade.test.ts: clearpackages/core/src/motion/reducedMotionCrossFade.ts: clear (the claims finding cites its clip)packages/core/src/motion/transientCopy.ts: finding (reference-page sizes)packages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts: clearpackages/lab/src/RefreshControl/refreshTouchController.ts: clearscripts/touch-support-bundle.test.mjs: clear
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] With Reduce Motion on a phone, Lab's RefreshControl keeps its list in view when a pull is released or a refresh ends. It cross-fades to its new place instead of blanking between the two. The cross-fade comes from a new export of `internal/touch`; apps import nothing new. |
There was a problem hiding this comment.
This holds only for lists the copy can take: over 1,500 elements, playReducedMotionCrossFade returns null and the animator still dips the list through opacity 0 (transientCopy.ts:47-52). Suggested: "…keeps a list of up to 1,500 elements in view when a pull is released or a refresh ends; a larger list keeps the dip."
User impact
With Reduce Motion on a phone, a pull's release and a refresh's end blank RefreshControl's list and spinner for a moment. Both should stay in view.
Problem and solution fit
Under Reduce Motion, the shared animator turns the list's move into a dip: out, land, back in, through opacity 0.
Now a copy of the list, spinner band included, fades out as the list lands and fades in. A row never shows below 0.75.
Expected behavior and authority
design:reduced-motionDR2: a transition that a touch release starts changes opacity only, within 200 ms. "An entering element appears in its final place and fades in; a leaving element fades out where it is." Its cross-fade "connects the two states".It adds one item to the transient copies
architecture:component-style-authoringINV7 allows:Smallest restoration
playReducedMotionCrossFadelays an inert copy beside the scroll container, clipped to its visible box past the copy's edges. It reads that box before any write. Content too large to copy keeps the dip.Evidence
Scope
Components: RefreshControl, motion
Testing
The head, ae54d25, merges main 787369d into 15b3624. Main added
prepareFocusReturnOnRemovalto INV13, and the merge keeps both sentences. 15b3624 adds one commit to 25f17e1: an unmount ends a cross-fade in flight. 25f17e1 merges main 91cd63f into 402e9bd with no conflict. 402e9bd adds one commit to 57ba8f6: a release that moves nothing lays no copy. 57ba8f6 merges main 426ba23 into a16514c. Main addedtimingto INV13 and to the bundle test's Lab-only names, and the merge keeps both sides. a16514c merged main 061b2fa into 1ff7ccb with no conflict. Neither merge changes this pull request's own text; INV13's lines rewrap around main's new sentence. 1ff7ccb is the branch rebased on main 8b9fbfa, plus four commits. The first two show the indicator band in the copy and cross-fade an end into the inset onto its slide. The third widens the INV7 item, and the fourth keeps a refresh begun mid-fade on its inset. The sandbox route lists keep both sides. At this head, every browser run used 1 worker:animatedLayoutspecs and their adopters, busy and reveal-paint specs: 118 passed in Chromium, and 115 passed (3 skipped) in WebKit. This head changes no Core file.pnpm test:a11y-contract:pr): 141 passed in Chromium.pnpm check:knowledgeandpnpm check:changesetspass./pages/refresh-control/, is test surface only: a raw sandbox page whose document scrolls.Device runs at the head ae54d25, stated in text: the clips exist and are not attached. Both heads ran interleaved on one iPhone 14 and one Pixel 8. Each phone read the sandbox's
version.jsonfor each head: ae54d25 and 8391a16. Each case matches 8391a16, except the pushed-back pull, which no longer fades. The measure is the list text's contrast per frame, against 1.00 at rest. The 402e9bd take ran the same steps and reached the same verdict.At 4195083, before the rebase and the band fix, on main fcf9286:
animatedLayout: 101 and 101.animatedLayoutAdopters: 6 and 6.animatedLayoutRevealPaint: 8 and 8.animator: 22 and 15.themeTempo: 6 and 6.themeTiming: 8 and 8.animatedLayoutBusy: 3, skipped in WebKit.pnpm build, the sandbox build andpnpm check:repopassed.Public and internal API delta
./internal/*entries (INV24).@astryxdesign/core/internal/touch, the published entry Lab reads, gainsplayReducedMotionCrossFadeand the typeReducedMotionCrossFade.packages/core/src/motion/reducedMotionCrossFade.tsexports both.playReducedMotionCrossFade(element, fade, land, owner.current)in RefreshControl's touch controller. ItsfadeisreducedMotionFade(element, {touchRelease}).motion/reducedMotion.ts, which holds the animator's dip andreducedMotionFade. It could hold the cross-fade beside the dip.placeOverinmotion/transientCopy.tsreturns the host's scale on each axis.const scale = placeOver(copy, host, rect, anchor.nextSibling);in the cross-fade, which converts the clip's insets with it.placeOveralready measures that scale to lay the copy.architecture:component-style-authoringINV7 gains one allowed transient copy.architecture:react-component-runtimeINV13 namesplayReducedMotionCrossFadeoninternal/touch, and says why the motion modules' dip does not cover it./pages/refresh-control/, and the scroll-container story'srefreshcontrol-story-unmountevent.Writing rubric results
architecture:component-style-authoringINV7 gains one present-tense item in its list of transient copies. The item is the old place of content a Reduce Motion cross-fade moves, such as RefreshControl's list at a release or a refresh's end.architecture:react-component-runtimeINV13 gains two present-tense sentences onplayReducedMotionCrossFade: what it does, and why the dip does not cover it.Merge carry (8e7ea02): merge carry by Cindy's M&G lane; conflicts resolved in
packages/core/src/internal/touch.ts(keeps both new re-exports: this branch'splayReducedMotionCrossFadeand main'suseFocusAcrossSwap), its re-export testinternal/touch.test.tsandscripts/touch-support-bundle.test.mjs(both names), anddocs/architecture/react-component-runtime.md(main's shorterprepareFocusReturnOnRemovalsentence plus this branch'splayReducedMotionCrossFadesentences); no product change. Checked on the merged tree: Prettier and ESLint on the files that differ frommain,pnpm check:knowledge, Core internal/motion and Lab RefreshControl unit tests (52 files, 1161 tests), the touch bundle test (16 tests) and the Core and Lab source typechecks pass.