Skip to content

feat(form-control): support igc-color-picker in CVA - #17587

Merged
ChronosSF merged 3 commits into
masterfrom
simeonoff/color-picker
Sep 8, 2026
Merged

feat(form-control): support igc-color-picker in CVA#17587
ChronosSF merged 3 commits into
masterfrom
simeonoff/color-picker

Conversation

@simeonoff

Copy link
Copy Markdown
Member

Description

Adds igc-color-picker support to IgcFormControlDirective, so the web component can be used with Angular ngModel and formControlName in the same way igc-rating already is. Adds unit test coverage for the ControlValueAccessor implementation, ngModel two-way binding, and reactive forms usage (initial value write, igcChange propagation, blur/touched state, and disabled state) for igc-color-picker.

Motivation / Context

igc-color-picker did not implement ControlValueAccessor, so it could not be bound with ngModel/formControlName out of the box. Extending the existing IgcFormControlDirective selector to match igc-color-picker[ngModel] and igc-color-picker[formControlName] enables standard Angular forms integration without introducing a new directive.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

IgcFormControlDirective (igc-color-picker form integration)

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • Angular version: 22.2.0
  • Browser(s): Chrome Headless
  • OS: macOS

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Copilot AI 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.

🟢 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 IgcFormControlDirective to match igc-color-picker[ngModel] and igc-color-picker[formControlName].
  • Add unit tests validating CVA behavior, ngModel two-way binding, and reactive forms integration for igc-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.

@ChronosSF

Copy link
Copy Markdown
Member

Could be worth adding to the Changelog?

simeonoff and others added 2 commits September 8, 2026 17:36
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@simeonoff

Copy link
Copy Markdown
Member Author

Could be worth adding to the Changelog?

Done.

@ChronosSF
ChronosSF merged commit b8c464a into master Sep 8, 2026
6 checks passed
@ChronosSF
ChronosSF deleted the simeonoff/color-picker branch September 8, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants