Kai Guo
8468c46cab
feat: add Windows and macOS support ( #8570 )
...
react-native-gesture-handler doesn't have Windows/macOS implementation yet, use the web version as stubs for now to enable navigation features for Windows and mac.
Close https://github.com/microsoft/react-native-windows/issues/3884
Close https://github.com/microsoft/react-native-windows/issues/4044
2020-07-28 23:51:41 +02:00
Satyajit Sahoo
1e813dfb5b
chore: publish
...
- @react-navigation/bottom-tabs@5.7.3
- @react-navigation/compat@5.2.4
- @react-navigation/core@5.12 .2
- @react-navigation/devtools@5.1.4
- @react-navigation/drawer@5.8.7
- @react-navigation/material-bottom-tabs@5.2.15
- @react-navigation/material-top-tabs@5.2.15
- @react-navigation/native@5.7.2
- @react-navigation/routers@5.4.10
- @react-navigation/stack@5.8.0
2020-07-28 14:08:02 +02:00
Martin Treurnicht
15f9b9573e
feat: emit gesture navigation events from stack view ( #8524 )
...
Allows you to subscribe to gesture navigation events, we have a custom keyboard that we want to hide and show when gesture is being used to navigate (same as native keyboard)
2020-07-28 11:26:45 +02:00
Andrei Barabas
486c3defd2
feat: allow style overrides for HeaderBackButton ( #8626 )
2020-07-28 11:09:23 +02:00
Satyajit Sahoo
7c2b28ae1e
chore: publish
...
- @react-navigation/bottom-tabs@5.7.2
- @react-navigation/compat@5.2.1
- @react-navigation/core@5.12 .1
- @react-navigation/devtools@5.1.3
- @react-navigation/drawer@5.8.6
- @react-navigation/material-bottom-tabs@5.2.14
- @react-navigation/material-top-tabs@5.2.14
- @react-navigation/native@5.7.1
- @react-navigation/stack@5.7.1
2020-07-19 14:55:27 +02:00
Satyajit Sahoo
513482425a
chore: publish
...
- @react-navigation/bottom-tabs@5.7.0
- @react-navigation/compat@5.2.0
- @react-navigation/core@5.12 .0
- @react-navigation/devtools@5.1.2
- @react-navigation/drawer@5.8.5
- @react-navigation/material-bottom-tabs@5.2.13
- @react-navigation/material-top-tabs@5.2.13
- @react-navigation/native@5.7.0
- @react-navigation/routers@5.4.9
- @react-navigation/stack@5.7.0
2020-07-10 22:40:45 +02:00
Satyajit Sahoo
6925e92dc3
feat: add a beforeRemove event
...
A lot of times, we want to prompt before leaving a screen if we have unsaved changes. Currently, we need to handle multiple cases to prevent this:
- Disable swipe gestures
- Override the back button in header
- Override the hardware back button on Android
This PR adds a new event which is emitted before a screen gets removed, and the developer has a chance to ask the user before closing the screen.
Example:
```js
React.useEffect(
() =>
navigation.addListener('beforeRemove', (e) => {
if (!hasUnsavedChanges) {
return;
}
e.preventDefault();
Alert.alert(
'Discard changes?',
'You have unsaved changes. Are you sure to discard them and leave the screen?',
[
{ text: "Don't leave", style: 'cancel', onPress: () => {} },
{
text: 'Discard',
style: 'destructive',
onPress: () => navigation.dispatch(e.data.action),
},
]
);
}),
[navigation, hasUnsavedChanges]
);
```
2020-07-02 14:32:31 +02:00
Satyajit Sahoo
9ba2f84d18
test: add basic unit tests for all navigators
2020-06-30 16:14:52 +02:00
Satyajit Sahoo
2477db47a0
chore: publish
...
- @react-navigation/bottom-tabs@5.6.1
- @react-navigation/compat@5.1.28
- @react-navigation/core@5.11 .1
- @react-navigation/devtools@5.1.1
- @react-navigation/drawer@5.8.4
- @react-navigation/material-bottom-tabs@5.2.12
- @react-navigation/material-top-tabs@5.2.12
- @react-navigation/native@5.6.1
- @react-navigation/stack@5.6.2
2020-06-25 17:31:40 +02:00
Satyajit Sahoo
c4d2a8a828
chore: publish
...
- @react-navigation/stack@5.6.1
2020-06-25 11:45:59 +02:00
Satyajit Sahoo
fc95d7a256
fix: fix showing back button with headerMode=screen. fixes #8508
2020-06-25 11:42:19 +02:00
Satyajit Sahoo
978b197446
chore: publish
...
- @react-navigation/bottom-tabs@5.6.0
- @react-navigation/compat@5.1.27
- @react-navigation/core@5.11 .0
- @react-navigation/devtools@5.1.0
- @react-navigation/drawer@5.8.3
- @react-navigation/material-bottom-tabs@5.2.11
- @react-navigation/material-top-tabs@5.2.11
- @react-navigation/native@5.6.0
- @react-navigation/routers@5.4.8
- @react-navigation/stack@5.6.0
2020-06-24 22:29:01 +02:00
Satyajit Sahoo
f00091d7ab
refactor: use ts-expect-errpr instead of ts-ignore
2020-06-24 20:07:32 +02:00
Satyajit Sahoo
a2d649faf1
feat: show back button in nested stack
2020-06-24 12:45:40 +02:00
Satyajit Sahoo
37bbbbe869
fix: workaround keyboard dismissing on focus
...
closes #8414 , closes #8478
2020-06-23 19:17:03 +02:00
Wojciech Lewicki
962456beb6
fix: fix screen disappearing on Android ( #8473 )
...
Added `collapsable={false}` to the View in order for the Android to render screens properly. This issue is most probably similar to 9c06a92d09 but fixes it on Android since the View seems to be removed from a native view hierarchy due to not drawing anything. To see the bug go to https://github.com/software-mansion/react-native-screens/issues/544 .
2020-06-19 19:38:32 +02:00
Satyajit Sahoo
1aadc79fb8
refactor: enforce import type everywhere
2020-06-17 12:05:40 +02:00
Satyajit Sahoo
cc3728fc95
chore: tweak repository field in package.json. closes #8423
2020-06-16 21:46:09 +02:00
Satyajit Sahoo
bf1ee2d9ff
chore: master -> main
2020-06-16 21:42:22 +02:00
Kang Byung Seon
35d6b9e3a4
fix: don't use deprecated currentlyFocusedField ( #8365 )
...
Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com >
2020-06-15 15:12:56 +02:00
Satyajit Sahoo
5042c86a09
chore: upgrade depenendecies
2020-06-12 18:37:40 +02:00
Satyajit Sahoo
34c907ec0a
chore: publish
...
- @react-navigation/stack@5.5.1
2020-06-08 11:21:27 +02:00
Satyajit Sahoo
1ae07af796
fix: make sure the header is on top of the view
2020-06-08 11:17:53 +02:00
Satyajit Sahoo
220af93db5
chore: publish
...
- @react-navigation/stack@5.5.0
2020-06-08 10:56:32 +02:00
Satyajit Sahoo
1f27e4b1f6
fix: ignore onOpen from route that wasn't closing
...
closes #8257
2020-06-08 10:48:04 +02:00
Satyajit Sahoo
9c06a92d09
fix: fix blank screen with animationEnabled: false & headerShown: false
...
closes #8391
2020-06-08 10:17:02 +02:00
Satyajit Sahoo
e0e0f79793
feat: automatically hide header in nested stacks
2020-06-08 08:14:34 +02:00
Jeroen Verfallie
c7e4bf94e6
fix: pass gestureRef to PanGestureHandlerNative ( #8394 )
...
In the current implementation the ref is unused, resulting in a constant `current: {null}` on the context.
2020-06-08 08:05:59 +02:00
Satyajit Sahoo
7024d4bb81
docs: fix comment about headerBacktitleVisible
2020-06-08 01:47:09 +02:00
Satyajit Sahoo
21f61d6eeb
chore: publish
...
- @react-navigation/bottom-tabs@5.5.2
- @react-navigation/compat@5.1.26
- @react-navigation/core@5.10 .0
- @react-navigation/drawer@5.8.2
- @react-navigation/material-bottom-tabs@5.2.10
- @react-navigation/material-top-tabs@5.2.10
- @react-navigation/native@5.5.1
- @react-navigation/stack@5.4.2
2020-06-06 02:15:26 +02:00
Satyajit Sahoo
e653d55479
refactor: minor tweaks
2020-06-06 00:38:38 +02:00
Ashoat Tevosyan
78afbffe97
fix: relatively position float Header if !headerTransparent ( #8285 )
...
## Motivation
Right now `headerMode: float` renders an absolutely-positioned header. To offset the content appropriately, it then measures the height of the header and compensates with a margin. This approach unfortunately doesn't work well for animations.
Before | After
:-------------------------:|:-------------------------:
<img src="http://ashoat.com/jerky_absolute.gif " width="300" /> | <img src="http://ashoat.com/smooth_relative.gif " width="300" />
## Approach
When rendering the header absolutely we want to render it above (after, in sibling order) the content. But when rendering it relatively we want to render it first (before, in sibling order).
The margin compensation code is no longer necessary so I removed it.
## Test plan
I used the `StackHeaderCustomization` example to make sure transitions between `headerTransparent` and `!headerTransparent` looked good. I added a custom (taller) header to test if height transitions looked good, and toggled `headerShown` to make sure that transitioned well too.
Would be open to any other suggestions of things to test!
2020-06-06 00:12:00 +02:00
Satyajit Sahoo
7ac4c13d44
chore: publish
...
- @react-navigation/bottom-tabs@5.5.1
- @react-navigation/compat@5.1.25
- @react-navigation/core@5.9.0
- @react-navigation/drawer@5.8.1
- @react-navigation/material-bottom-tabs@5.2.9
- @react-navigation/material-top-tabs@5.2.9
- @react-navigation/native@5.5.0
- @react-navigation/stack@5.4.1
2020-05-27 18:32:30 +02:00
Satyajit Sahoo
9d822b95a6
fix: fix type of style for various options
2020-05-26 17:33:50 +02:00
Bright Lee
00c23f2c9e
fix: allow HeaderBackground's subViews to be touchable ( #8317 )
2020-05-25 15:50:24 +02:00
Satyajit Sahoo
ced2a24aa6
chore: publish
...
- @react-navigation/bottom-tabs@5.5.0
- @react-navigation/compat@5.1.24
- @react-navigation/core@5.8.2
- @react-navigation/drawer@5.8.0
- @react-navigation/material-bottom-tabs@5.2.8
- @react-navigation/material-top-tabs@5.2.8
- @react-navigation/native@5.4.3
- @react-navigation/routers@5.4.7
- @react-navigation/stack@5.4.0
2020-05-23 18:36:57 +02:00
Satyajit Sahoo
df3544d9b4
Revert "fix: allow HeaderBackground's subViews to be touchable" ( #8316 )
2020-05-23 18:22:35 +02:00
Bright Lee
021a9111d7
fix: allow HeaderBackground's subViews to be touchable ( #8314 )
...
When you're using the following options on `Stack`, the touch event goes to the behind of the Header and we can't really solve this problem in given `headerBackground` component level.
```
options={{
headerTransparent: true,
headerBackground:
```
### Problem

2020-05-23 18:14:59 +02:00
Satyajit Sahoo
6dd45fcff9
fix: don't ignore previous header heights on layout update
2020-05-21 12:54:12 +02:00
Janic Duplessis
d62fbfe255
feat: update react-native-safe-area-context to 1.0.0 ( #8182 )
...
I made sure 1.0 is backwards compatible with react-navigation, which means using rn-safe-area-context@1+ with older versions of react-navigation will still work.
2020-05-21 11:25:36 +02:00
Evan Bacon
b14094619f
chore: ignore __tests__ in prod builds ( #8307 )
...
The tests are being bundled and shipped in prod, this adds a bit of unneeded weight to npm installs. Now they won't be included.
```
@react-navigation/core
- before: 274 files - pkg: 211.0 kB - unpkg: 1 MB
- after: 238 files - pkg: 192.1 kB - unpkg: 827.3 kB
```
2020-05-21 11:15:12 +02:00
Satyajit Sahoo
175c07a28c
chore: publish
...
- @react-navigation/example@5.1.0
- @react-navigation/bottom-tabs@5.4.7
- @react-navigation/compat@5.1.23
- @react-navigation/core@5.8.1
- @react-navigation/drawer@5.7.7
- @react-navigation/material-bottom-tabs@5.2.7
- @react-navigation/material-top-tabs@5.2.7
- @react-navigation/native@5.4.2
- @react-navigation/routers@5.4.6
- @react-navigation/stack@5.3.9
2020-05-20 13:27:29 +02:00
osdnk
2980627cbf
chore: publish
...
- @react-navigation/bottom-tabs@5.4.6
- @react-navigation/compat@5.1.22
- @react-navigation/core@5.8.0
- @react-navigation/drawer@5.7.6
- @react-navigation/material-bottom-tabs@5.2.6
- @react-navigation/material-top-tabs@5.2.6
- @react-navigation/native@5.4.1
- @react-navigation/routers@5.4.5
- @react-navigation/stack@5.3.8
2020-05-20 10:29:05 +02:00
Satyajit Sahoo
0194de1061
chore: upgrade bob
2020-05-19 14:25:20 +02:00
Satyajit Sahoo
9304a8a16c
chore: publish
...
- @react-navigation/bottom-tabs@5.4.5
- @react-navigation/compat@5.1.21
- @react-navigation/core@5.7.0
- @react-navigation/drawer@5.7.5
- @react-navigation/material-bottom-tabs@5.2.5
- @react-navigation/material-top-tabs@5.2.5
- @react-navigation/native@5.4.0
- @react-navigation/stack@5.3.7
2020-05-17 01:20:24 +02:00
Satyajit Sahoo
c481748f00
chore: publish
...
- @react-navigation/stack@5.3.6
2020-05-15 17:39:47 +02:00
Satyajit Sahoo
d45dbe97dc
fix: reduce header title margin. fixes #8267
2020-05-15 17:39:33 +02:00
Satyajit Sahoo
1dddaff45c
chore: publish
...
- @react-navigation/bottom-tabs@5.4.4
- @react-navigation/compat@5.1.20
- @react-navigation/core@5.6.1
- @react-navigation/drawer@5.7.4
- @react-navigation/material-bottom-tabs@5.2.4
- @react-navigation/material-top-tabs@5.2.4
- @react-navigation/native@5.3.2
- @react-navigation/stack@5.3.5
2020-05-14 13:22:54 +02:00
Satyajit Sahoo
2ff0531695
chore: publish
...
- @react-navigation/bottom-tabs@5.4.3
- @react-navigation/compat@5.1.19
- @react-navigation/core@5.6.0
- @react-navigation/drawer@5.7.3
- @react-navigation/material-bottom-tabs@5.2.3
- @react-navigation/material-top-tabs@5.2.3
- @react-navigation/native@5.3.1
- @react-navigation/stack@5.3.4
2020-05-14 12:45:50 +02:00
Satyajit Sahoo
6dce0780ed
chore: publish
...
- @react-navigation/stack@5.3.3
2020-05-11 17:31:35 +02:00