Satyajit Sahoo
0a19e94b23
fix: make sure the address bar hides when scrolling on web
...
This commit adds a check to detect if the screen content fills the available body, and if yes, then it adjusts the styles so that scrolling triggers a scroll on the body which hides the address bar in browser.
Tested on Safari in iOS and Chrome on Android.
This behaviour can be overriden by the user by specifying `cardStyle: { flex: 1 }`, which will keep both the header and the address bar always visible.
2020-04-30 21:53:17 +02:00
Satyajit Sahoo
c511bc0b2b
refactor: stub gesture handler on web
...
Gesture handler doesn't work great on Web and causes issues such as disabling text selection even when not enabled. So we stub it out. It also reduces bundle size on web.
2020-04-29 12:49:46 +02:00
Satyajit Sahoo
38020de80b
refactor: simplify API for useLinkBuilder
2020-04-27 17:45:20 +02:00
Satyajit Sahoo
a695cf9c05
fix: don't add back the route being replaced
2020-04-27 02:41:46 +02:00
Satyajit Sahoo
78485cea69
fix: animate card to existing closing state on gesture end
...
fixes #7938
2020-04-22 15:16:39 +02:00
Satyajit Sahoo
1613915669
chore: mark screens and masked view as optional in stack
...
Needs e54819c4de to work.
2020-04-22 14:02:21 +02:00
Satyajit Sahoo
82edb2581b
fix: hide inactive screens for stack on web ( #8010 )
2020-04-18 01:14:11 +02:00
Satyajit Sahoo
dfdba8d741
fix: disable animation by default on web for stack
2020-04-10 17:02:32 +02:00
Satyajit Sahoo
f1a8bceba5
fix: make color of shadow element same as card color in stack
2020-04-07 23:34:55 +02:00
Satyajit Sahoo
9a8fea8f2c
fix: when comparing changed routes, only check keys
2020-03-30 22:20:16 +02:00
Andrius Janauskas
d649fbc669
fix: finish stack animation on CANCELLED event ( #7898 )
...
fixes #7897
2020-03-30 14:36:04 +02:00
Wojciech Stanisz
e097df880a
fix: add pointerEvents=box-none to overlay View ( #7871 )
2020-03-26 13:38:30 +01:00
Satyajit Sahoo
61f16d3f25
fix: fix swipe gestures requiring a lot of velocity to dismiss
2020-03-23 11:40:37 +01:00
Satyajit Sahoo
179b6312fe
chore: update prettier
2020-03-22 23:58:06 +01:00
Satyajit Sahoo
043924ca48
fix: fix swipe not dismissing card in RTL
...
closes #7841
2020-03-22 23:55:16 +01:00
Tien Pham
adbfedcd58
fix: use the correct velocity value in closing animation ( #7836 )
...
In this commit f24d3a3461 we modified the `velocity` in inverted gesture, but since we also use this value in the closing animation, the change in that commit also introduced a new bug:

This PR fixes the issue by keeping the original velocity value.
2020-03-19 21:55:03 +01:00
Alexey Vlasenko
f24d3a3461
fix: fix closing stack using inverted gesture. ( #7824 )
...
Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com >
2020-03-19 19:32:29 +01:00
Satyajit Sahoo
3df65e2819
fix: initialize height and width to zero if undefined
...
closes #6789
2020-03-19 19:03:23 +01:00
Satyajit Sahoo
49f6fed6d3
fix: fix blank page if stack was inside display: none before
2020-03-19 18:11:55 +01:00
Satyajit Sahoo
b1a65fc73e
fix: don't use react-native-screens on web
...
seems `react-native-screens` doesn't handle active screens properly and shows a blank page instead on web when a number is specified in the `active` prop.
closes #7485
2020-03-19 17:28:35 +01:00
Michał Osadnik
70029d6c13
feat: add an option to change use a custom card overlay ( #7809 )
...
I find it sometimes useful to define overlay renderer on my own. Eg. I needed to replace the background with BlurView and with this API I find it quite easy
Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com >
2020-03-16 14:28:10 +01:00
Tien Pham
469d0542c7
fix: fix back gesture cancellation ( #7700 )
...
The problem here is that when we scroll back really fast, even though velocity is negative, `Math.abs(translation + velocity * gestureVelocityImpact)` will end up bigger than `distance / 2`.
I removed the `Math.abs`, I think it's not necessary. When `translation + velocity * gestureVelocityImpact` is negative, it's also < `distance / 2` and we should just close the screen.
Closes #6782
2020-03-16 12:03:16 +01:00
Satyajit Sahoo
c19da31240
refactor: enable screens only for last screen
...
This will avoid issues such as https://github.com/react-navigation/react-navigation/issues/6909
2020-02-24 11:37:25 +01:00
Satyajit Sahoo
86c39d2e0e
refactor: move types and base router to routers package
2020-02-10 16:04:20 +01:00
Satyajit Sahoo
f746ece61b
fix: use addListener only when available
2020-02-05 09:43:00 +01:00
Satyajit Sahoo
41a5e1a385
fix: wrap navigators in gesture handler root
2020-02-03 00:18:32 +01:00
Satyajit Sahoo
3d937d1e65
fix: dispatch pop early when screen is closed with gesture ( #336 )
...
fixes #267
2020-02-02 23:56:05 +01:00
Satyajit Sahoo
94d7b28c0b
fix: disable screens when mode is modal on older expo versions
2020-02-01 17:21:18 +01:00
osdnk
9be904d9c4
fix: increase epsilon in CardContainer.tsx
2020-01-30 22:38:13 +01:00
osdnk
edf96d839f
fix: web with internal interpolation listener
2020-01-28 14:52:41 +01:00
Satyajit Sahoo
6262f7298b
feat: add animationTypeForReplace option ( #297 )
...
Currently, when a screen is replaced the new screen comes into focus with a push animation. However, sometimes you might want to customize how the animation looks like.
For example, when the user logs out, animating out the previous screen like pop feels more natural than doing a push animation with the sign in screen. The PR adds a new `animationTypeForReplace` option to control this. Specifying `animationTypeForReplace: 'pop'` will pop the previous screen, otherwise the new screen will be pushed like before.
Co-authored-by: Michał Osadnik <micosa97@gmail.com >
2020-01-27 18:20:53 +01:00
osdnk
a6f58677dc
fix: make UNVERSIONED insufficient expo version
2020-01-27 18:01:35 +01:00
Michał Osadnik
9bfb295620
fix: screens integration on Android ( #294 )
2020-01-27 17:48:22 +01:00
Satyajit Sahoo
5fe140e61b
fix: fix shadow position for inverted animations
2020-01-26 17:02:00 +01:00
Satyajit Sahoo
16c64e7298
fix: pass correct previous scene to header with headerMode: screen
2020-01-23 15:29:40 +01:00
Satyajit Sahoo
0a982ee698
fix: don't use native driver on web
...
The native driver is not supported for animations on web. It just prints a wanrning in the console. So we conditionally disable it on web.
2020-01-20 06:20:06 +01:00
Satyajit Sahoo
38520a97ff
fix: position inactivscreensws offscreen by default
2020-01-18 23:13:36 +01:00
Satyajit Sahoo
43d2c456be
fix: slide the header up to hide it for vertical animation
2020-01-18 04:13:37 +01:00
Satyajit Sahoo
7a3d652e84
fix: change POP behaviour to remove elements from index only
...
Fixes #256
2020-01-09 01:06:55 +01:00
Michał Osadnik
d3f5c55dbf
fix: remove clamping in extrapolation of progress of stack animation
2020-01-07 06:46:29 -05:00
Satyajit Sahoo
d8b88bd83f
fix: memoize interpolated style to avoid extra work
2020-01-05 17:25:27 +01:00
Satyajit Sahoo
65ce20ecbc
fix: use memo for card container
2020-01-05 15:29:41 +01:00
Satyajit Sahoo
12d90833eb
fix: expose the header height even if not floating
2020-01-05 15:10:05 +01:00
Satyajit Sahoo
133b59cd17
feat: expose header height in context
2020-01-05 14:26:16 +01:00
Satyajit Sahoo
a9e584c3b7
fix: compare with correct height when floating header height updates
2020-01-05 13:58:24 +01:00
Satyajit Sahoo
b201fd2071
feat: add headerStatusBarHeight option to stack
2020-01-05 02:30:09 +01:00
Satyajit Sahoo
7f963a74bb
fix: keep screens for replace when animation is enabled
2020-01-03 21:39:03 +01:00
Satyajit Sahoo
572beae41b
fix: use gesture direction when using next screen's animation
2020-01-03 21:27:48 +01:00
Satyajit Sahoo
15fe3ebb51
refactor: remove PointerEventsView
2020-01-03 21:22:44 +01:00
Satyajit Sahoo
2c31d1705c
fix: dismiss keyboard on page change
2020-01-03 18:11:44 +01:00