-
Notifications
You must be signed in to change notification settings - Fork 14
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
Issues with context when using different instances of our libs #15
Comments
Some directions we could take this:
These are just some pretty random ideas... Nothing is tested and everything is fully hypothetical... |
FYI: I see we also have a |
See this PR for an illustration of the problem #16, specifically the https://localhost:5000/?path=/story/component-widget-layer--it-falls-apart story... |
This is a problem with anything that uses hooks really, and the consumers need to make sure that UI resolves to a single instance inside of |
Update: @amcgee and @martinkrulltott are looking into a way of solving this in the app. If they are successful, we should provide instructions on how to prevent this problem in the docs. |
Confirmed that the issue in DV was because it was using multiple versions of |
@martinkrulltott encountered an issue where the Select rendered below the Modal. We have encountered this issue before and thought we had solved it by using context (
React.createContext()
). However, there seems to be a case where this falls apart:data-visualizer-app
is dependent on theanalytics
packageMartin provided a screen recording on Slack that demoes the issue very well. You can see in the screen-recording that the Select which is coming from the same ui-core instance as the Modal (both data-viz) is working fine and is on top of the Modal (Select gets z-index 3001), but the one coming from analytics is misbehaving and gets rendered below the Modal (it just used a z-index of 2000)....
I didn't get a chance to debug this properly, but going by what we are seeing in the screen-recording, I can't really think of another explanation. This isn't necessarily an urgent issue, but it does seem to be quite a fundamental one... I don't really know how to tackle it.
And this issue is relevant to the components I am working on at the moment, see #10
The text was updated successfully, but these errors were encountered: