Skip to content

Conversation

@crisbeto
Copy link
Member

Includes the following changes that integrate the new @let syntax into the runtime.

refactor(core): integrate let instructions into the runtime

Adds the implementation of the following new instructions:

  • declareLet - creation-time instruction that initializes the slot for a let declaration.
  • storeLet - update-time instruction that stores the current value of a let declaration.
  • readContextLet - instruction that reads the stored value of a let declaration from a different view.

On top of the instructions, it also introduces a new LetDeclaration TNode type. The new TNode is nececessary for DI to work correctly in pipes inside the let expression, as well as for proper hydration support.

refactor(core): support let declarations during hydration

Updates the hydration logic to account for the fact that let declarations don't create a DOM node.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release labels Jun 20, 2024
@crisbeto crisbeto requested a review from AndrewKushnir June 20, 2024 16:59
@ngbot ngbot bot added this to the Backlog milestone Jun 20, 2024
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.

@crisbeto looks great, just left a few minor comments.

crisbeto added 2 commits June 21, 2024 09:58
Adds the implementation of the following new instructions:
* `declareLet` - creation-time instruction that initializes the slot for a let declaration.
* `storeLet` - update-time instruction that stores the current value of a let declaration.
* `readContextLet` - instruction that reads the stored value of a let declaration from a different view.

On top of the instructions, it also introduces a new `LetDeclaration` TNode type.
The new TNode is nececessary for DI to work correctly in pipes inside the let expression,
as well as for proper hydration support.
Updates the hydration logic to account for the fact that let declarations don't create a DOM node.
@crisbeto
Copy link
Member Author

Thank you for the feedback @AndrewKushnir, it has been addressed.

@crisbeto crisbeto changed the title Implement @let into the runtime Integrate @let into the runtime Jun 21, 2024
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.

@crisbeto looks great, thanks! 👍

@pullapprove pullapprove bot requested review from alxhub, atscott and dylhunn June 21, 2024 23:20
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
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewed-for: public-api
Reviewed-for: fw-core

@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 Jun 24, 2024
@dylhunn
Copy link
Contributor

dylhunn commented Jun 26, 2024

This PR was merged into the repository by commit 7dfe302.

The changes were merged into the following branches: main, 18.0.x

dylhunn pushed a commit that referenced this pull request Jun 26, 2024
Adds the implementation of the following new instructions:
* `declareLet` - creation-time instruction that initializes the slot for a let declaration.
* `storeLet` - update-time instruction that stores the current value of a let declaration.
* `readContextLet` - instruction that reads the stored value of a let declaration from a different view.

On top of the instructions, it also introduces a new `LetDeclaration` TNode type.
The new TNode is nececessary for DI to work correctly in pipes inside the let expression,
as well as for proper hydration support.

PR Close #56527
dylhunn pushed a commit that referenced this pull request Jun 26, 2024
Updates the hydration logic to account for the fact that let declarations don't create a DOM node.

PR Close #56527
@dylhunn dylhunn closed this in bbe39c1 Jun 26, 2024
dylhunn pushed a commit that referenced this pull request Jun 26, 2024
Updates the hydration logic to account for the fact that let declarations don't create a DOM node.

PR Close #56527
@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 Jul 27, 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: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants