react/scripts
Sebastian Markbåge 88479c6fc3
Rerender useSwipeTransition when direction changes (#32379)
We can only render one direction at a time with View Transitions. When
the direction changes we need to do another render in the new direction
(returning previous or next).

To determine direction we store the position we started at and anything
moving to a lower value (left/up) is "previous" direction (`false`) and
anything else is "next" (`true`) direction.

For the very first render we won't know which direction you're going
since you're still on the initial position. It's useful to start the
render to allow the view transition to take control before anything
shifts around so we start from the original position. This is not
guaranteed though if the render suspends.

For now we start the first render by guessing the direction such as if
we know that prev/next are the same as current. With the upcoming auto
start mode we can guess more accurately there before we start. We can
also add explicit APIs to `startGesture` but ideally it wouldn't matter.
Ideally we could just start after the first change in direction from the
starting point.
2025-02-20 18:13:09 -05:00
..
babel Test infra: Support gate('enableFeatureFlag') (#30760) 2024-08-20 16:40:01 -04:00
bench Don't minify symbols in production builds (#28881) 2024-04-20 11:23:46 -04:00
ci [ci] Try to parallelize devtools builds (#32266) 2025-01-30 11:49:04 -05:00
devtools fix[scripts/devtools/publish-release]: parse version list instead of handling 404 (#31087) 2024-09-30 17:07:54 +01:00
error-codes Rerender useSwipeTransition when direction changes (#32379) 2025-02-20 18:13:09 -05:00
eslint [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
eslint-rules [tests] Remove to*Dev matchers (#31989) 2025-01-07 14:17:14 -05:00
flags Add --cleanup option to flags script to show groups of flags by status (#31762) 2024-12-13 15:49:06 -05:00
flow Rerender useSwipeTransition when direction changes (#32379) 2025-02-20 18:13:09 -05:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest [flags] enable owner stacks everywhere (#32376) 2025-02-18 10:29:40 -05:00
perf-counters [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
prettier [prettier] Combine compiler and runtime configs 2024-06-21 12:05:29 -04:00
print-warnings Disable consoleWithStackDev Transform except in RN/WWW (#30313) 2024-07-12 14:39:38 -04:00
release [ci] getWorkflowRun should not throw early if workflow hasn't completed (#31861) 2024-12-19 13:03:11 -05:00
rollup Rerender useSwipeTransition when direction changes (#32379) 2025-02-20 18:13:09 -05:00
shared [Flight Parcel] Align with more recent changes (#31741) 2024-12-12 14:39:25 -05:00
tasks [ci] Cleanup more references to circleci 2024-07-29 19:18:03 -04:00