docs(animations): add section about animations and view encapsulation#46738
Closed
dario-piotrowicz wants to merge 1 commit intoangular:mainfrom
Closed
docs(animations): add section about animations and view encapsulation#46738dario-piotrowicz wants to merge 1 commit intoangular:mainfrom
dario-piotrowicz wants to merge 1 commit intoangular:mainfrom
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.
14 tasks
dario-piotrowicz
added a commit
to dario-piotrowicz/angular
that referenced
this pull request
Jul 7, 2022
…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)
Closed
14 tasks
dario-piotrowicz
commented
Jul 7, 2022
|
|
||
| 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. |
Contributor
Author
There was a problem hiding this comment.
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)
jessicajaniuk
approved these changes
Jul 7, 2022
Contributor
jessicajaniuk
left a comment
There was a problem hiding this comment.
reviewed-for: fw-animations
alxhub
pushed a commit
that referenced
this pull request
Jul 7, 2022
alxhub
pushed a commit
that referenced
this pull request
Jul 7, 2022
Member
|
This PR was merged into the repository by commit 350e364. |
alxhub
pushed a commit
that referenced
this pull request
Jul 7, 2022
…#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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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