Revert OnPush on route-hosting layout shells (#24646)

This commit is contained in:
Bryan Cunningham
2026-11-10 14:38:19 -05:00
committed by GitHub
parent f54be55678
commit 7dd65223f4
4 changed files with 12 additions and 29 deletions

View File

@@ -1,11 +1,4 @@
import {
ChangeDetectionStrategy,
Component,
DestroyRef,
inject,
OnInit,
signal,
} from "@angular/core";
import { Component, DestroyRef, inject, OnInit, signal } from "@angular/core";
import { takeUntilDestroyed, toSignal } from "@angular/core/rxjs-interop";
import { ActivatedRoute, Data, NavigationEnd, Router, RouterModule } from "@angular/router";
import { filter, map, of, switchMap, tap } from "rxjs";
@@ -80,8 +73,9 @@ const INITIAL_STATE: ExtensionAnonLayoutWrapperState = {
hideCardWrapper: false,
};
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush once routed pages no longer rely on Default CD
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: "extension-anon-layout-wrapper.component.html",
imports: [
AnonLayoutComponent,

View File

@@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, inject, OnDestroy, OnInit } from "@angular/core";
import { Component, inject, OnDestroy, OnInit } from "@angular/core";
import { toSignal } from "@angular/core/rxjs-interop";
import { from } from "rxjs";
@@ -7,8 +7,9 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
import { EnvironmentSelectorComponent } from "../components/environment-selector/environment-selector.component";
import { SharedModule } from "../shared";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush once routed pages no longer rely on Default CD
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: "app-frontend-layout",
templateUrl: "frontend-layout.component.html",
imports: [SharedModule, EnvironmentSelectorComponent],

View File

@@ -1,12 +1,5 @@
import { CommonModule } from "@angular/common";
import {
ChangeDetectionStrategy,
Component,
computed,
inject,
OnInit,
Signal,
} from "@angular/core";
import { Component, computed, inject, OnInit, Signal } from "@angular/core";
import { toSignal } from "@angular/core/rxjs-interop";
import { RouterModule } from "@angular/router";
import { map, Observable, switchMap } from "rxjs";
@@ -42,8 +35,9 @@ import { PamUserNavSlotComponent } from "../pam/user-nav-slot/pam-user-nav-slot.
import { WebLayoutModule } from "./web-layout.module";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush once routed pages no longer rely on Default CD
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: "app-user-layout",
templateUrl: "user-layout.component.html",
imports: [

View File

@@ -1,11 +1,4 @@
import {
ChangeDetectionStrategy,
Component,
DestroyRef,
inject,
OnInit,
signal,
} from "@angular/core";
import { Component, DestroyRef, inject, OnInit, signal } from "@angular/core";
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
import { ActivatedRoute, Data, NavigationEnd, Router, RouterModule } from "@angular/router";
import { filter, of, switchMap, tap } from "rxjs";
@@ -110,8 +103,9 @@ interface AnonLayoutWrapperState {
const EMPTY_STATE: AnonLayoutWrapperState = { pageIcon: null };
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush once routed pages no longer rely on Default CD
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: "anon-layout-wrapper.component.html",
imports: [AnonLayoutComponent, RouterModule],
})