feat(form-control): support igc-color-picker in CVA - #17587
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped (selector extension) and is backed by targeted unit tests for both template-driven and reactive forms usage.
Pull request overview
Adds Angular forms (CVA) integration for the igc-color-picker web component by extending the existing IgcFormControlDirective selector, aligning its usage with the already-supported igc-rating. The PR also adds unit tests covering template-driven and reactive forms scenarios for the new component support.
Changes:
- Extend
IgcFormControlDirectiveto matchigc-color-picker[ngModel]andigc-color-picker[formControlName]. - Add unit tests validating CVA behavior,
ngModeltwo-way binding, and reactive forms integration forigc-color-picker.
File summaries
| File | Description |
|---|---|
| projects/igniteui-angular/directives/src/directives/form-control/form-control.directive.ts | Extends the directive selector to include igc-color-picker for Angular forms usage. |
| projects/igniteui-angular/directives/src/directives/form-control/form-control.directive.spec.ts | Adds coverage for igc-color-picker across CVA unit tests, ngModel, and reactive forms. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Member
|
Could be worth adding to the Changelog? |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Member
Author
Done. |
ChronosSF
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
igc-color-pickersupport toIgcFormControlDirective, so the web component can be used with AngularngModelandformControlNamein the same wayigc-ratingalready is. Adds unit test coverage for theControlValueAccessorimplementation,ngModeltwo-way binding, and reactive forms usage (initial value write,igcChangepropagation,blur/touched state, and disabled state) forigc-color-picker.Motivation / Context
igc-color-pickerdid not implementControlValueAccessor, so it could not be bound withngModel/formControlNameout of the box. Extending the existingIgcFormControlDirectiveselector to matchigc-color-picker[ngModel]andigc-color-picker[formControlName]enables standard Angular forms integration without introducing a new directive.Type of Change (check all that apply):
Component(s) / Area(s) Affected:
IgcFormControlDirective(igc-color-pickerform integration)How Has This Been Tested?
Test Configuration:
Screenshots / Recordings
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)