docs(core): improve viewEncapsulation documentation#44151
docs(core): improve viewEncapsulation documentation#44151dario-piotrowicz wants to merge 3 commits into
Conversation
|
@dario-piotrowicz thanks for creating this PR 👍 |
There was a problem hiding this comment.
I've removed the example as it didn't seem beneficial to me as:
- after my changes the introductory text above already makes clear how to apply the strategy so I don't really think actually showing it adds much here
- in the same docs page (below) there are various examples showing the application of the encapsulation strategy, so this example again didn't seem to add much to me
There was a problem hiding this comment.
this was already mentioned above so I don't think there is a need to emphasise it
There was a problem hiding this comment.
I changed "The support is still limited" to "Not all browsers support it" because as you can see in the caniuse link the support is actually pretty good I think
c902a56 to
00e3081
Compare
There was a problem hiding this comment.
I've removed this because as mentioned in this comment I feel like it is an unnecessary example
There was a problem hiding this comment.
maybe it should be is-helpful? 🤷♂️
There was a problem hiding this comment.
Don't all browsers that we officially support have ShadowDOM support now?
There was a problem hiding this comment.
I think the real reason we are still defaulting to emulated is that is makes it hard to pierce theming into the components because there is not a well lit path for how to do this with ShadowDOM. I think @jelbourn has more context here.
There was a problem hiding this comment.
yes I wrote something similar in my comment below, happy to change this to whatever is preferred 🙂
There was a problem hiding this comment.
I think this is fine unless @jelbourn (or anyone else has a view).
496cbbe to
fdc735e
Compare
|
@dario-piotrowicz - while I review this PR can you fix up the commit message slightly? Add some sentence casing and fix a typo: |
|
You can preview c902a56 at https://pr44151-c902a56.ngbuilds.io/. |
Slighlty improve the `viewEncapsulation` documentation (both in code comments and content files) to make it more clear and understandable. See angular#44099 (comment)
fdc735e to
f5c611c
Compare
|
You can preview f5c611c at https://pr44151-f5c611c.ngbuilds.io/. |
petebacondarwin
left a comment
There was a problem hiding this comment.
Thanks for working on this @dario-piotrowicz - definitely an improvement. I made a bunch of suggestions - mostly just stylistic.
There was a problem hiding this comment.
I think the docs team prefer to keep an imperative feel to the docs. So probably it would be best to revert this change:
| The available options are: | |
| Choose from the following modes: |
There was a problem hiding this comment.
ok 🙂 👍
but my issue here was especially that before mode made more sense as we had ShadowDom, Emulated and None, to which "mode" was more appropriate, but now we have ViewEncapsulation.ShadowDom, ViewEncapsulation.Emulated and ViewEncapsulation.None, which are actual specific value of the ViewEncapsulation enum, so I just wanted to rephrase it to indicate such.
What do you think? should I revert also the names to the old version?
|
@petebacondarwin thanks a lot for the awesome reviewing 🙂 , sorry I made you comment that much 😓 I replied to most of you comments, I've asked follow up questions to a few, please have another look when you have the chance 🙂 |
|
You can preview 8308abe at https://pr44151-8308abe.ngbuilds.io/. |
8308abe to
7599409
Compare
|
You can preview 7599409 at https://pr44151-7599409.ngbuilds.io/. |
petebacondarwin
left a comment
There was a problem hiding this comment.
Thanks for the updates @dario-piotrowicz - LGTM!!
There was a problem hiding this comment.
I think this is fine unless @jelbourn (or anyone else has a view).
|
You can preview 94a6c10 at https://pr44151-94a6c10.ngbuilds.io/. |
atscott
left a comment
There was a problem hiding this comment.
LGTM though my knowledge in this area is limited.
|
FYI, marking this PR as ready for merge, since we have all the necessary approvals. Note to the Caretaker: the CI job failure is unrelated, so we can proceed with the merge. |
|
This PR was merged into the repository by commit 6ae3858. |
Slighlty improve the `viewEncapsulation` documentation (both in code comments and content files) to make it more clear and understandable. See #44099 (comment) PR Close #44151
|
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. |


Slighlty improve the
viewEncapsulationdocumentation (both in codecomments and content files) to make it more clear and understandable.
See #44099 (comment)
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?
Does this PR introduce a breaking change?
Other information
@AndrewKushnir as promised 🙂