Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Presubmit |
|
This is related to the Ivy breaking change "Change Detection Follows Insertion Tree, Not Declaration Tree". In order to update the template at the insertion tree correct, the view ref needs to mark the embedded view as dirty instead of the declaration view. This allows users to use directives that inject |
There was a problem hiding this comment.
I think that the _componentLView as a name is misleading here. Let's look at 3 usage scenarios we've got:
ChangeDetectorRef- in this particular case_componentLViewmakes sense;ViewRefcreated for a dynamic component -_componentLViewstill makes sense;ViewRefcreated for an embedded view -_componentLViewis misleading here.
How about we leave it as _lView and change the other view from _requestingLView to something clearly indicating that we are dealing with the ChangeDetectorRef case here? Maybe _cdRefInjectingView?
There was a problem hiding this comment.
Yea, I like this option along with making _cdRefInjectingView optional. The only thing I was hesitant about for making it just _lView again was that it again wasn't describing the different types of LView it could be. I added doc comments for the 3 usage scenarios you listed so I feel better about this now.
pkozlowski-opensource
left a comment
There was a problem hiding this comment.
@atscott ok, I think I've got a much better understanding of the problem right now. There are great moves in this PR (thnx so much for cleaning up ViewRef constructor and removing context and component index fields!).
Still I've left 2 comments regarding names and the (optional) second argument. I believe that we can have a slightly smaller / clearer fix, sth along the lines of pkozlowski-opensource@1817d47
WDYF?
749781a to
6bd87c8
Compare
kara
left a comment
There was a problem hiding this comment.
LGTM. We can refactor ViewRef more in a follow-up PR.
|
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. |
No description provided.