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
docs(animations): add section about animations and view encapsulation #46738
docs(animations): add section about animations and view encapsulation #46738
Conversation
Add a section regarding component view encapsulations in the complex animation sequences guide to let developers know how animations work in regard to view encapsulations. This section is used to both add information to the guide but also to take a stand on how the animations should behave in regard to the shadow dom view encapsulation. This relates to PR angular#46488 which by trying to make sure the query function works with shadow dom elements proved that having the animations implementation work with shadow dom would increase the complexity of the code and would have a negative impact on performance, such facts alongide the small adoption of shadow dom by users influenced the decision to keep the current functionalities and simply discourage the use of animations and shadow dom components.
…rent does (angular#46459)" This reverts commit b417370. The change applied is no longer appropriate since the use of animations and shadow dom components is discouraged (as of angular#46738)
|
||
Angular animations are based on the components DOM structure and do not directly take [View Encapsulation](/guide/view-encapsulation) into account, this means that components using `ViewEncapsulation.Emulated` behave exactly as if they where using `ViewEncapsulation.None` (`ViewEncapsulation.ShadowDom` behaves differently as we'll discuss shortly). | ||
|
||
For example if the `query()` function (which you'll see more of in the rest of the Animations guide) were to be applied at the top of a tree of components using the emulated view encapsulation, such query would be able to identify (and thus animate) DOM elements on any depth of the tree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
query should probably be a link but it isn't, I kept it as is since it is not a link in the whole guide as well, this may be something to fix later in general
(there are many links in the animations guide which seem broken, it could be worth fixing them all in one PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: fw-animations
This PR was merged into the repository by commit 350e364. |
…#46738) Add a section regarding component view encapsulations in the complex animation sequences guide to let developers know how animations work in regard to view encapsulations. This section is used to both add information to the guide but also to take a stand on how the animations should behave in regard to the shadow dom view encapsulation. This relates to PR #46488 which by trying to make sure the query function works with shadow dom elements proved that having the animations implementation work with shadow dom would increase the complexity of the code and would have a negative impact on performance, such facts alongide the small adoption of shadow dom by users influenced the decision to keep the current functionalities and simply discourage the use of animations and shadow dom components. PR Close #46738
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Add a section regarding component view encapsulations in the complex animation
sequences guide to let developers know how animations work in regard to
view encapsulations.
This section is used to both add information to the guide but also to
take a stand on how the animations should behave in regard to the
shadow dom view encapsulation.
This relates to PR #46488 which by trying to make sure the query
function works with shadow dom elements proved that having the
animations implementation work with shadow dom would increase the
complexity of the code and would have a negative impact on performance,
such facts alongide the small adoption of shadow dom by users influenced
the decision to keep the current functionalities and simply discourage
the use of animations and shadow dom components.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
New section added to the Complex Sequences guide:
Does this PR introduce a breaking change?
Other information