From 4511c76f49626e875ce5a80a932a0b3645f6b4d3 Mon Sep 17 00:00:00 2001 From: Alexander Djenkov Date: Mon, 22 Jul 2019 09:59:45 +0300 Subject: [PATCH 1/5] fix(tabs-ios): crash when setting tabStripItems through items property (#7548) --- tns-core-modules/ui/tabs/tabs.ios.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tns-core-modules/ui/tabs/tabs.ios.ts b/tns-core-modules/ui/tabs/tabs.ios.ts index 979d93e41..9239454ac 100644 --- a/tns-core-modules/ui/tabs/tabs.ios.ts +++ b/tns-core-modules/ui/tabs/tabs.ios.ts @@ -590,6 +590,11 @@ export class Tabs extends TabsBase { this._ios.dataSource = this._dataSource; this._ios.delegate = this._delegate; + + if (!this.tabBarItems) { + const tabStripItems = this.tabStrip ? this.tabStrip.items : null; + this.setTabStripItems(tabStripItems); + } } public onUnloaded() { @@ -836,6 +841,10 @@ export class Tabs extends TabsBase { } public setTabStripItems(items: Array) { + if (!this.tabStrip || !items) { + return; + } + const tabBarItems = []; items.forEach((item: TabStripItem, i) => { From 490cab0df9df6b89d488890e81ab3b347887bb75 Mon Sep 17 00:00:00 2001 From: Alexander Djenkov Date: Thu, 25 Jul 2019 15:00:42 +0300 Subject: [PATCH 2/5] fix(tabs-ios): unable to return to tab after tab with nested frame visited (#7574) --- e2e/nested-frame-navigation/app/app.ts | 2 - .../bottom-navigation-page.xml | 8 +- .../bottom-navigation-root.xml | 8 +- .../app/tab-page/tab-bottom-page.xml | 2 +- .../app/tab-page/tab-top-page.xml | 2 +- .../app/tabs-page/tabs-bottom-page.xml | 8 +- .../app/tabs-page/tabs-top-page.xml | 8 +- .../app/tabs-root/tabs-bottom-root.xml | 8 +- .../app/tabs-root/tabs-top-root.xml | 8 +- .../e2e/bottom-navigation-root.e2e-spec.ts | 180 ++++++++++++ .../frame-bottom-navigation-root.e2e-spec.ts | 264 ++++++++++++++++++ .../e2e/frame-tab-root.e2e-spec.ts | 4 +- .../e2e/frame-tabs-root.e2e-spec.ts | 264 ++++++++++++++++++ e2e/nested-frame-navigation/e2e/screen.ts | 126 +++++++-- .../e2e/tab-root.e2e-spec.ts | 4 +- .../e2e/tabs-root.e2e-spec.ts | 180 ++++++++++++ tests/app/ui/tabs/tabs-navigation-tests.ts | 8 +- tns-core-modules/ui/tabs/tabs.ios.ts | 24 +- 18 files changed, 1043 insertions(+), 65 deletions(-) create mode 100644 e2e/nested-frame-navigation/e2e/bottom-navigation-root.e2e-spec.ts create mode 100644 e2e/nested-frame-navigation/e2e/frame-bottom-navigation-root.e2e-spec.ts create mode 100644 e2e/nested-frame-navigation/e2e/frame-tabs-root.e2e-spec.ts create mode 100644 e2e/nested-frame-navigation/e2e/tabs-root.e2e-spec.ts diff --git a/e2e/nested-frame-navigation/app/app.ts b/e2e/nested-frame-navigation/app/app.ts index e0ef2193e..0c5afc47e 100644 --- a/e2e/nested-frame-navigation/app/app.ts +++ b/e2e/nested-frame-navigation/app/app.ts @@ -1,5 +1,3 @@ import * as application from "tns-core-modules/application"; application.run({ moduleName: "app-root" }); -// application.run({ moduleName: "tab-root" }); -// application.run({ moduleName: "layout-root" }); diff --git a/e2e/nested-frame-navigation/app/bottom-navigation-page/bottom-navigation-page.xml b/e2e/nested-frame-navigation/app/bottom-navigation-page/bottom-navigation-page.xml index 407ca4aee..b467699b8 100644 --- a/e2e/nested-frame-navigation/app/bottom-navigation-page/bottom-navigation-page.xml +++ b/e2e/nested-frame-navigation/app/bottom-navigation-page/bottom-navigation-page.xml @@ -1,7 +1,7 @@ - + @@ -16,9 +16,9 @@ - - - + + + diff --git a/e2e/nested-frame-navigation/app/bottom-navigation-root/bottom-navigation-root.xml b/e2e/nested-frame-navigation/app/bottom-navigation-root/bottom-navigation-root.xml index ecc8c8c2e..04920a131 100644 --- a/e2e/nested-frame-navigation/app/bottom-navigation-root/bottom-navigation-root.xml +++ b/e2e/nested-frame-navigation/app/bottom-navigation-root/bottom-navigation-root.xml @@ -1,14 +1,14 @@ - + - - + + -