Commit Graph

599 Commits

Author SHA1 Message Date
Eric Vicenti
f5fafff975 StackRouter block actions while transitioning (#3469)
The most straightforward fix for two issues is to block all navigation actions while mid-transition of a stack navigator. This will fix:

The double-navigate on double tap issue, because the first navigation will start the transition and the second action will be ignored.

Will fix the buggy header experience that you can see when going back and forward to a different route quickly. This happens because the next navigate action happens before the completion action. After the fix, the navigate action will be ignored, the user will tap again, and will see a good transition
2018-02-08 09:02:47 -08:00
Dave Pack
32e4f50769 Sync and switch SafeAreaView with standalone (#3452)
* add react-native-safe-area-view npm package

* remove local SafeAreaView, import from package in views

* update to latest react-native-safe-area-view

* update snapshots
2018-02-07 17:32:06 -08:00
Brent Vatne
fa22019a20 Add custom back button example 2018-02-07 10:42:06 -08:00
Brent Vatne
1163297dff Bump to 1.0.0 2018-02-06 17:51:55 -08:00
Brent Vatne
95bbcbdb42 Prevent push from bubbling up (#3454) 2018-02-06 17:49:52 -08:00
Brent Vatne
171fd5459e Prevent pop and popToTop from bubbling up to parent stack (#3453) 2018-02-06 17:35:32 -08:00
Brent Vatne
900f61c375 Bump version 2018-02-06 15:59:44 -08:00
Eric Vicenti
68ce3654a9 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
Brent Vatne
6ba55c83f9 Bump version and update description 2018-02-06 14:53:08 -08:00
Brent Vatne
6e130d95fb Remove Header.HEIGHT deprecation warning, no good alternative solution available yet 2018-02-06 14:48:44 -08:00
Brent Vatne
5314da608f Bump version 2018-02-06 14:13:41 -08:00
Eric Vicenti
ac93482b77 Fix StackRouter Replace Key Behavior (#3450)
Replace should actually provide new keys on the replaced route, use ‘newKey’ on the action if you want to define the new route key
2018-02-06 14:12:59 -08:00
Brent Vatne
a575d4f295 Bump version 2018-02-06 13:01:46 -08:00
Eric Vicenti
72e45722d1 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
b89e1231b3 Bump version 2018-02-06 12:49:43 -08:00
Brent Vatne
da76c35100 Add adaptive to TabBarBottom flow interface 2018-02-06 10:41:14 -08:00
Eric Vicenti
974b408d9a Fix focus event for initial screen (#3448) 2018-02-06 12:49:23 -08:00
Peter Steffey
b45fca2086 Fix #2795 - Not reducing header height in landscape on iPad (#3251)
* Adding tablet check for small header

* Switching to Platform.isPad

* Moving fully to Platform.isPad, no isHeightConstrained
2018-02-06 13:40:03 -05:00
Peter Steffey
bb09b7d13d Issue #2794 - Tab bar fix - Continued from #3041 (#3267)
* Fixing iPad iOS 11 Tab Bar Bottom Behavior with changing widths via Multitasking

* Adding width constrained check

* Moving to only Platform.isPad (no more layout-based tests)

* Remove type import
2018-02-06 13:39:41 -05:00
Jay Phelps
ac13204eaa remove $FlowFixMe comments left over, as flow is no longer used (#3439) 2018-02-06 05:59:38 -08:00
Brent Vatne
e4a6c47e28 Use a stack inside of drawer 2018-02-05 14:48:30 -08:00
Brent Vatne
0c2fb5ce37 Bump version 2018-02-05 11:43:53 -08:00
Brent Vatne
a8c6a4b767 Fix tests 2018-02-05 11:43:33 -08:00
Eric Vicenti
f827ecaac4 Key for completion action, to prevent eager didFocus (#3435)
The completion action would previously change the isTransitioning of any state, but this will ensure that the completing navigator only marks its own state as isTransitioning:false. Now, even when transition completion happens immediately on the parent, the child focus event still waits for the child isTransitioning to go false.
2018-02-05 11:33:00 -08:00
Eric Vicenti
1db12db9c6 Fix Transitioner race condition (#3434)
This code was added during the events implementation, but I think we should be able to manage this circumstance from the parent context. In any case, any events bugs that result from this change will be far less insidious than the cardstack transitioner issue we experience now
2018-02-05 10:52:08 -08:00
Andrej Badin
3e77decef9 Fix incorrect easing functions for CardStack (#3381)
* Fix invalid easing functions for CardStack

1. `timing` function accepts `TimingAnimationConfig` which expect `easing` (or dont expect at all) function with following signature: `(value: number) => number`
2. under the hood, `TimingAnimation` falls back to `easeInOut` function, if `easing` is not specified
`this._easing = config.easing !== undefined ? config.easing : easeInOut();`
3. by mistake passing `Easing.linear()` results in following
`typeof Easing.linear(); // undefined` which makes statement in step 2 fall back to `easeInOut`

This commit makes passing `easeInOut` function explicit and fixes existing issue and several Flow warnings

* Do not memoize easing function, keep things simple
2018-02-05 19:42:45 +01:00
dushaobindoudou
dc984807bd remove unuseful SafeAreaView component (#3428) 2018-02-06 02:41:57 +08:00
Brent Vatne
7aabbf1aff Bump version 2018-02-03 12:21:33 -08:00
Eric Vicenti
5e83b3aba6 Fix events issue when swiping back (#3420) 2018-02-03 12:20:55 -08:00
Brent Vatne
425dc24b31 Better public example point under help 2018-02-03 11:05:53 -08:00
Brent Vatne
a3ad682b90 Clarify the "how can I help?" section 2018-02-03 11:04:36 -08:00
Brent Vatne
0559ea4110 Update the web section of README 2018-02-03 11:02:26 -08:00
Brent Vatne
578e2f04d3 Add a link to the website repository 2018-02-03 10:56:19 -08:00
Brent Vatne
814964e982 Update README again to improve wording of documentation section 2018-02-03 10:55:33 -08:00
Brent Vatne
e851d86a1f Update README 2018-02-03 10:53:38 -08:00
Brent Vatne
760774453c 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
Brent Vatne
6ee9d99db2 Bump version 2018-02-02 18:08:57 -08:00
Brent Vatne
a23f7d1e72 Update yarn.lock 2018-02-02 12:33:53 -08:00
Ashoat Tevosyan
aec28f49c4 Redux middleware for new event system (#3399)
* Add Redux bindings for new event system

* construct -> create

* react-navigation-redux-helpers
2018-02-02 14:58:35 -05:00
Ashoat Tevosyan
41096f12b9 Clean up old build process and Babel config (#3406) 2018-02-02 14:57:31 -05:00
Eric Vicenti
83ee866e29 New StackRouter Push Action (#3401) 2018-02-01 17:14:13 -08:00
Eric Vicenti
7f3238d3db StackRouter PopToTop Action (#3403) 2018-02-01 17:10:12 -08:00
Eric Vicenti
d93092e91a StackRouter PopN Action (#3404) 2018-02-01 17:01:04 -08:00
Eric Vicenti
35f7961a8d StackRouter Reset Action should match state key (#3400) 2018-02-01 11:25:30 -08:00
Eric Vicenti
a07339444b Fix and actually understand event emitter (#3367) 2018-02-01 09:42:48 -08:00
Ashoat Tevosyan
8dad94e66c 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 12:34:35 -05:00
Eric Vicenti
488797e9af Add key support to StackRouter navigate (#3393) 2018-01-31 19:48:04 -08:00
Ashoat Tevosyan
c19fe8f2f5 metro-bundler -> metro (#3396) 2018-01-31 21:41:35 -05:00
Ashoat Tevosyan
a5e50bcfda 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 18:57:06 -05:00
Ashoat Tevosyan
57e3d98670 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 18:49:47 -05:00