Commit Graph

2219 Commits

Author SHA1 Message Date
Tien Pham
1061562ef7 Update goBack docs (#2834)
* Update goBack docs

* Update Screen-Navigation-Prop.md
2018-01-21 03:37:24 +07:00
Adam Miskiewicz
9590b5b35f Make examples use linked copy of react-navigation 2018-01-17 19:11:04 -08:00
Adam Miskiewicz
5c8709b8a4 Revert "Move examples to https://github.com/react-navigation/examples"
This reverts commit 36775007b0.
2018-01-17 14:43:28 -08:00
Brent Vatne
5725ca2807 Move examples to https://github.com/react-navigation/examples 2018-01-17 12:43:24 -08:00
Brent Vatne
e3237f5a6b Bump version 2018-01-16 11:12:52 -08:00
Brent Vatne
98bfa72a6f Revert adding SafeAreaView to TabBarTop 2018-01-16 11:12:06 -08:00
Brent Vatne
5986f22221 Bump version 2018-01-12 15:51:29 -08:00
Brent Vatne
74eaafe675 Update icons in playground app and add some padding to banner 2018-01-12 15:49:42 -08:00
Brent Vatne
17eb5377d7 Handle translucent status bar within Expo automatically. - Escape hatch of ReactNavigation.SafeAreaView.setStatusBarHeight(). - if (Platform.OS === 'android') { ReactNavigation.SafeAreaView.setStatusBarHeight(0) } to revert to old behavior. 2018-01-12 15:34:40 -08:00
Brent Vatne
df11cc96af Bump version 2018-01-11 18:30:28 -08:00
Brent Vatne
86edcc66d2 Revert "Issue #2794 - Fixing iPad iOS 11 Tab Bar Bottom Behavior (#3041)"
This reverts commit c7b73cd8b4.
2018-01-11 18:21:46 -08:00
Brent Vatne
8646e584bd Bump version 2018-01-11 18:20:44 -08:00
Adam Miskiewicz
945446be7a Use stiffness/damping/mass for card stack transition on React Native >= 50 (#3261) 2018-01-11 18:08:42 -08:00
混沌DM
71d904bbe5 Set the default value of the DrawerNavigatorConfig correctly. (#3152)
* Set the default value of the DrawerNavigatorConfig correctly.

* update DrawerViewProps type
2018-01-09 17:28:27 +08:00
SteffeyDev
05e7e3a1e9 Issue #2794 - Fixing iPad iOS 11 Tab Bar Bottom Behavior (#3041)
* Fixing iPad iOS 11 Tab Bar Bottom Behavior with changing widths via Multitasking

* Updating snapshot tests

* Changes per discussion in !3041

* Additional changes per discussion in !3041

* Changing to test for constrained height

* Additional changes per discussion in !3041
2018-01-08 21:28:13 -05:00
rgovind92
3e9574705b Fix drawer toggle (#3191)
* Fixed drawer toggle

* Fixed drawer toggle

* Update DrawerView.js
2018-01-06 21:10:56 +05:30
Brent Vatne
73d584945e Update README, bump version 2018-01-04 14:10:08 -08:00
Jani Eväkallio
d39254a181 If URL is just a scheme:// component without a path, default to root "/" URL (#3224) 2018-01-04 21:28:41 +00:00
Satyajit Sahoo
136f562ea4 Upgrade react-native-tab-view (#3064) 2018-01-04 19:45:35 +05:30
Lorenzo Sciandra
260779424d removing react-addons-test-utils (#3221) 2018-01-04 14:08:58 +00:00
Brent Vatne
119cabf638 Update ISSUE_TEMPLATE.md 2017-12-27 13:24:36 -08:00
Brent Vatne
85a6b131d9 Fix example project 2017-12-20 13:35:35 -08:00
Spencer Carli
a97cddebe2 v1.0.0-beta.22 2017-12-18 15:53:48 -06:00
Axel Eirola
78c6d92cad Enable configuration of gesture direction (#3077)
* Enable configuration of gesture direction

* Fix documentation and code style

* Invert behaviour of I18nManager.isRTL instead of overriding
2017-12-18 23:25:16 +02:00
Stephen O'Brien
395dee489a Safe area view: support animated style values (#3124)
* Use Animated.View instead of View in SafeAreaView

This allows passing animated style properties in certain contexts, as previously supported.

* Update some test snapshots
2017-12-17 23:20:08 +00:00
Nicolas Charpentier
96fc8172e9 Fix handling the Hardware Back Button link in Redux section (#3134) 2017-12-16 14:17:43 -05:00
Nicolas Charpentier
5824866ef0 Update Contributors Guide link (#3133) 2017-12-15 11:37:31 -05:00
Denis Evgrafov
1e99ba4a11 Update Navigation-Actions.md (#3126) 2017-12-15 02:37:22 +03:00
Axel Eirola
de0524fe80 Add support for custom header transitions (#3075)
* Add support for custom header transitions

* Use default props for header transition default values
2017-12-14 23:14:38 +02:00
Ashoat Tevosyan
b44d7e117b Don't use params from unrelated action when initializing nav state (#3094)
`TabRouter.getStateForAction` has some code at the start to initialize an empty nav state before handling any action. This initialization is achieved by passing `INIT` actions to all child routes. However, the code strangely also passes these child routes the params that were given to the action. The initialization should be separate from the processing of the action.
2017-12-12 03:00:33 -08:00
Patrick Monteith
8d0f086a8a Don't delegate inner action to child router, handle inner action when handling NAVIGATE 2017-04-03 10:51:19 +01:00
Sergei
bffb9d17ff Disable / enable swipe depending on screen. (#2906)
* Disable / enable swipe depending on screen.

react-community#1760

* Updated to master

* Revert "Updated to master"

This reverts commit a3aede19588cdbc7fc9148d148260f51d6316e6f.

* - Fixed CircleCI errors

* - Fixed CircleCI errors
2017-12-02 01:53:26 +04:00
James Reggio
27dcb5b5d0 Await promise from Transitioner onTransitionStart (#2946)
* Await promise from onTransitionStart

* Review feedback

* Update docs for onTransitionEnd
2017-12-01 16:42:53 -05:00
Flo
8462821dd7 Drawer Improvement, Let define a route key to open/close multiple dra… (#1803)
* Drawer Improvement, Let define a route key to open/close multiple drawer with no side effects

* fix lint issues

* fix flow issues
2017-11-29 16:01:35 +01:00
tab
3fee1bdeb9 Set sdkVersion to 23.0.0 (#3037) 2017-11-26 05:12:51 +07:00
Ashoat Tevosyan
d3b08f27eb Add NavigationContainer and NavigationContainerProps types (#3030)
Adding types for these fixes the errors we're seeing when using `TabNavigator` and `StackNavigator`.
2017-11-22 06:42:17 -08:00
Spencer Carli
a304e9bcf5 v1.0.0-beta.21 2017-11-21 09:25:24 -06:00
Spencer Carli
6f9a888a7f Fix #3020 (#3024) 2017-11-21 09:24:24 -06:00
Vojtech Novak
901bbcb872 return null if it is passed (#3021) 2017-11-21 15:54:46 +01:00
mukunzidd
7b7c5eb3ab Fix typo On "Getting Started 3." (#3022)
Browse the official example app, which will `demonstrates` various patterns with React Navigation.
demonstrates should be `demonstrate`
2017-11-21 16:40:01 +02:00
londonoliver
5279b2c429 Update Guide-Quick-Start.md (#3015) 2017-11-20 23:34:39 -08:00
Spencer Carli
360975a99a Bump version 2017-11-20 19:21:19 -06:00
Vojtech Novak
5e5a21a7cd revert TabBarBottom should hide itself when Keyboard is activated (#3013) 2017-11-21 02:18:35 +01:00
Dave Rogers
114c27e7f8 Allow transition configuration between tabs (#2222)
* allow transition configuration between tabs

* we don't need to pass configureTransition to TabBarComponent

* Update TabAnimations.js

* Update TabNavigator.md
2017-11-20 16:16:43 -07:00
Ashoat Tevosyan
e702791321 Update to react-native@0.50 and flow-bin@0.56 (#2998)
* Update to React Native 0.50

* Type Promise used in PlatformHelpers.web.js

* Move $FlowFixMe in CardStack.js

The line number Flow is using for this error changed. The underlying problem has not, but I don't have time to fix it now unfortunately.

* Type TouchableItem's children prop as React.Node

This was my bad. `React.ChildrenArray` should only really be used in the case of having multiple of the same type of child.

* Type HeaderTitle's children prop as React.Node

Same as last commit.

* Add assertion in StackRouter that StateUtils.indexOf returns valid index

Flow doesn't realize that `StateUtils.indexOf` is guaranteed to return a valid index, so we use `invariant` to assert it.

* Remove unused type DrawerNavigationState from TypeDefinition

* Remove unused type parameter T in DrawerView

* Type NavigationStateRoute as NavigationLeafRoute & NavigationState

* Don't constrain generic action types to NavigationAction

By constraining to subtypes of `NavigationAction`, we actually are requiring that any router satisfying our type constraints has to take all of the `NavigationAction` types. Instead, we want to say that it will only take some of them. Changing the types here to be inferred.

* Fix types of NavigationScreenProp and withCachedChildNavigation

1. `NavigationScreenProp` needs to have its type parameter annotated with a `+` to actually indicate covariance on that type parameter, apparently
2. `withCachedChildNavigation` needs to thread through more-specific `NavigationState`s, and right now it just discards that specificity, which breaks `DrawerSidebar` because it needs a `NavigationStateRoute`

* Ignore website/build from Flow

* Fix type of DrawerItems activeItemKey prop

- Even when specified, it can be `null`
- Use a ternary expression instead of `x && x.param` approach

* Get rid of NavigationRouter & NavigationNavigator parameterization on NavigationAction

Since `NavigationRouter`'s `getStateForAction` functionality is a standard Redux reducer, it knows to forward on any actions it doesn't know how to deal with. We can widen the types of these functions to be `NavigationAction` without any negative consequence.

* Explicitly specify null navigationOptions in createNavigator

Not sure why, but Flow doesn't like us leaving it unspecified

* Fix createNavigationContainer/createNavigator/StackNavigator types

* Fix up flow types for TabNavigator and DrawerNavigator

* Properly type defaultContentComponent

* Fix more flow errors in createNavigationContainer

* Replace NavigatorProps with NavigationNavigatorProps

* Type SceneView's navigation prop as NavigationScreenProp<any>

There is an unavoidable* type problem here. A `NavigationComponent` is either a navigator with a `NavigationStateRoute` or a scene with a `NavigationRoute`. The navigation prop it gets passed must match the component's `NavigationState`. However, there's no way for us to say that "`this.props.router.getComponentForRouteName` will have a `NavigationNavigator` iff the corresponding `childNavigationProps` is a `NavigationStateRoute`".

The cleanest way to make this work is to throw an "any" specifically for the navigation prop's state type param.

* We could probably avoid it with sufficient refactoring. If the routers were charged with keeping track of `childNavigationProps` instead of leaving it to the views, they could return the child navigation prop and child `NavigationComponent` in pairs whose types were coupled.

* Pass in screenProps to NavigationComponent in NavigationPlayground's CustomTabs

Flow wants `screenProps` to be passed in here for some reason...

It cites `SceneView`, but that doesn't really make much sense to me. But this is some custom logic that most people aren't likely to run into, so I'm not gonna worry too much about it.

* Patch mismatch with react-native-tab-view type for now

* Use generic NavigationState in createNavigationContainer's _nav var

We made the NavigationState generic while #1313 added a new instance variable. This updates the new instance variable to be generic.

* Fix failing tests
2017-11-20 11:53:48 -08:00
pietro909
5bf89f340d Add previous scene to tabBarOnPress - fix #2787 (#2790)
* Add previous scene to tabBarOnPress - fix #2787

* Update docs for tabBarOnPress
2017-11-19 23:00:10 +01:00
Ashoat Tevosyan
2ba1e73e31 Allow strings Component types through as screens (#2999)
In React Fiber (React 16), strings are used for intrinsics like 'div' and 'View'. As a result, if you use a View as a screen in an academic experience, you get a red error screen. This PR prevents that from happening.
2017-11-19 13:04:33 -08:00
Iain Diamond
f8b0f38eb6 Guide-Headers.md (#3000)
Spelling/Typos fixes
2017-11-19 17:24:27 +00:00
Daniel Friesen
19299ed923 Dispatch can be called multiple times per tick (#1313)
Mostly fixes #1206
2017-11-17 17:15:10 -08:00
Vojtech Novak
e896c686b2 Update withNavigation.md (#2988) 2017-11-17 00:03:27 +01:00