From e5e9dd5dfe032b04a01a25e7bac180df09f7d234 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 18 Oct 2019 08:56:53 -0400 Subject: [PATCH 01/11] fix(menu): clamp out of bounds swipe value (#19684) fixes #18927 --- core/src/utils/animation/test/animation.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/src/utils/animation/test/animation.spec.ts b/core/src/utils/animation/test/animation.spec.ts index 6ecf4ed8ca..e6fd267e67 100644 --- a/core/src/utils/animation/test/animation.spec.ts +++ b/core/src/utils/animation/test/animation.spec.ts @@ -385,6 +385,18 @@ describe('cubic-bezier conversion', () => { shouldApproximatelyEqual(getTimeGivenProgression(...equation, 1.02), [0.35, 0.87]); }) + + it('cubic-bezier(0.32, 0.72, 0, 1) (with out of bounds progression)', () => { + const equation = [ + new Point(0, 0), + new Point(0.05, 0.2), + new Point(.14, 1.72), + new Point(1, 1) + ]; + + expect(getTimeGivenProgression(...equation, 1.32)).toBeNaN(); + expect(getTimeGivenProgression(...equation, -0.32)).toBeNaN(); + }) }) }); From 2f5d8237488df0feef17b724d96dd14b7274fbf4 Mon Sep 17 00:00:00 2001 From: Ely Lucas Date: Tue, 5 Nov 2019 16:49:10 -0700 Subject: [PATCH 02/11] fix(react): create a new overlay each time component is presented, fixes #19841, #19823 (#19842) --- .../src/components/createControllerComponent.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/react/src/components/createControllerComponent.tsx b/packages/react/src/components/createControllerComponent.tsx index 83c0d08537..8bda7a4078 100644 --- a/packages/react/src/components/createControllerComponent.tsx +++ b/packages/react/src/components/createControllerComponent.tsx @@ -54,18 +54,15 @@ export const createControllerComponent = Date: Wed, 6 Nov 2019 10:08:57 -0700 Subject: [PATCH 03/11] fix(react): adding swipe back functionality and routerOutlet ready improvements, fixes #19818 (#19849) --- .../src/ReactRouter/NavManager.tsx | 39 +---- .../src/ReactRouter/RouteManagerContext.ts | 2 +- .../react-router/src/ReactRouter/Router.tsx | 134 ++++++++++++------ .../src/ReactRouter/StackManager.tsx | 19 ++- packages/react-router/tslint.json | 2 +- packages/react/src/components/index.ts | 2 +- packages/react/src/components/utils/index.tsx | 12 +- 7 files changed, 124 insertions(+), 86 deletions(-) diff --git a/packages/react-router/src/ReactRouter/NavManager.tsx b/packages/react-router/src/ReactRouter/NavManager.tsx index 1423090fdf..60b39bab9e 100644 --- a/packages/react-router/src/ReactRouter/NavManager.tsx +++ b/packages/react-router/src/ReactRouter/NavManager.tsx @@ -4,24 +4,16 @@ import { Location as HistoryLocation, UnregisterCallback } from 'history'; import React from 'react'; import { RouteComponentProps } from 'react-router-dom'; -import { generateId } from '../utils'; -import { LocationHistory } from '../utils/LocationHistory'; - import { StackManager } from './StackManager'; -import { ViewItem } from './ViewItem'; -import { ViewStack } from './ViewStacks'; interface NavManagerProps extends RouteComponentProps { - findViewInfoByLocation: (location: HistoryLocation) => { view?: ViewItem, viewStack?: ViewStack }; - findViewInfoById: (id: string) => { view?: ViewItem, viewStack?: ViewStack }; - getActiveIonPage: () => { view?: ViewItem, viewStack?: ViewStack }; + onNavigateBack: (defaultHref?: string) => void; onNavigate: (type: 'push' | 'replace', path: string, state?: any) => void; } export class NavManager extends React.Component { listenUnregisterCallback: UnregisterCallback | undefined; - locationHistory: LocationHistory = new LocationHistory(); constructor(props: NavManagerProps) { super(props); @@ -40,16 +32,8 @@ export class NavManager extends React.Component void; hideView: (viewId: string) => void; viewStacks: ViewStacks; - setupIonRouter: (id: string, children: ReactNode, routerOutlet: HTMLIonRouterOutletElement) => Promise; + setupIonRouter: (id: string, children: ReactNode, routerOutlet: HTMLIonRouterOutletElement) => void; removeViewStack: (stack: string) => void; } diff --git a/packages/react-router/src/ReactRouter/Router.tsx b/packages/react-router/src/ReactRouter/Router.tsx index 9dda553276..d6b735e435 100644 --- a/packages/react-router/src/ReactRouter/Router.tsx +++ b/packages/react-router/src/ReactRouter/Router.tsx @@ -1,10 +1,11 @@ import { NavDirection } from '@ionic/core'; -import { RouterDirection } from '@ionic/react'; +import { RouterDirection, getConfig } from '@ionic/react'; import { Action as HistoryAction, Location as HistoryLocation, UnregisterCallback } from 'history'; import React from 'react'; import { RouteComponentProps, matchPath, withRouter } from 'react-router-dom'; import { generateId } from '../utils'; +import { LocationHistory } from '../utils/LocationHistory'; import { IonRouteData } from './IonRouteData'; import { NavManager } from './NavManager'; @@ -21,11 +22,13 @@ class RouteManager extends React.Component, location: HistoryLocation) { const viewId = generateId(); @@ -212,29 +224,61 @@ class RouteManager extends React.Component { - this.setState(prevState => { - const prevViewStacks = Object.assign(new ViewStacks(), prevState.viewStacks); - const newStack: ViewStack = { - id: stack, - views: stackItems, - routerOutlet - }; - if (activeId) { - this.activeIonPageId = activeId; - } - prevViewStacks.set(stack, newStack); - return { - viewStacks: prevViewStacks - }; - }, () => { - resolve(); - }); + registerViewStack(stack: string, activeId: string | undefined, stackItems: ViewItem[], routerOutlet: HTMLIonRouterOutletElement, _location: HistoryLocation) { + this.setState(prevState => { + const prevViewStacks = Object.assign(new ViewStacks(), prevState.viewStacks); + const newStack: ViewStack = { + id: stack, + views: stackItems, + routerOutlet + }; + if (activeId) { + this.activeIonPageId = activeId; + } + prevViewStacks.set(stack, newStack); + return { + viewStacks: prevViewStacks + }; + }, () => { + this.setupRouterOutlet(routerOutlet); }); } + async setupRouterOutlet(routerOutlet: HTMLIonRouterOutletElement) { + const waitUntilReady = async () => { + if (routerOutlet.componentOnReady) { + routerOutlet.dispatchEvent(new Event('routerOutletReady')); + return; + } else { + setTimeout(() => { + waitUntilReady(); + }, 0); + } + }; + + await waitUntilReady(); + + const canStart = () => { + const config = getConfig(); + const swipeEnabled = config && config.get('swipeBackEnabled', routerOutlet.mode === 'ios'); + if (swipeEnabled) { + const { view } = this.state.viewStacks.findViewInfoById(this.activeIonPageId); + return !!(view && view.prevId); + } else { + return false; + } + }; + + const onStart = () => { + this.navigateBack(); + }; + routerOutlet.swipeHandler = { + canStart, + onStart, + onEnd: _shouldContinue => true + }; + } + removeViewStack(stack: string) { const viewStacks = Object.assign(new ViewStacks(), this.state.viewStacks); viewStacks.delete(stack); @@ -245,7 +289,6 @@ class RouteManager extends React.Component { - const viewStacks = Object.assign(new ViewStacks(), state.viewStacks); const { view } = viewStacks.findViewInfoById(viewId); @@ -261,20 +304,6 @@ class RouteManager extends React.Component { - this.transitionView(enteringEl, leavingEl, ionRouterOutlet, direction, showGoBack); - }, 10); - } - } - private async commitView(enteringEl: HTMLElement, leavingEl: HTMLElement, ionRouterOuter: HTMLIonRouterOutletElement, direction?: NavDirection, showGoBack?: boolean) { if (enteringEl === leavingEl) { @@ -305,15 +334,36 @@ class RouteManager extends React.Component this.state.viewStacks.findViewInfoById(id)} - findViewInfoByLocation={(location: HistoryLocation) => this.state.viewStacks.findViewInfoByLocation(location)} - getActiveIonPage={() => this.state.viewStacks.findViewInfoById(this.activeIonPageId)} > {this.props.children} diff --git a/packages/react-router/src/ReactRouter/StackManager.tsx b/packages/react-router/src/ReactRouter/StackManager.tsx index 8fa7a605b9..6cccf00fbd 100644 --- a/packages/react-router/src/ReactRouter/StackManager.tsx +++ b/packages/react-router/src/ReactRouter/StackManager.tsx @@ -11,7 +11,11 @@ interface StackManagerProps { id?: string; } -export class StackManager extends React.Component { +interface StackManagerState { + routerOutletReady: boolean; +} + +export class StackManager extends React.Component { routerOutletEl: React.RefObject = React.createRef(); context!: React.ContextType; id: string; @@ -21,10 +25,18 @@ export class StackManager extends React.Component { this.id = this.props.id || generateId(); this.handleViewSync = this.handleViewSync.bind(this); this.handleHideView = this.handleHideView.bind(this); + this.state = { + routerOutletReady: false + }; } componentDidMount() { this.context.setupIonRouter(this.id, this.props.children, this.routerOutletEl.current!); + this.routerOutletEl.current!.addEventListener('routerOutletReady', () => { + this.setState({ + routerOutletReady: true + }); + }); } componentWillUnmount() { @@ -51,8 +63,9 @@ export class StackManager extends React.Component { const viewStack = context.viewStacks.get(this.id); const views = (viewStack || { views: [] }).views.filter(x => x.show); const ionRouterOutlet = React.Children.only(this.props.children) as React.ReactElement; + const { routerOutletReady } = this.state; - const childElements = views.map(view => { + const childElements = routerOutletReady ? views.map(view => { return ( { ); - }); + }) :
; const elementProps: any = { ref: this.routerOutletEl diff --git a/packages/react-router/tslint.json b/packages/react-router/tslint.json index b53ba7ef77..2f90574c64 100644 --- a/packages/react-router/tslint.json +++ b/packages/react-router/tslint.json @@ -19,7 +19,7 @@ "no-invalid-template-strings": true, "ban-export-const-enum": true, "only-arrow-functions": false, - "strict-boolean-conditions": [true, "allow-null-union", "allow-undefined-union", "allow-boolean-or-undefined", "allow-string"], + "strict-boolean-conditions": [false], "jsx-key": false, "jsx-self-close": false, "jsx-curly-spacing": [true, "never"], diff --git a/packages/react/src/components/index.ts b/packages/react/src/components/index.ts index f2e2952028..ad015b9fea 100644 --- a/packages/react/src/components/index.ts +++ b/packages/react/src/components/index.ts @@ -24,7 +24,7 @@ export { IonBackButton } from './navigation/IonBackButton'; export { IonRouterOutlet } from './IonRouterOutlet'; // Utils -export { isPlatform, getPlatforms } from './utils'; +export { isPlatform, getPlatforms, getConfig } from './utils'; export { RouterDirection } from './hrefprops'; // Icons that are used by internal components diff --git a/packages/react/src/components/utils/index.tsx b/packages/react/src/components/utils/index.tsx index ae87b14ae6..405d62ae70 100644 --- a/packages/react/src/components/utils/index.tsx +++ b/packages/react/src/components/utils/index.tsx @@ -1,4 +1,4 @@ -import { Platforms, getPlatforms as getPlatformsCore, isPlatform as isPlatformCore } from '@ionic/core'; +import { Platforms, getPlatforms as getPlatformsCore, isPlatform as isPlatformCore, Config as CoreConfig } from '@ionic/core'; import React from 'react'; import { IonicReactProps } from '../IonicReactProps'; @@ -24,3 +24,13 @@ export const isPlatform = (platform: Platforms) => { export const getPlatforms = () => { return getPlatformsCore(window); }; + +export const getConfig = (): CoreConfig | null => { + if (typeof (window as any) !== 'undefined') { + const Ionic = (window as any).Ionic; + if (Ionic && Ionic.config) { + return Ionic.config; + } + } + return null; +}; From a4b2de5730330cd53dbfe046f0f0a97bb93b86e7 Mon Sep 17 00:00:00 2001 From: Ely Lucas Date: Wed, 6 Nov 2019 14:54:06 -0700 Subject: [PATCH 04/11] fix(react): adding hardware back button support, fixes(19819) (#19851) --- packages/react-router/src/ReactRouter/NavManager.tsx | 7 +++++++ packages/react/src/components/utils/index.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/react-router/src/ReactRouter/NavManager.tsx b/packages/react-router/src/ReactRouter/NavManager.tsx index 60b39bab9e..a01bc7873b 100644 --- a/packages/react-router/src/ReactRouter/NavManager.tsx +++ b/packages/react-router/src/ReactRouter/NavManager.tsx @@ -34,6 +34,13 @@ export class NavManager extends React.Component { + e.detail.register(0, () => { + this.props.history.goBack(); + }); + }); + } } componentWillUnmount() { diff --git a/packages/react/src/components/utils/index.tsx b/packages/react/src/components/utils/index.tsx index 405d62ae70..3ce11956b1 100644 --- a/packages/react/src/components/utils/index.tsx +++ b/packages/react/src/components/utils/index.tsx @@ -1,4 +1,4 @@ -import { Platforms, getPlatforms as getPlatformsCore, isPlatform as isPlatformCore, Config as CoreConfig } from '@ionic/core'; +import { Config as CoreConfig, Platforms, getPlatforms as getPlatformsCore, isPlatform as isPlatformCore } from '@ionic/core'; import React from 'react'; import { IonicReactProps } from '../IonicReactProps'; From e2ed0e9e87e46dc688e57fb635eadc139ee67b0b Mon Sep 17 00:00:00 2001 From: Ely Lucas Date: Thu, 7 Nov 2019 09:00:01 -0700 Subject: [PATCH 05/11] fix(react): expand the location stack to better support back button, fixes #19748 (#19856) --- .../react-router/src/ReactRouter/Router.tsx | 33 ++++++++++++++----- .../react-router/src/utils/LocationHistory.ts | 29 +++++++++++++--- 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/packages/react-router/src/ReactRouter/Router.tsx b/packages/react-router/src/ReactRouter/Router.tsx index d6b735e435..863619bb2d 100644 --- a/packages/react-router/src/ReactRouter/Router.tsx +++ b/packages/react-router/src/ReactRouter/Router.tsx @@ -22,7 +22,7 @@ class RouteManager extends React.Component v.prevId === view.id); viewsToRemove.forEach(v => { // Don't remove if view is currently active @@ -339,15 +349,20 @@ class RouteManager extends React.Component x.pathname.toLowerCase() === url.toLowerCase()); - return last; + pop() { + this.locationHistory.pop(); + } + + replace(location: HistoryLocation) { + this.locationHistory.pop(); + this.locationHistory.push(location); + } + + findLastLocationByUrl(url: string) { + for (let i = this.locationHistory.length - 1; i >= 0; i--) { + const location = this.locationHistory[i]; + if (location.pathname.toLocaleLowerCase() === url.toLocaleLowerCase()) { + return location; + } + } + return undefined; + } + + previous() { + return this.locationHistory[this.locationHistory.length - 2]; + } + + current() { + return this.locationHistory[this.locationHistory.length - 1]; } } From 9864c17c1c7a3bcae6255e06497cc1e65b71ea24 Mon Sep 17 00:00:00 2001 From: Ely Lucas Date: Thu, 7 Nov 2019 10:00:17 -0700 Subject: [PATCH 06/11] fix(react): add check to warn if no ionpage is found, fixes #19832 (#19857) --- packages/react-router/src/ReactRouter/Router.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/react-router/src/ReactRouter/Router.tsx b/packages/react-router/src/ReactRouter/Router.tsx index 863619bb2d..742a923513 100644 --- a/packages/react-router/src/ReactRouter/Router.tsx +++ b/packages/react-router/src/ReactRouter/Router.tsx @@ -4,7 +4,7 @@ import { Action as HistoryAction, Location as HistoryLocation, UnregisterCallbac import React from 'react'; import { RouteComponentProps, matchPath, withRouter } from 'react-router-dom'; -import { generateId } from '../utils'; +import { generateId, isDevMode } from '../utils'; import { LocationHistory } from '../utils/LocationHistory'; import { IonRouteData } from './IonRouteData'; @@ -169,6 +169,18 @@ class RouteManager extends React.Component { + const { view } = this.state.viewStacks.findViewInfoById(this.activeIonPageId); + if (view!.routeData.match!.url !== location.pathname) { + console.warn('No IonPage was found to render. Make sure you wrap your page with an IonPage component.'); + } + }, 1000); + } + } } }); } From 3e14a57f843f55c3867e6472bbf1d7c0ed5e1943 Mon Sep 17 00:00:00 2001 From: Ely Lucas Date: Thu, 7 Nov 2019 11:55:47 -0700 Subject: [PATCH 07/11] fix(react): adding multiple subscriptions to lifecycle events, fixes #19792 (#19858) --- .../src/contexts/IonLifeCycleContext.tsx | 42 ++++++++----------- packages/react/src/lifecycle/hooks.ts | 26 ++++++++---- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/packages/react/src/contexts/IonLifeCycleContext.tsx b/packages/react/src/contexts/IonLifeCycleContext.tsx index b1cf020fbe..f5d1051183 100644 --- a/packages/react/src/contexts/IonLifeCycleContext.tsx +++ b/packages/react/src/contexts/IonLifeCycleContext.tsx @@ -22,52 +22,46 @@ export const IonLifeCycleContext = /*@__PURE__*/React.createContext { return; }, }); +type LifeCycleCallback = () => void; + export const DefaultIonLifeCycleContext = class implements IonLifeCycleContextInterface { - ionViewWillEnterCallback?: () => void; - ionViewDidEnterCallback?: () => void; - ionViewWillLeaveCallback?: () => void; - ionViewDidLeaveCallback?: () => void; + ionViewWillEnterCallbacks: LifeCycleCallback[] = []; + ionViewDidEnterCallbacks: LifeCycleCallback[] = []; + ionViewWillLeaveCallbacks: LifeCycleCallback[] = []; + ionViewDidLeaveCallbacks: LifeCycleCallback[] = []; componentCanBeDestroyedCallback?: () => void; - onIonViewWillEnter(callback: () => void) { - this.ionViewWillEnterCallback = callback; + onIonViewWillEnter(callback: LifeCycleCallback) { + this.ionViewWillEnterCallbacks.push(callback); } ionViewWillEnter() { - if (this.ionViewWillEnterCallback) { - this.ionViewWillEnterCallback(); - } + this.ionViewWillEnterCallbacks.forEach(cb => cb()); } - onIonViewDidEnter(callback: () => void) { - this.ionViewDidEnterCallback = callback; + onIonViewDidEnter(callback: LifeCycleCallback) { + this.ionViewDidEnterCallbacks.push(callback); } ionViewDidEnter() { - if (this.ionViewDidEnterCallback) { - this.ionViewDidEnterCallback(); - } + this.ionViewDidEnterCallbacks.forEach(cb => cb()); } - onIonViewWillLeave(callback: () => void) { - this.ionViewWillLeaveCallback = callback; + onIonViewWillLeave(callback: LifeCycleCallback) { + this.ionViewWillLeaveCallbacks.push(callback); } ionViewWillLeave() { - if (this.ionViewWillLeaveCallback) { - this.ionViewWillLeaveCallback(); - } + this.ionViewWillLeaveCallbacks.forEach(cb => cb()); } - onIonViewDidLeave(callback: () => void) { - this.ionViewDidLeaveCallback = callback; + onIonViewDidLeave(callback: LifeCycleCallback) { + this.ionViewDidLeaveCallbacks.push(callback); } ionViewDidLeave() { - if (this.ionViewDidLeaveCallback) { - this.ionViewDidLeaveCallback(); - } + this.ionViewDidLeaveCallbacks.forEach(cb => cb()); this.componentCanBeDestroyed(); } diff --git a/packages/react/src/lifecycle/hooks.ts b/packages/react/src/lifecycle/hooks.ts index e93b2dd170..181f2dbe56 100644 --- a/packages/react/src/lifecycle/hooks.ts +++ b/packages/react/src/lifecycle/hooks.ts @@ -1,23 +1,31 @@ -import { useContext } from 'react'; +import { useContext, useEffect } from 'react'; import { IonLifeCycleContext } from '../contexts/IonLifeCycleContext'; export const useIonViewWillEnter = (callback: () => void) => { - const value = useContext(IonLifeCycleContext); - value.onIonViewWillEnter(callback); + const context = useContext(IonLifeCycleContext); + useEffect(() => { + context.onIonViewWillEnter(callback); + }, []); }; export const useIonViewDidEnter = (callback: () => void) => { - const value = useContext(IonLifeCycleContext); - value.onIonViewDidEnter(callback); + const context = useContext(IonLifeCycleContext); + useEffect(() => { + context.onIonViewDidEnter(callback); + }, []); }; export const useIonViewWillLeave = (callback: () => void) => { - const value = useContext(IonLifeCycleContext); - value.onIonViewWillLeave(callback); + const context = useContext(IonLifeCycleContext); + useEffect(() => { + context.onIonViewWillLeave(callback); + }, []); }; export const useIonViewDidLeave = (callback: () => void) => { - const value = useContext(IonLifeCycleContext); - value.onIonViewDidLeave(callback); + const context = useContext(IonLifeCycleContext); + useEffect(() => { + context.onIonViewDidLeave(callback); + }, []); }; From 13b323f25d4a681b3c4d88871702fc74d2d9f3ed Mon Sep 17 00:00:00 2001 From: Ely Lucas Date: Thu, 7 Nov 2019 13:21:23 -0700 Subject: [PATCH 08/11] chore(react): lowering the timeout for the ionpage check to avoid false positives --- packages/react-router/src/ReactRouter/Router.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-router/src/ReactRouter/Router.tsx b/packages/react-router/src/ReactRouter/Router.tsx index 742a923513..2da67dc729 100644 --- a/packages/react-router/src/ReactRouter/Router.tsx +++ b/packages/react-router/src/ReactRouter/Router.tsx @@ -178,7 +178,7 @@ class RouteManager extends React.Component Date: Thu, 7 Nov 2019 15:20:36 -0500 Subject: [PATCH 09/11] fix(react): check for component unmount, fixes #19859 --- .../react/src/components/createControllerComponent.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/react/src/components/createControllerComponent.tsx b/packages/react/src/components/createControllerComponent.tsx index 8bda7a4078..62def561c7 100644 --- a/packages/react/src/components/createControllerComponent.tsx +++ b/packages/react/src/components/createControllerComponent.tsx @@ -23,6 +23,7 @@ export const createControllerComponent = { overlay?: OverlayType; + isUnmounted = false; constructor(props: Props) { super(props); @@ -40,6 +41,7 @@ export const createControllerComponent = Date: Thu, 7 Nov 2019 14:34:46 -0700 Subject: [PATCH 10/11] 4.11.4 --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d533e39c25..e5f96e4aa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [4.11.4](https://github.com/ionic-team/ionic/compare/v4.11.1...v4.11.4) (2019-11-07) + + +### Bug Fixes + +* **react:** check for component unmount, fixes [#19859](https://github.com/ionic-team/ionic/issues/19859) ([7356c40](https://github.com/ionic-team/ionic/commit/7356c401742ce2b3241d6ab05fce0fa65d2f1f8a)) +* **react:** adding multiple subscriptions to lifecycle events, fixes [#19792](https://github.com/ionic-team/ionic/issues/19792) ([#19858](https://github.com/ionic-team/ionic/issues/19858)) ([0a3014d](https://github.com/ionic-team/ionic/commit/0a3014d35e2102570fd3d8c5ada29eb01aab18e9)) +* **react:** add check to warn if no ionpage is found, fixes [#19832](https://github.com/ionic-team/ionic/issues/19832) ([#19857](https://github.com/ionic-team/ionic/issues/19857)) ([628e766](https://github.com/ionic-team/ionic/commit/628e76668ea72baebdb02b9dcfe24c0da837fb08)) +* **react:** expand the location stack to better support back button, fixes [#19748](https://github.com/ionic-team/ionic/issues/19748) ([#19856](https://github.com/ionic-team/ionic/issues/19856)) ([d89508b](https://github.com/ionic-team/ionic/commit/d89508b1b58481d518b89362a8792d05f3f451c9)) +* **react:** adding hardware back button support, fixes(19819) ([#19851](https://github.com/ionic-team/ionic/issues/19851)) ([fd9745d](https://github.com/ionic-team/ionic/commit/fd9745ddcddded76d64220838aef0f599bf4352f)) +* **react:** adding swipe back functionality and routerOutlet ready improvements, fixes [#19818](https://github.com/ionic-team/ionic/issues/19818) ([#19849](https://github.com/ionic-team/ionic/issues/19849)) ([bcc40c8](https://github.com/ionic-team/ionic/commit/bcc40c8d59b723bbdb1dfd318bfb2219eb8df3cf)) +* **react:** create a new overlay each time component is presented, fixes [#19841](https://github.com/ionic-team/ionic/issues/19841), [#19823](https://github.com/ionic-team/ionic/issues/19823) ([#19842](https://github.com/ionic-team/ionic/issues/19842)) ([9fad416](https://github.com/ionic-team/ionic/commit/9fad4161be4859969e14d4d33169ef022052d6bf)) + + ## [4.11.3](https://github.com/ionic-team/ionic/compare/v4.11.1...v4.11.3) (2019-10-30) From 1af1e2a14fb349539d3f950c2658e2e43f00e7b6 Mon Sep 17 00:00:00 2001 From: Ely Lucas Date: Thu, 7 Nov 2019 15:32:39 -0700 Subject: [PATCH 11/11] chore(core): fixing test from bad rebase --- core/src/utils/animation/test/animation.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/utils/animation/test/animation.spec.ts b/core/src/utils/animation/test/animation.spec.ts index e6fd267e67..21c885af55 100644 --- a/core/src/utils/animation/test/animation.spec.ts +++ b/core/src/utils/animation/test/animation.spec.ts @@ -388,14 +388,14 @@ describe('cubic-bezier conversion', () => { it('cubic-bezier(0.32, 0.72, 0, 1) (with out of bounds progression)', () => { const equation = [ - new Point(0, 0), - new Point(0.05, 0.2), - new Point(.14, 1.72), - new Point(1, 1) + [0, 0], + [0.05, 0.2], + [.14, 1.72], + [1, 1] ]; - expect(getTimeGivenProgression(...equation, 1.32)).toBeNaN(); - expect(getTimeGivenProgression(...equation, -0.32)).toBeNaN(); + expect(getTimeGivenProgression(...equation, 1.32)).toEqual([]); + expect(getTimeGivenProgression(...equation, -0.32)).toEqual([]); }) }) });