Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ivy): append `advance` instructions before `i18nExp` #34436

Closed

Conversation

@AndrewKushnir
Copy link
Contributor

AndrewKushnir commented Dec 16, 2019

Prior to this commit, there were no advance instructions generated before i18nExp instructions and as a result, lifecycle hooks for components used inside i18n blocks were flushed too late. This commit adds the logic to generate advance instructions in front of i18nExp ones (similar to what we have in other places like interpolations, property bindings, etc), so that the necessary lifecycle hooks are flushed before expression value is captured.

This PR resolves FW-1775.

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No
@AndrewKushnir

This comment has been minimized.

Copy link
Contributor Author

AndrewKushnir commented Dec 17, 2019

@AndrewKushnir AndrewKushnir marked this pull request as ready for review Dec 17, 2019
@AndrewKushnir AndrewKushnir requested review from angular/fw-compiler as code owners Dec 17, 2019
Copy link
Member

crisbeto left a comment

A couple of nits, but otherwise LGTM 👍 .

packages/core/test/acceptance/i18n_spec.ts Outdated Show resolved Hide resolved
packages/core/test/acceptance/i18n_spec.ts Outdated Show resolved Hide resolved
Prior to this commit, there were no `advance` instructions generated before `i18nExp` instructions and as a result, lifecycle hooks for components used inside i18n blocks were flushed too late. This commit adds the logic to generate `advance` instructions in front of `i18nExp` ones (similar to what we have in other places like interpolations, property bindings, etc), so that the necessary lifecycle hooks are flushed before expression value is captured.
@AndrewKushnir AndrewKushnir force-pushed the AndrewKushnir:FW-1775_advance_in_i18n branch from 8a4f645 to edbde2a Jan 3, 2020
@kara
kara approved these changes Jan 7, 2020
Copy link
Contributor

kara left a comment

LGTM

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor Author

AndrewKushnir commented Jan 7, 2020

alxhub added a commit that referenced this pull request Jan 7, 2020
Prior to this commit, there were no `advance` instructions generated before `i18nExp` instructions and as a result, lifecycle hooks for components used inside i18n blocks were flushed too late. This commit adds the logic to generate `advance` instructions in front of `i18nExp` ones (similar to what we have in other places like interpolations, property bindings, etc), so that the necessary lifecycle hooks are flushed before expression value is captured.

PR Close #34436
@alxhub alxhub closed this in b4c5bdb Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.