Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supported Web Animations Api for navigation animations (Mobile) #808

Merged
merged 68 commits into from
Sep 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
bc195b7
Sketched in first idea of the 'new' scene Motion
grahammendick Sep 13, 2024
f28a0f2
Used scene for brevity
grahammendick Sep 13, 2024
d223888
Rendered the scenes from the animator
grahammendick Sep 13, 2024
41e8975
Filtered out persisting scenes
grahammendick Sep 13, 2024
72a87f3
Sketched in animation api idea
grahammendick Sep 13, 2024
aa7b8e0
Ensured only one of the four can be true at once
grahammendick Sep 14, 2024
78debcf
Animated pushExit and popEnter
grahammendick Sep 14, 2024
383eaa0
Tidied up push/pop/enter/exit
grahammendick Sep 14, 2024
776ec6d
Specified the crumb to match the unmounted
grahammendick Sep 14, 2024
85f9055
Added rest/freeze back
grahammendick Sep 14, 2024
6f2f146
Fixed when start on details scene
grahammendick Sep 14, 2024
48583d4
Copy simplified freeze from nav react native web
grahammendick Sep 14, 2024
cee0a93
Fixed animations when back twice
grahammendick Sep 14, 2024
868e5b6
Renamed because it's popEnter
grahammendick Sep 14, 2024
9b454c6
Added reminder
grahammendick Sep 14, 2024
c68a0ab
Remove console log
grahammendick Sep 14, 2024
133d502
Prevented animation on the first load
grahammendick Sep 15, 2024
cd56945
Fixed unit tests
grahammendick Sep 15, 2024
92a00ef
Removed the popExit in useLayoutEffect for tests
grahammendick Sep 15, 2024
09a119e
Tweaked format for consistency
grahammendick Sep 15, 2024
261240b
Supported keeping history back/forward pressed
grahammendick Sep 16, 2024
0d99054
Removed redundant commented
grahammendick Sep 16, 2024
82504ce
Took animation from unmount/crumbStyle props
grahammendick Sep 16, 2024
5bc3420
Handled double back/forward then forward/back
grahammendick Sep 16, 2024
44f1570
Supported array value in style props
grahammendick Sep 16, 2024
ab14b18
Tweaked format
grahammendick Sep 16, 2024
d389e48
Fixed animations for fluent navigation
grahammendick Sep 16, 2024
2caa385
Merged two ifs into one for clarity
grahammendick Sep 16, 2024
bdaeefa
Removed redundant prop
grahammendick Sep 16, 2024
28d6549
Fixed back/forward during a replace navigation
grahammendick Sep 16, 2024
b91cb6d
Ensured keys unique representation of crumbs
grahammendick Sep 16, 2024
504c6be
Fixed tests by removing key asserts
grahammendick Sep 17, 2024
36e065c
Ensured replacing scene above replaced
grahammendick Sep 17, 2024
ba43999
Tweaked format for consistency
grahammendick Sep 17, 2024
846256d
Removed console log
grahammendick Sep 17, 2024
2f6ff3c
Created separate NavigationStack component
grahammendick Sep 17, 2024
fabc0ff
Fixed the tests by removing className for now
grahammendick Sep 17, 2024
9c39370
Removed redundant code
grahammendick Sep 17, 2024
eba8fbd
Used mount flag instead of calculating
grahammendick Sep 17, 2024
7b6c1cb
Extracted into NavigationAnimation component
grahammendick Sep 17, 2024
0b3a1b9
Added className prop to stack
grahammendick Sep 17, 2024
fbe596f
Started testing the NavigationStack
grahammendick Sep 17, 2024
828ed7e
Added more navigation stack tests
grahammendick Sep 17, 2024
a436f80
Added more navigation stack tests
grahammendick Sep 17, 2024
84cf175
Added more navigation stack tests
grahammendick Sep 18, 2024
a5a567c
Added more navigation stack tests
grahammendick Sep 18, 2024
1730eaa
Added more navigation stack tests
grahammendick Sep 18, 2024
5ac6ac0
Added more navigation stack tests
grahammendick Sep 18, 2024
8c048ae
Fixed when animating multiple history back at once
grahammendick Sep 19, 2024
9c266f1
Fixed failing tests after previous change
grahammendick Sep 19, 2024
77cd600
Added more navigation stack tests
grahammendick Sep 19, 2024
76895bd
Added last navigation stack tests
grahammendick Sep 19, 2024
764c011
Tested className prop on stack and scene
grahammendick Sep 19, 2024
6b56768
Removed duplicate test
grahammendick Sep 19, 2024
28d405f
Tested style prop on stack and scene
grahammendick Sep 19, 2024
070fa18
Forgot to check in the style prop changes
grahammendick Sep 19, 2024
2374ce5
Supported turning off animation
grahammendick Sep 19, 2024
c6cd133
Corrected keyframes check
grahammendick Sep 19, 2024
8672767
Tweaked format
grahammendick Sep 19, 2024
252a895
Tweaked format
grahammendick Sep 19, 2024
5fdbc7e
Started add Stack versions of all the hook tests
grahammendick Sep 19, 2024
b02e907
Added more Stack hook tests
grahammendick Sep 19, 2024
f6bc046
Added more Stack unloaded hook tests
grahammendick Sep 19, 2024
32b4cd5
Added Stack unloading hook tests
grahammendick Sep 19, 2024
cc35071
Added Stack navigated hook tests
grahammendick Sep 19, 2024
40e7851
Added Stack navigating hook tests
grahammendick Sep 19, 2024
0be6a4c
Corrected default scene style
grahammendick Sep 19, 2024
ed3775a
Typed the NavigationStack component
grahammendick Sep 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweaked format
  • Loading branch information
grahammendick committed Sep 19, 2024
commit 252a895b05a440ac3051517b47e231caf9572e8f
3 changes: 1 addition & 2 deletions NavigationReactMobile/src/NavigationAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const NavigationAnimation = ({children, data: nextScenes, onRest, oldState, dur
const prevNavState = scene.navState || scene.prevNavState;
if (!scene.animate) {
if (popExit) setScenes(({all, ...rest}) => ({all: all.filter((_s, index) => index !== i), ...rest}));
if (pushEnter && prevNavState !== 'pushEnter') onRest({key});
if (popEnter && prevNavState !== 'popEnter') onRest({key});
if ((pushEnter && prevNavState !== 'pushEnter') || (popEnter && prevNavState !== 'popEnter')) onRest({key});
scene.prevNavState = pushEnter ? 'pushEnter' : popExit ? 'popExit' : pushExit ? 'pushExit' : 'popEnter';
return;
};
Expand Down