refactor(charts): explicitly define change detection strategy#2187
refactor(charts): explicitly define change detection strategy#2187spliffone wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request explicitly configures several chart components and test hosts to use ChangeDetectionStrategy.Default and imports the strategy accordingly. The reviewer correctly points out that since Default is already the default change detection strategy in Angular, explicitly defining it is redundant and adds unnecessary boilerplate. It is recommended to remove these redundant imports and configuration properties across all modified files to keep the codebase clean and aligned with the style guide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| * SPDX-License-Identifier: MIT | ||
| */ | ||
| import { Component, input, OnChanges, SimpleChanges } from '@angular/core'; | ||
| import { ChangeDetectionStrategy, Component, input, OnChanges, SimpleChanges } from '@angular/core'; |
There was a problem hiding this comment.
Explicitly importing ChangeDetectionStrategy is unnecessary if we are not using it. Since Default is the default strategy in Angular, we can omit it entirely.
| import { ChangeDetectionStrategy, Component, input, OnChanges, SimpleChanges } from '@angular/core'; | |
| import { Component, input, OnChanges, SimpleChanges } from '@angular/core'; |
| styleUrl: '../common/si-chart-base.component.scss', | ||
| changeDetection: ChangeDetectionStrategy.Default |
There was a problem hiding this comment.
In Angular, ChangeDetectionStrategy.Default is the default strategy. Explicitly defining it is redundant and adds unnecessary boilerplate. It is cleaner to omit it.
styleUrl: '../common/si-chart-base.component.scss'References
- The style guide states that changeDetection: ChangeDetectionStrategy.OnPush should be set for newly added components, but existing components should not be flagged. Explicitly setting ChangeDetectionStrategy.Default on existing components is redundant and adds unnecessary boilerplate. (link)
| * SPDX-License-Identifier: MIT | ||
| */ | ||
| import { Component } from '@angular/core'; | ||
| import { ChangeDetectionStrategy, Component } from '@angular/core'; |
There was a problem hiding this comment.
| styleUrl: '../common/si-chart-base.component.scss', | ||
| changeDetection: ChangeDetectionStrategy.Default |
There was a problem hiding this comment.
In Angular, ChangeDetectionStrategy.Default is the default strategy. Explicitly defining it is redundant and adds unnecessary boilerplate. It is cleaner to omit it.
styleUrl: '../common/si-chart-base.component.scss'References
- The style guide states that changeDetection: ChangeDetectionStrategy.OnPush should be set for newly added components, but existing components should not be flagged. Explicitly setting ChangeDetectionStrategy.Default on existing components is redundant and adds unnecessary boilerplate. (link)
| * SPDX-License-Identifier: MIT | ||
| */ | ||
| import { Component, SimpleChange, viewChild } from '@angular/core'; | ||
| import { ChangeDetectionStrategy, Component, SimpleChange, viewChild } from '@angular/core'; |
There was a problem hiding this comment.
Explicitly importing ChangeDetectionStrategy is unnecessary if we are not using it. Since Default is the default strategy in Angular, we can omit it entirely.
| import { ChangeDetectionStrategy, Component, SimpleChange, viewChild } from '@angular/core'; | |
| import { Component, SimpleChange, viewChild } from '@angular/core'; |
| styleUrl: '../common/si-chart-base.component.scss', | ||
| changeDetection: ChangeDetectionStrategy.Default |
There was a problem hiding this comment.
In Angular, ChangeDetectionStrategy.Default is the default strategy. Explicitly defining it is redundant and adds unnecessary boilerplate. It is cleaner to omit it.
styleUrl: '../common/si-chart-base.component.scss'References
- The style guide states that changeDetection: ChangeDetectionStrategy.OnPush should be set for newly added components, but existing components should not be flagged. Explicitly setting ChangeDetectionStrategy.Default on existing components is redundant and adds unnecessary boilerplate. (link)
| * SPDX-License-Identifier: MIT | ||
| */ | ||
| import { Component, SimpleChange, viewChild } from '@angular/core'; | ||
| import { ChangeDetectionStrategy, Component, SimpleChange, viewChild } from '@angular/core'; |
There was a problem hiding this comment.
Explicitly importing ChangeDetectionStrategy is unnecessary if we are not using it. Since Default is the default strategy in Angular, we can omit it entirely.
| import { ChangeDetectionStrategy, Component, SimpleChange, viewChild } from '@angular/core'; | |
| import { Component, SimpleChange, viewChild } from '@angular/core'; |
| `, | ||
| changeDetection: ChangeDetectionStrategy.Default |
| * SPDX-License-Identifier: MIT | ||
| */ | ||
| import { Component, input } from '@angular/core'; | ||
| import { ChangeDetectionStrategy, Component, input } from '@angular/core'; |
There was a problem hiding this comment.
Explicitly importing ChangeDetectionStrategy is unnecessary if we are not using it. Since Default is the default strategy in Angular, we can omit it entirely.
| import { ChangeDetectionStrategy, Component, input } from '@angular/core'; | |
| import { Component, input } from '@angular/core'; |
| styleUrl: '../common/si-chart-base.component.scss', | ||
| changeDetection: ChangeDetectionStrategy.Default |
There was a problem hiding this comment.
In Angular, ChangeDetectionStrategy.Default is the default strategy. Explicitly defining it is redundant and adds unnecessary boilerplate. It is cleaner to omit it.
styleUrl: '../common/si-chart-base.component.scss'References
- The style guide states that changeDetection: ChangeDetectionStrategy.OnPush should be set for newly added components, but existing components should not be flagged. Explicitly setting ChangeDetectionStrategy.Default on existing components is redundant and adds unnecessary boilerplate. (link)
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: