Skip to content

refactor(navbar-vertical): explicitly define change detection strategy#2201

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

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

Conversation

@spliffone

@spliffone spliffone commented Jun 22, 2026

Copy link
Copy Markdown
Member

@spliffone spliffone requested review from a team as code owners June 22, 2026 06:20

@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 updates several vertical and primary navbar components, along with their test host components, to use ChangeDetectionStrategy.OnPush to improve performance. The feedback suggests applying ChangeDetectionStrategy.OnPush to SiNavbarItemComponent as well, rather than explicitly setting it to Default, to maintain consistency with the rest of the changes.

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.

SiIconComponent
],
templateUrl: './si-navbar-item.component.html',
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

Consider using ChangeDetectionStrategy.OnPush instead of ChangeDetectionStrategy.Default for SiNavbarItemComponent to align with the project's performance standards and other components in this PR.

Since SiNavbarItemComponent uses signal-based inputs (item, quickAction) and signal queries, it is well-suited for OnPush. If there are any legacy non-signal properties or mutable objects being passed, you can inject ChangeDetectorRef and call markForCheck() where appropriate (e.g., inside ngDoCheck()).

Suggested change
changeDetection: ChangeDetectionStrategy.Default,
changeDetection: ChangeDetectionStrategy.OnPush,
References
  1. Set changeDetection: ChangeDetectionStrategy.OnPush in @component decorator. (link)

@spliffone spliffone force-pushed the refactor/navbar-vertical-explicit-change-detection-strategy branch from 08201f2 to 84cf601 Compare June 22, 2026 06:53
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