Skip to content

Release 8.2.2 #2018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<a name="8.2.2"></a>
## [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))



<a name="8.2.1"></a>
## [8.2.1](https://github.com/NativeScript/nativescript-angular/compare/8.2.0...8.2.1) (2019-08-28)

Expand Down
17 changes: 11 additions & 6 deletions e2e/nested-router-tab-view/e2e/home-tabs.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 6 additions & 1 deletion nativescript-angular/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
}