Skip to content
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

Add View param to Visible and Invisible events. #438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vinc3m1
Copy link
Contributor

@vinc3m1 vinc3m1 commented Oct 2, 2018

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.

@facebook-github-bot
Copy link
Contributor

@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.

@marco-cova
Copy link
Contributor

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.

@colriot
Copy link
Contributor

colriot commented Jun 20, 2019

Hi @vinc3m1. Is this PR still valid for you?

@vinc3m1
Copy link
Contributor Author

vinc3m1 commented Jun 20, 2019

Yep, we're still maintaining this patch and using it internally

@colriot
Copy link
Contributor

colriot commented Jun 21, 2019

Cool! @vinc3m1, can you then provide some info about the usecase? Which Marco asked for

@vinc3m1
Copy link
Contributor Author

vinc3m1 commented Jul 9, 2019

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.

@astreet
Copy link
Contributor

astreet commented Jul 10, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants