Skip to content

docs(signal forms): adding new signal forms#17025

Open
kdinev wants to merge 1 commit intomasterfrom
signal-forms-demo
Open

docs(signal forms): adding new signal forms#17025
kdinev wants to merge 1 commit intomasterfrom
signal-forms-demo

Conversation

@kdinev
Copy link
Member

@kdinev kdinev commented Mar 10, 2026

Closes #

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new demo sample showcasing Angular signal-based forms integrated with Ignite UI for Angular form components, and wires it into the demo app navigation/routing.

Changes:

  • Introduces a new SignalFormsSampleComponent demo (TS/HTML/SCSS) using @angular/forms/signals with multiple Ignite UI inputs.
  • Adds a new /signal-forms route to the demo app.
  • Adds a navigation entry for “Signal Forms” in the main demo navigation list.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/app/signal-forms/signal-forms-sample.component.ts New demo component implementing a signal-form model, validation, and reset/submit handlers.
src/app/signal-forms/signal-forms-sample.component.html New demo UI showcasing multiple Ignite UI form components bound via [formField].
src/app/signal-forms/signal-forms-sample.component.scss Styling for the new signal forms demo page layout and error hints.
src/app/app.routes.ts Registers the new signal-forms route and imports the new component.
src/app/app.component.ts Adds “Signal Forms” to the navigation links list.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +20 to +25
<h3>Radio Group</h3>
<igx-radio-group name="priority">
<igx-radio value="low">Low</igx-radio>
<igx-radio value="medium">Medium</igx-radio>
<igx-radio value="high">High</igx-radio>
</igx-radio-group>
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The "Radio Group" isn’t wired to the signal form model: there is no [formField] binding for priority, so selecting a radio option won’t update model().priority (and the field won’t participate in form state). Bind the radio group to signalForm.priority (and keep the values aligned with the model’s allowed values).

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +39
priority: string;
volume: number;
movie: string;
genres: string[];
country: string;
birthDate: Date;
dateRange: DateRange;
meetingTime: Date;
calendarDate: Date;
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

SignalFormModel declares birthDate, dateRange, meetingTime, and calendarDate as non-nullable, but the component initializes/resets them to null. To keep the type contract accurate (and avoid accidental null dereferences later), update these fields to be nullable (e.g., Date | null, DateRange | null). Also consider narrowing priority from string to a union of the supported values (low/medium/high) since the UI only allows those.

Suggested change
priority: string;
volume: number;
movie: string;
genres: string[];
country: string;
birthDate: Date;
dateRange: DateRange;
meetingTime: Date;
calendarDate: Date;
priority: 'low' | 'medium' | 'high';
volume: number;
movie: string;
genres: string[];
country: string;
birthDate: Date | null;
dateRange: DateRange | null;
meetingTime: Date | null;
calendarDate: Date | null;

Copilot uses AI. Check for mistakes.
Comment on lines +112 to +126
protected onReset(): void {
this.model.set({
fullName: '',
acceptTerms: false,
enableNotifications: true,
priority: 'medium',
volume: 50,
movie: '',
genres: [],
country: '',
birthDate: null,
dateRange: null,
meetingTime: null,
calendarDate: null,
});
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

onReset() duplicates the entire initial model object literal from the model signal initialization. Consider extracting the initial state into a single constant/factory (and reuse it for both initialization and reset) to avoid future drift when fields are added/changed.

Copilot uses AI. Check for mistakes.
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.

2 participants