-
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(page-router-outlet): actionBarVisibility not applied (#1621)
* fix(p-r-o): actionBarVisibility has no effect when applied to nested lazy loaded named outlet * tets: add tests for actionBarVisibility and lazy loaded named outlet * chore: include images for ios
- Loading branch information
1 parent
851ba1d
commit a6ff509
Showing
32 changed files
with
113 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
e2e/renderer/app/page-router-outlet/nested-lazy-page.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; | ||
import { NativeScriptRouterModule } from "nativescript-angular/router"; | ||
import { NativeScriptCommonModule } from "nativescript-angular/common"; | ||
import { SharedModule } from "~/shared.module"; | ||
import { NestedPageComponent } from "./nested-page.component"; | ||
|
||
@NgModule({ | ||
imports: [ | ||
SharedModule, | ||
NativeScriptCommonModule, | ||
NativeScriptRouterModule, | ||
NativeScriptRouterModule.forChild([ | ||
{ path: "", component: NestedPageComponent } | ||
]) | ||
], | ||
providers: [ | ||
], | ||
schemas: [NO_ERRORS_SCHEMA] | ||
}) | ||
export class NestedLazyPageModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; | ||
import { NativeScriptRouterModule } from "nativescript-angular/router"; | ||
import { NativeScriptCommonModule } from "nativescript-angular/common"; | ||
import { NestedPageComponent } from "./page-router-outlet/nested-page.component"; | ||
|
||
@NgModule({ | ||
imports: [ | ||
NativeScriptCommonModule, | ||
NativeScriptRouterModule | ||
], | ||
declarations:[NestedPageComponent], | ||
schemas: [NO_ERRORS_SCHEMA] | ||
}) | ||
export class SharedModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+220 KB
.../images/renderer/iPhone 7 110/actionBarVisibility-never-default-lazy_actual.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+112 KB
...s/images/renderer/iPhone 7 110/actionBarVisibility-never-hidden-lazy_actual.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+112 KB
...es/images/renderer/iPhone 7 110/actionBarVisibility-never-shown-lazy_actual.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+203 KB
...sources/images/renderer/iPhone X 110/actionBarVisibility-never-default-lazy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+203 KB
...esources/images/renderer/iPhone X 110/actionBarVisibility-never-hidden-lazy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+203 KB
...resources/images/renderer/iPhone X 110/actionBarVisibility-never-shown-lazy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
...sources/images/renderer/iPhone XR 12/actionBarVisibility-never-default-lazy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
...esources/images/renderer/iPhone XR 12/actionBarVisibility-never-hidden-lazy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
...resources/images/renderer/iPhone XR 12/actionBarVisibility-never-shown-lazy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-88.5 KB
(60%)
...e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-89.2 KB
(59%)
...2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-hidden.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-89.1 KB
(59%)
...e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-shown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-88.3 KB
(59%)
...e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-89.1 KB
(59%)
.../e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-hidden.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81.9 KB
(59%)
...r/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-shown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
...sources/images/renderer/iPhone XS 12/actionBarVisibility-never-default-lazy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81.8 KB
(59%)
...2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
...esources/images/renderer/iPhone XS 12/actionBarVisibility-never-hidden-lazy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-82.9 KB
(59%)
...e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-hidden.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
...resources/images/renderer/iPhone XS 12/actionBarVisibility-never-shown-lazy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-82.8 KB
(59%)
.../e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-shown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-139 KB
...derer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-first-tab.png
Binary file not shown.
Binary file removed
BIN
-143 KB
...erer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-second-tab.png
Binary file not shown.
Binary file removed
BIN
-141 KB
...derer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-third-tab.png
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
import { Component } from "@angular/core"; | ||
import { Component, ViewChild } from "@angular/core"; | ||
import { Page } from "tns-core-modules/ui/page"; | ||
import { PageRouterOutlet } from "./page-router-outlet"; | ||
@Component({ | ||
// tslint:disable-next-line:component-selector | ||
selector: "ns-empty-outlet", | ||
moduleId: module.id, | ||
template: "<page-router-outlet isEmptyOutlet='true'></page-router-outlet>" | ||
}) | ||
export class NSEmptyOutletComponent { | ||
@ViewChild(PageRouterOutlet) pageRouterOutlet: PageRouterOutlet; | ||
constructor(private page: Page) { | ||
if (this.page) { | ||
this.page.actionBarHidden = true; | ||
|
||
this.page.on("loaded", () => { | ||
if (this.pageRouterOutlet && this.page.frame) { | ||
this.pageRouterOutlet.setActionBarVisibility(this.page.frame.actionBarVisibility); | ||
} | ||
}); | ||
} | ||
} | ||
} |