Skip to content

refactor(select): migrate select to signal forms#2310

Draft
spike-rabbit wants to merge 1 commit into
mainfrom
refactor/select/signal-form-control-value
Draft

refactor(select): migrate select to signal forms#2310
spike-rabbit wants to merge 1 commit into
mainfrom
refactor/select/signal-form-control-value

Conversation

@spike-rabbit

@spike-rabbit spike-rabbit commented Jul 9, 2026

Copy link
Copy Markdown
Member

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:

Code Coverage

@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 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.

Comment thread projects/element-ng/select/selection/si-select-single-value.directive.ts Outdated
@spike-rabbit spike-rabbit force-pushed the refactor/select/signal-form-control-value branch from f1ad32e to ac70683 Compare July 10, 2026 17:49
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.
@spike-rabbit spike-rabbit force-pushed the refactor/select/signal-form-control-value branch from ac70683 to 2c9db43 Compare July 10, 2026 17:51
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