Skip to content

refactor(charts): explicitly define change detection strategy#2187

Open
spliffone wants to merge 1 commit into
mainfrom
refactor/charts-explicit-change-detection-strategy
Open

refactor(charts): explicitly define change detection strategy#2187
spliffone wants to merge 1 commit into
mainfrom
refactor/charts-explicit-change-detection-strategy

Conversation

@spliffone

@spliffone spliffone commented Jun 19, 2026

Copy link
Copy Markdown
Member

@spliffone spliffone requested review from a team as code owners June 19, 2026 08:31

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Explicitly importing ChangeDetectionStrategy is unnecessary if we are not using it. Since Default is the default strategy in Angular, we can omit it entirely.

Suggested change
import { ChangeDetectionStrategy, Component, input, OnChanges, SimpleChanges } from '@angular/core';
import { Component, input, OnChanges, SimpleChanges } from '@angular/core';

Comment on lines +69 to +70
styleUrl: '../common/si-chart-base.component.scss',
changeDetection: ChangeDetectionStrategy.Default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. 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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Explicitly importing ChangeDetectionStrategy is unnecessary if we are not using it. Since Default is the default strategy in Angular, we can omit it entirely.

Suggested change
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { Component } from '@angular/core';

Comment on lines +69 to +70
styleUrl: '../common/si-chart-base.component.scss',
changeDetection: ChangeDetectionStrategy.Default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. 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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Explicitly importing ChangeDetectionStrategy is unnecessary if we are not using it. Since Default is the default strategy in Angular, we can omit it entirely.

Suggested change
import { ChangeDetectionStrategy, Component, SimpleChange, viewChild } from '@angular/core';
import { Component, SimpleChange, viewChild } from '@angular/core';

Comment on lines +17 to +18
styleUrl: '../common/si-chart-base.component.scss',
changeDetection: ChangeDetectionStrategy.Default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. 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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Explicitly importing ChangeDetectionStrategy is unnecessary if we are not using it. Since Default is the default strategy in Angular, we can omit it entirely.

Suggested change
import { ChangeDetectionStrategy, Component, SimpleChange, viewChild } from '@angular/core';
import { Component, SimpleChange, viewChild } from '@angular/core';

Comment on lines +20 to +21
`,
changeDetection: ChangeDetectionStrategy.Default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In Angular, ChangeDetectionStrategy.Default is the default strategy. Explicitly defining it is redundant and adds unnecessary boilerplate. It is cleaner to omit it.

  `

* SPDX-License-Identifier: MIT
*/
import { Component, input } from '@angular/core';
import { ChangeDetectionStrategy, Component, input } from '@angular/core';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Explicitly importing ChangeDetectionStrategy is unnecessary if we are not using it. Since Default is the default strategy in Angular, we can omit it entirely.

Suggested change
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
import { Component, input } from '@angular/core';

Comment on lines +17 to +18
styleUrl: '../common/si-chart-base.component.scss',
changeDetection: ChangeDetectionStrategy.Default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant