Skip to content

Commit 1938054

Browse files
JeanMecheleonsenft
authored andcommitted
docs(docs-infra): remove explicit OnPush
1 parent 0ad18ee commit 1938054

136 files changed

Lines changed: 188 additions & 552 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

adev/angular.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
"projectType": "application",
88
"schematics": {
99
"@schematics/angular:component": {
10-
"style": "scss",
11-
"standalone": true,
12-
"changeDetection": "OnPush"
10+
"style": "scss"
1311
}
1412
},
1513
"root": ".",
@@ -77,12 +75,10 @@
7775
},
7876
"test": {
7977
"builder": "@angular/build:unit-test",
80-
"options": {
78+
"options": {
8179
"runner": "karma",
8280
"browsers": ["ChromeHeadlessNoSandbox"],
83-
"include": [
84-
"src/app/**/*.spec.ts"
85-
]
81+
"include": ["src/app/**/*.spec.ts"]
8682
}
8783
}
8884
}

adev/shared-docs/components/algolia-icon/algolia-icon.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {ChangeDetectionStrategy, Component} from '@angular/core';
9+
import {Component} from '@angular/core';
1010

1111
@Component({
1212
selector: 'docs-algolia-icon',
13-
changeDetection: ChangeDetectionStrategy.OnPush,
1413
templateUrl: './algolia-icon.component.html',
1514
})
1615
export class AlgoliaIcon {}

adev/shared-docs/components/breadcrumb/breadcrumb.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {ChangeDetectionStrategy, Component, inject, computed} from '@angular/core';
10-
import {NavigationState} from '../../services/index';
11-
import {NavigationItem} from '../../interfaces/index';
9+
import {Component, computed, inject} from '@angular/core';
1210
import {RouterLink} from '@angular/router';
11+
import {NavigationItem} from '../../interfaces/index';
12+
import {NavigationState} from '../../services/index';
1313

1414
@Component({
1515
selector: 'docs-breadcrumb',
1616
imports: [RouterLink],
1717
templateUrl: './breadcrumb.component.html',
1818
styleUrls: ['./breadcrumb.component.scss'],
19-
changeDetection: ChangeDetectionStrategy.OnPush,
2019
})
2120
export class Breadcrumb {
2221
private readonly navigationState = inject(NavigationState);

adev/shared-docs/components/cookie-popup/cookie-popup.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {ChangeDetectionStrategy, Component, inject, signal} from '@angular/core';
9+
import {Component, inject, signal} from '@angular/core';
1010
import {LOCAL_STORAGE} from '../../providers/index';
1111
import {setCookieConsent} from '../../utils';
1212

@@ -21,7 +21,6 @@ export const STORAGE_KEY = 'docs-accepts-cookies';
2121
selector: 'docs-cookie-popup',
2222
templateUrl: './cookie-popup.component.html',
2323
styleUrls: ['./cookie-popup.component.scss'],
24-
changeDetection: ChangeDetectionStrategy.OnPush,
2524
})
2625
export class CookiePopup {
2726
private readonly localStorage = inject(LOCAL_STORAGE);

adev/shared-docs/components/copy-link-anchor/copy-link-anchor.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {ChangeDetectionStrategy, Component, inject, input, signal} from '@angular/core';
109
import {Clipboard} from '@angular/cdk/clipboard';
10+
import {Component, inject, input, signal} from '@angular/core';
1111
import {MatTooltip} from '@angular/material/tooltip';
1212
import {IconComponent} from '../icon/icon.component';
1313

@@ -45,7 +45,6 @@ export const CONFIRMATION_DISPLAY_TIME_MS = 1000;
4545
'[class.docs-copy-link-success]': 'showCopySuccess()',
4646
},
4747
imports: [IconComponent],
48-
changeDetection: ChangeDetectionStrategy.OnPush,
4948
})
5049
export class CopyLinkButton {
5150
readonly href = input.required<string>();

adev/shared-docs/components/copy-source-code-button/copy-source-code-button.component.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
import {ComponentFixture, TestBed} from '@angular/core/testing';
1010

11+
import {Clipboard} from '@angular/cdk/clipboard';
12+
import {Component, signal} from '@angular/core';
13+
import {By} from '@angular/platform-browser';
1114
import {
1215
CONFIRMATION_DISPLAY_TIME_MS,
1316
CopySourceCodeButton,
1417
} from './copy-source-code-button.component';
15-
import {ChangeDetectionStrategy, Component, signal} from '@angular/core';
16-
import {By} from '@angular/platform-browser';
17-
import {Clipboard} from '@angular/cdk/clipboard';
1818

1919
const SUCCESSFULLY_COPY_CLASS_NAME = 'docs-copy-source-code-button-success';
2020
const FAILED_COPY_CLASS_NAME = 'docs-copy-source-code-button-failed';
@@ -99,7 +99,6 @@ describe('CopySourceCodeButton', () => {
9999
<button docs-copy-source-code></button>
100100
`,
101101
imports: [CopySourceCodeButton],
102-
changeDetection: ChangeDetectionStrategy.OnPush,
103102
})
104103
class CodeSnippetWrapper {
105104
code = signal('');

adev/shared-docs/components/copy-source-code-button/copy-source-code-button.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9+
import {Clipboard} from '@angular/cdk/clipboard';
910
import {
10-
ChangeDetectionStrategy,
1111
ChangeDetectorRef,
1212
Component,
1313
ElementRef,
1414
WritableSignal,
1515
inject,
1616
signal,
1717
} from '@angular/core';
18-
import {Clipboard} from '@angular/cdk/clipboard';
1918
import {IconComponent} from '../icon/icon.component';
2019

2120
export const REMOVED_LINE_CLASS_NAME = '.line.remove';
@@ -33,7 +32,6 @@ export const CONFIRMATION_DISPLAY_TIME_MS = 2000;
3332
'[class.docs-copy-source-code-button-success]': 'showCopySuccess()',
3433
'[class.docs-copy-source-code-button-failed]': 'showCopyFailure()',
3534
},
36-
changeDetection: ChangeDetectionStrategy.OnPush,
3735
})
3836
export class CopySourceCodeButton {
3937
private readonly changeDetector = inject(ChangeDetectorRef);

adev/shared-docs/components/icon/icon.component.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,10 @@
77
*/
88

99
import {DOCUMENT} from '@angular/common';
10-
import {
11-
ChangeDetectionStrategy,
12-
Component,
13-
afterNextRender,
14-
computed,
15-
inject,
16-
signal,
17-
} from '@angular/core';
10+
import {Component, afterNextRender, computed, inject, signal} from '@angular/core';
1811

1912
@Component({
2013
selector: 'docs-icon',
21-
changeDetection: ChangeDetectionStrategy.OnPush,
2214
host: {
2315
'class': 'material-symbols-outlined',
2416
'[style.font-size.px]': 'fontSize()',

adev/shared-docs/components/navigation-list/navigation-list.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import {NgTemplateOutlet} from '@angular/common';
10-
import {ChangeDetectionStrategy, Component, inject, input, output} from '@angular/core';
10+
import {Component, inject, input, output} from '@angular/core';
1111
import {MatTooltip} from '@angular/material/tooltip';
1212
import {RouterLink, RouterLinkActive} from '@angular/router';
1313
import {NavigationItem} from '../../interfaces/index';
@@ -27,7 +27,6 @@ import {IconComponent} from '../icon/icon.component';
2727
],
2828
templateUrl: './navigation-list.component.html',
2929
styleUrls: ['./navigation-list.component.scss'],
30-
changeDetection: ChangeDetectionStrategy.OnPush,
3130
})
3231
export class NavigationList {
3332
readonly navigationItems = input.required<NavigationItem[]>();

adev/shared-docs/components/search-dialog/search-dialog.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import {
1010
afterNextRender,
11-
ChangeDetectionStrategy,
1211
Component,
1312
DestroyRef,
1413
effect,
@@ -36,7 +35,6 @@ import {TextField} from '../text-field/text-field.component';
3635

3736
@Component({
3837
selector: 'docs-search-dialog',
39-
changeDetection: ChangeDetectionStrategy.OnPush,
4038
imports: [
4139
ClickOutside,
4240
TextField,

0 commit comments

Comments
 (0)