Add View param to Visible and Invisible events.
This may be something we keep as a branch but figured it's worth trying to upstream. In some cases we want a View during visible/invisible events, even if it's not the wrapping view, just to have some anchoring points and to get access to the hierarchy.
@vinc3m1 I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project.
Hi @vinc3m1, what sort of use cases do you have here? Giving access to a View is always dangerous (e.g. risking people adding/removing Views in a Litho controlled hierarchy).. believe me it happened. Also, unless you really know the API, I think a dev would assume the received View is the one and only that wrapped the content where you set the visibility handler.
Hi @vinc3m1. Is this PR still valid for you?
Yep, we're still maintaining this patch and using it internally
Cool! @vinc3m1, can you then provide some info about the usecase? Which Marco asked for
I believe we have some legacy APIs that take in a View to get approximate positioning information. I'm open to finding a way to make this clear that this isn't the same "view" that directly corresponds to the component.
I don't think we can directly add View here. What does approximate positioning information mean here? Is there any other information we can give off the View? Another thing we might consider is exposing the host LithoView on ComponentContext.