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.
* 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
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.
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
* 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
* 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
* 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
* 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
- Escape hatch of `ReactNavigation.SafeAreaView.setStatusBarHeight()`.
- `if (Platform.OS === 'android') { ReactNavigation.SafeAreaView.setStatusBarHeight(0) }` to revert to old behavior.
* 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