112 Commits

Author SHA1 Message Date
Brent Vatne
4fe72f6627 Release 1.5.13 2018-08-22 17:34:25 -07:00
Rob Allsopp
b065b31bb2 [help wanted] Fix missing/incorrect flow types for 1.x branch (#4108)
* add missing method ‘getParam’ to navigation screen prop

* add usage of `getParam` method

* correct return type for ‘withNavigation’

* snapshot updates
2018-05-07 10:46:35 -04:00
Brent Vatne
d8bcbdd690 Update react-lifecycles-compat 2018-05-03 16:47:13 -07:00
Brent Vatne
6b5100c335 Bump dependencies in NavigationPlayground 2018-03-31 12:11:09 -07:00
Brent Vatne
34dd1fe490 Better example for focus including tab bar top 2018-03-31 12:11:09 -07:00
Eric Vicenti
e369c89b81 Add example for extending the Tab navigator (#3775) 2018-03-18 20:14:56 -04:00
Brent Vatne
9aab47dac2 Apply horizontal icon style whenever we should use horizontal tabs in icon 2018-03-14 21:35:07 -07:00
Leon Miller-Out
afecaaed7f Call react-navigation-redux-helpers's initializeListeners() when mounting app. (#3666)
This makes the first navigation click work correctly, per
https://github.com/react-navigation/react-navigation-redux-helpers/issues/7
2018-03-05 15:02:34 -05:00
Brent Vatne
138151433d Add isFocused helper to navigation and fix withNavigationFocus (1.x branch) (#3651)
* Add isFocused helper to navigation and fix withNavigationFocus accordingly

* Fix snapshots

* Make flow pass on TabsWithNavigationFocus example
2018-03-03 09:58:19 -08:00
Brent Vatne
403af82c3f Add SwitchNavigator (#3634)
* Add SwitchNavigator

* Fix type definition

* Update snapshot

* Add SwitchNavigator test coverage
2018-03-01 13:43:47 -08:00
Brent Vatne
065fdf61d8 Several improvements to StackNavigation Header (#3568)
* Refactor to remove unused variables, styles, and outer Animated view

* Style cleanup

* Proof of concept blur background

* Clean it up and add flow interface

* Update snapshots
2018-02-21 18:29:43 -08:00
Brent Vatne
29a29936bf Remove withNavigationFocus example until it's fixed 2018-02-16 18:10:33 -08:00
Brent Vatne
021c7e54be Do not use hide views when swipe or animations are enabled. Improve withNavigationFocus example 2018-02-16 18:05:39 -08:00
Brent Vatne
3600ecbd9b Add back support for lazy tabs and use removeClippedSubviews (#3538)
* Lazy initialization of tabs and move contents off-screen when not active

* Make subview clipping and lazy both configurable

* Record snapshots again

* Update type definition

* Remove unused log
2018-02-16 16:59:19 -08:00
Sébastien Lorber
c74f001b1c add withNavigationFocus HOC (#3512)
* add withNavigationFocus HOC

See:
- https://github.com/react-navigation/react-navigation/issues/51#issuecomment-276003658
- https://github.com/react-navigation/react-navigation/issues/51#issuecomment-278761705
- https://github.com/react-navigation/react-navigation/pull/3345#issuecomment-360260067

* typos

* remove unused import

* Add withNavigationFocus export

* add example TabsWithNavigationFocus

* add example TabsWithNavigationFocus

* withNavigationFocus: get navigation from context or props

* subs => subscriptions

* fix flow issues
2018-02-16 16:57:33 -08:00
Brent Vatne
d0ef33b12f Several small changes related to header style commit 2018-02-16 12:42:44 -08:00
Brent Vatne
3c3668c952 Header transition presets with support for standard iOS transition style (#3526)
Header transition presets with approximate support for UIKit transition style
2018-02-16 12:41:59 -08:00
Sébastien Lorber
4df9198979 fix doc link (#3513) 2018-02-13 10:30:20 -08:00
Brent Vatne
5b4d11ab5d Better orientation layout on playground 2018-02-12 11:53:23 -08:00
Brent Vatne
58b77d44ae Make Router({ RouteName: Component }) a valid way to configure a router (#3486)
* Make Router({routeName: Component}) a valid way to instantiate a route

* Update App.js in NavigationPlayground

* Fix route config flow type
2018-02-09 18:20:01 -08:00
Brent Vatne
95565487ec Make it possible to go back to menu from key example and improve banner on menu screen (#3479)
* Make it possible to go back to menu from key example and improve banner on menu screen

* Fix NavigationPlayground flow error
2018-02-08 19:10:54 -08:00
Brent Vatne
eb39df507e Prevent navigation from getting in bad state when navigating back to route by key (#3478) 2018-02-08 18:20:14 -08:00
Brent Vatne
cca06bb530 Do not use contentInsetAdjustmentBehavior on iOS in ModalStack example 2018-02-08 16:14:45 -08:00
Brent Vatne
4388b6403c Remove console logs from published version of navigation playground 2018-02-08 12:48:28 -08:00
Brent Vatne
7385c244b7 Add custom back button example 2018-02-07 10:42:06 -08:00
Brent Vatne
20af8c688e Prevent push from bubbling up (#3454) 2018-02-06 17:49:52 -08:00
Brent Vatne
b0dccd7e88 Prevent pop and popToTop from bubbling up to parent stack (#3453) 2018-02-06 17:35:32 -08:00
Eric Vicenti
43a1c5ddbd Fix issue with StackRouter popToTop (#3451)
Previously the state was getting squashed, in this case it would destroy the routeName of the state, which was a route for the parent navigator, who could no longer render properly.
2018-02-06 15:56:39 -08:00
Eric Vicenti
333b2e4b68 StackNavigator Replace Action (#3440)
* Navigation replace action

The long awaited action to replace the a route in StackNavigator

* Fix flow maybe
2018-02-06 12:59:16 -08:00
Brent Vatne
4d2609f4a8 Use a stack inside of drawer 2018-02-05 14:48:30 -08:00
Brent Vatne
33c6ac9ae7 Remove website, docs and related commit. (#3419)
- This now lives at https://github.com/react-navigation/react-navigation.github.io
2018-02-03 10:38:43 -08:00
Ashoat Tevosyan
b013cc98be Redux middleware for new event system (#3399)
* Add Redux bindings for new event system

* construct -> create

* react-navigation-redux-helpers
2018-02-02 11:58:35 -08:00
Ashoat Tevosyan
37c3a357fc Clean up old build process and Babel config (#3406) 2018-02-02 11:57:31 -08:00
Ashoat Tevosyan
d0da40fa32 Add Flow libdef (#3391)
* Add Flow libdef

* Move libdef to flow folder in root

* Update libdef with some refinements discovered while writing test

Mostly refining navigator config types. In the past when we tried it we got in-repo Flow errors. With a libdef we can now assert it as true!

* Get rid of all imports in libdef and refine some types
2018-02-01 09:34:35 -08:00
Ashoat Tevosyan
ffcf179883 metro-bundler -> metro (#3396) 2018-01-31 18:41:35 -08:00
Ashoat Tevosyan
441b9ffe10 Add NavigationPlayground Flow test to CI (#3385)
In order to make sure that contributors don't making breaking changes to our Flow types without corresponding updates to the libdefs, we should make sure these breaking changes get caught by CI. Right now our libdefs are any-typed, but I'll put up a PR later that will refine the libdef (located at `flow-typed/npm/react-navigation_vx.x.x.js`).
2018-01-30 15:57:06 -08:00
Ashoat Tevosyan
0d3d83bd90 Fix NavigationEvent types (#3384)
* Fix SimpleTabs types

dca37627a2 broke the types, but it wasn't noticed because Flow wasn't in the CI. This fixes the types; separate PR coming to add Flow to the CI.

* Refine type of NavigationEventListener callback

Instead of typing the callback as `Function`, we're now using the precise type provided by @ericvicenti

* NavigationEventListener -> NavigationEventSubscription
2018-01-30 15:49:47 -08:00
Ashoat Tevosyan
d1d81d7033 Update to RN 0.52 and Expo 25 (#3383)
* Update to RN 0.52 and Expo 25

* Rerecord snapshots for failing Jest tests

* jest-expo@25.1.0-beta.0

* jest-expo@25.1.0
2018-01-30 10:22:20 -08:00
Eric Vicenti
dca37627a2 Add events support to redux example (#3368)
* Fixing redux

* Fix tab events and test event nested event subscriptions

* Add event support to redux example
2018-01-27 14:12:16 -08:00
Brent Vatne
50a3f8de93 Add headerBackImage, closes #1999 2018-01-27 13:53:44 -08:00
TheCodeTalker
77b5402404 navigation back fix in example (#3218) 2018-01-27 12:42:45 -08:00
Brent Vatne
afcce1a0c0 [Playground] Move sdkVersion back to 24 2018-01-26 17:34:08 -08:00
Brent Vatne
6f430b2f1e Revert updates to example package.json 2018-01-26 16:48:02 -08:00
Ashoat Tevosyan
427e89480f Bring back TypeDefinition.js and re-add Flow to NavigationPlayground (#3363)
* Bring back TypeDefinition.js and re-add Flow to NavigationPlayground

* Type EventListener correctly and ignore metro errors
2018-01-26 16:15:49 -08:00
Eric Vicenti
0157a4c9e9 Navigation Event Subscriptions (#3345)
* Add fbemitter, keep flow passing

* Begin support for event emitter

- Adds emitter to navigation prop
- Emits top level onAction event
- stub getChildEventSubscriber for child events

* Support navigationState.isNavigating

* Focus and blur events starting to work

- Navigation completion action wired up
- Event chaining logic built in getChildEventSubscriber
- Renamed onAction evt to ‘action’

* Wrap up events progress and testing

* Rename to isTransitioning and COMPLETE_TRANSITION

* rm accidental dependency

* Suppoert event payload type
2018-01-25 00:13:28 -08:00
Adam Miskiewicz
b221afc80b Make examples use linked copy of react-navigation 2018-01-17 19:11:04 -08:00
Adam Miskiewicz
f895564605 Revert "Move examples to https://github.com/react-navigation/examples"
This reverts commit 36775007b0.
2018-01-17 14:43:28 -08:00
Brent Vatne
36775007b0 Move examples to https://github.com/react-navigation/examples 2018-01-17 12:43:24 -08:00
Brent Vatne
ff6d6f4e5e Update icons in playground app and add some padding to banner 2018-01-12 15:50:12 -08:00
Satyajit Sahoo
8329e269b6 Upgrade react-native-tab-view (#3064) 2018-01-04 14:15:35 +00:00