refactor(select): migrate select to signal forms#2310
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the select component's selection strategies to use Angular's new signal-based form controls (FormValueControl and ModelSignal) instead of the traditional ControlValueAccessor. It also updates related components, tests, and examples to support nullable types and the new signal APIs. The review feedback highlights a style guide violation where effect() is used to propagate state changes in SiSelectSelectionStrategy, which should be refactored to use computed(). Additionally, a misleading JSDoc comment regarding the default value in SiSelectSingleValueDirective needs to be corrected.
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.
f1ad32e to
ac70683
Compare
Use signal form controls for select and align the value model with the new API. BREAKING CHANGE: drop NG_VALUE_ACCESSOR from select. Changed select to use Angular signal form models instead of ControlValueAccessor. Update consumers to bind through signal form APIs. BREAKING CHANGE: single-value select now includes undefined. Changed the single-value select model to represent an unselected state explicitly. Update code that assumed the value was always defined. BREAKING CHANGE: multi-value select no longer accepts undefined. Changed the multi-value select model to always use an array. Initialize callers with [] instead of undefined and remove undefined handling from related code.
ac70683 to
2c9db43
Compare
Summary\nUse signal form controls for select and align the value model with the new API.\n\n## Breaking changes\n- Drop NG_VALUE_ACCESSOR from select.\n- Single-value select now includes undefined.\n- Multi-value select no longer accepts undefined.\n\n## Notes\n- The select-specific signal form migration required small follow-up adjustments in nearby consumers and examples.\n- The test suite was updated to reflect the new select behavior.\n\n
Checklist\n- [x] Relevant tests updated\n- [x] Breaking changes documented
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: