Skip to content

refactor(date-range-filter): reduce change detections to update values#1686

Open
spliffone wants to merge 1 commit intomainfrom
refactor/relative-date-drop-ngmodel
Open

refactor(date-range-filter): reduce change detections to update values#1686
spliffone wants to merge 1 commit intomainfrom
refactor/relative-date-drop-ngmodel

Conversation

@spliffone
Copy link
Member

@spliffone spliffone commented Mar 19, 2026

ngModel require an extra cycle to propagate changes which requires extra ticks or setTimeouts in the test cases, this isn't necessary when we directly use the value + changes.


Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

@spliffone spliffone requested review from a team as code owners March 19, 2026 18:21
Copy link
Contributor

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

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 refactors the si-relative-date component and its tests to reduce change detection cycles by moving away from FormsModule and using fixture.detectChanges() instead of await fixture.whenStable() in tests. The changes are generally good, but I found a couple of issues in the tests. There is a focused test suite (fdescribe) that needs to be removed, and one of the tests is missing necessary detectChanges calls which could make it flaky. Please see my comments for details.

@spliffone spliffone force-pushed the refactor/relative-date-drop-ngmodel branch 3 times, most recently from d8c953b to 0ebeda9 Compare March 20, 2026 06:44
Copy link
Member

@spike-rabbit spike-rabbit left a comment

Choose a reason for hiding this comment

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

@dr-itz can you please have a look here as well.

@spliffone spliffone force-pushed the refactor/relative-date-drop-ngmodel branch from 0ebeda9 to e7a00f3 Compare March 20, 2026 07:05
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.

2 participants