Skip to content

Add test coverage to ensure signal form field states are propagated to controls #63884

Closed
leonsenft wants to merge 4 commits intoangular:mainfrom
leonsenft:signal-forms-control-props
Closed

Add test coverage to ensure signal form field states are propagated to controls #63884
leonsenft wants to merge 4 commits intoangular:mainfrom
leonsenft:signal-forms-control-props

Conversation

@leonsenft
Copy link
Copy Markdown
Contributor

@leonsenft leonsenft commented Sep 17, 2025

Adding test coverage has caught several typos/bugs. I've also updated the runtime to only propagate properties explicitly supported by the underlying control.

@leonsenft leonsenft marked this pull request as draft September 17, 2025 19:17
@angular-robot angular-robot bot added area: core Issues related to the framework runtime area: forms labels Sep 17, 2025
@ngbot ngbot bot added this to the Backlog milestone Sep 17, 2025
@leonsenft leonsenft force-pushed the signal-forms-control-props branch from ec1654f to 5e7b793 Compare September 17, 2025 20:46
@leonsenft leonsenft requested review from kirjs and mmalerba and removed request for devversion and mmalerba September 17, 2025 20:53
@leonsenft leonsenft marked this pull request as ready for review September 17, 2025 21:11
@leonsenft
Copy link
Copy Markdown
Contributor Author

@kirjs @mmalerba This PR is based on #63773, so you'll want to review by commit until it's merged to main.

@leonsenft leonsenft changed the title fix(forms): test that common field states are propagated to controls Add test coverage to ensure signal form field states are propagated to controls Sep 17, 2025
@mmalerba
Copy link
Copy Markdown
Contributor

blocked on landing prerequisite PR first

@leonsenft leonsenft force-pushed the signal-forms-control-props branch 3 times, most recently from c36b62d to 9d8c5c1 Compare October 7, 2025 21:03
Fix several typos caught by the added test cases:

* `disabled` attribute for native controls
* `readonly` property for custom controls

Note that the `name` test cases have been marked `pending()` due to
angular#63882.
Fix a bug where the min property of a form field was not correctly
propagated to custom controls. Also ensure that min and max are only
bound to native input elements that support them.
…o controls

Ensure that minLength and maxLength are only bound to native input elements that
support them.
Fix type issues revealed by implementing the expected interface.
@leonsenft leonsenft force-pushed the signal-forms-control-props branch from 9d8c5c1 to 0753bb2 Compare October 7, 2025 21:08
@leonsenft
Copy link
Copy Markdown
Contributor Author

blocked on landing prerequisite PR first

Done!

@leonsenft
Copy link
Copy Markdown
Contributor Author

google-internal-tests is passing TGP. Not sure why the check hasn't updated.

@leonsenft leonsenft added action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release labels Oct 8, 2025
@leonsenft leonsenft removed the request for review from mmalerba October 8, 2025 17:02
@AndrewKushnir
Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

AndrewKushnir pushed a commit that referenced this pull request Oct 9, 2025
…63884)

Fix a bug where the min property of a form field was not correctly
propagated to custom controls. Also ensure that min and max are only
bound to native input elements that support them.

PR Close #63884
AndrewKushnir pushed a commit that referenced this pull request Oct 9, 2025
…o controls (#63884)

Ensure that minLength and maxLength are only bound to native input elements that
support them.

PR Close #63884
AndrewKushnir pushed a commit that referenced this pull request Oct 9, 2025
…63884)

Fix type issues revealed by implementing the expected interface.

PR Close #63884
@leonsenft leonsenft deleted the signal-forms-control-props branch October 13, 2025 21:30
leonsenft added a commit to leonsenft/angular that referenced this pull request Oct 16, 2025
thePunderWoman pushed a commit that referenced this pull request Oct 17, 2025
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime area: forms forms: signals target: major This PR is targeted for the next major release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants