Skip to content

Follow-up cleanups for model inputs#54387

Closed
crisbeto wants to merge 6 commits intoangular:mainfrom
crisbeto:model-input-followup
Closed

Follow-up cleanups for model inputs#54387
crisbeto wants to merge 6 commits intoangular:mainfrom
crisbeto:model-input-followup

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Feb 12, 2024

Includes some cleanups around model() inputs as well as more test coverage. See the individual commits for more info.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer area: compiler Issues related to `ngc`, Angular's template compiler target: rc This PR is targeted for the next release-candidate labels Feb 12, 2024
@crisbeto crisbeto added this to the v17.2 Candidates milestone Feb 12, 2024
@crisbeto crisbeto force-pushed the model-input-followup branch from 627baa3 to 67ce676 Compare February 12, 2024 10:08
Copy link
Member Author

Choose a reason for hiding this comment

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

We could simplify it a bit by tracking the Subscription.unsubscribe here, but then we run the risk of either the this not being correct when it's invoked, or having to track the context of the function, or having to create a new instance using .bind.

@crisbeto crisbeto force-pushed the model-input-followup branch from 67ce676 to 77c8173 Compare February 12, 2024 10:31
@crisbeto crisbeto requested a review from devversion February 12, 2024 10:40
@crisbeto crisbeto marked this pull request as ready for review February 12, 2024 10:40
@pullapprove pullapprove bot requested a review from atscott February 12, 2024 10:40
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM. Thx for all the tests! I realize I also should add one for references_and_rename. All others we have

Copy link
Member

Choose a reason for hiding this comment

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

Nice! need this for output as well. Set this up as a preparation and to be able to "implement" the interface

Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api, language-service

Reworks `ModelSignal.subscribe` so it doesn't have to wrap its value to look like a subscription.
Reworks the model so that it reuses `INPUT_SIGNAL_NODE` instead of implementing its own.
Getting the typing for `ɵunwrapWritableSignal` just right was tricky so these changes add some tests to ensure that we don't regress.

Also reworks the type tester a bit to make it easier to find where to add new test files.
Sets up type checking diagnostic tests for model() inputs.
Splits up the tests for `input()` and `model()` into separate files.
Updates the language service tests to cover `model()` inputs.
@crisbeto crisbeto force-pushed the model-input-followup branch from 77c8173 to 0eac0eb Compare February 12, 2024 16:34
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

@crisbeto crisbeto removed the request for review from atscott February 12, 2024 17:55
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 12, 2024
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit 0b955b8.

AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Reworks `ModelSignal.subscribe` so it doesn't have to wrap its value to look like a subscription.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Reworks the model so that it reuses `INPUT_SIGNAL_NODE` instead of implementing its own.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Getting the typing for `ɵunwrapWritableSignal` just right was tricky so these changes add some tests to ensure that we don't regress.

Also reworks the type tester a bit to make it easier to find where to add new test files.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Sets up type checking diagnostic tests for model() inputs.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Splits up the tests for `input()` and `model()` into separate files.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Updates the language service tests to cover `model()` inputs.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Reworks the model so that it reuses `INPUT_SIGNAL_NODE` instead of implementing its own.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Getting the typing for `ɵunwrapWritableSignal` just right was tricky so these changes add some tests to ensure that we don't regress.

Also reworks the type tester a bit to make it easier to find where to add new test files.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Sets up type checking diagnostic tests for model() inputs.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Splits up the tests for `input()` and `model()` into separate files.

PR Close #54387
AndrewKushnir pushed a commit that referenced this pull request Feb 12, 2024
Updates the language service tests to cover `model()` inputs.

PR Close #54387
atscott pushed a commit to atscott/angular that referenced this pull request Feb 16, 2024
…54387)

Reworks `ModelSignal.subscribe` so it doesn't have to wrap its value to look like a subscription.

PR Close angular#54387
atscott pushed a commit to atscott/angular that referenced this pull request Feb 16, 2024
Reworks the model so that it reuses `INPUT_SIGNAL_NODE` instead of implementing its own.

PR Close angular#54387
atscott pushed a commit to atscott/angular that referenced this pull request Feb 16, 2024
Getting the typing for `ɵunwrapWritableSignal` just right was tricky so these changes add some tests to ensure that we don't regress.

Also reworks the type tester a bit to make it easier to find where to add new test files.

PR Close angular#54387
atscott pushed a commit to atscott/angular that referenced this pull request Feb 16, 2024
Sets up type checking diagnostic tests for model() inputs.

PR Close angular#54387
atscott pushed a commit to atscott/angular that referenced this pull request Feb 16, 2024
Splits up the tests for `input()` and `model()` into separate files.

PR Close angular#54387
atscott pushed a commit to atscott/angular that referenced this pull request Feb 16, 2024
Updates the language service tests to cover `model()` inputs.

PR Close angular#54387
@angular-automatic-lock-bot
Copy link

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 Mar 14, 2024
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: compiler Issues related to `ngc`, Angular's template compiler target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants