Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Bugfix: Correctly calculate Overlay position when inspecting a node within iframe(s) #552

Merged

Conversation

suchipi
Copy link
Contributor

@suchipi suchipi commented Feb 18, 2017

This fixes #443.

I didn't see any (automated) tests in the repo, so I have not added any. Should I have?

I created a test app with some nested iframes that can be used with the plain shell. To use it, build test/nested-frames using webpack and add data-app-src="../../test/nested-frames/build/target.js" to the plain shell's target iframe.

I have only tested this with the plain shell; I'm not sure how to test it as an extension.

I created some types for Document and Window. They only have the properties I cared about for this diff on them right now, but could be fleshed out eventually if desired. There might also be a better set of type definitions for the DOM API out there somewhere that could be used instead.

@@ -0,0 +1,59 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this example to the kitchensink instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure... do you meantest/example/sink.js?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easier to have them all in one place rather than create a new test for every case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that makes sense. I'll move it over there this evening

@suchipi suchipi force-pushed the bugfix_overlay_position_within_nested_iframes branch from 4b541be to 2ff3105 Compare February 22, 2017 02:21
@suchipi
Copy link
Contributor Author

suchipi commented Feb 22, 2017

Moved the example to sink and rebased on master. Not sure if the build output for sink should be committed, so I left that out.

@gaearon
Copy link
Contributor

gaearon commented Feb 24, 2017

I did some testing, and it seems to work. Going to trust you on this one 😅 .

@gaearon gaearon merged commit 08dbe05 into facebook:master Feb 24, 2017
@suchipi
Copy link
Contributor Author

suchipi commented Feb 24, 2017

Feel free to pull me back in if it breaks in the future 😉

Thanks!

@rchanou
Copy link

rchanou commented Mar 2, 2017

When can we expect to see this version released to the chrome store? I imagine a lot of people using react-storybook want this.

@gaearon
Copy link
Contributor

gaearon commented Mar 2, 2017

Can you ping me about it again next week?

@rchanou
Copy link

rchanou commented Mar 2, 2017

Will do!

@rchanou
Copy link

rchanou commented Mar 12, 2017

@gaearon Pinging as promised!

@gaearon
Copy link
Contributor

gaearon commented Mar 12, 2017

Thanks! I'm waiting for a few more changes in other PRs so I can all of this together.

@suchipi
Copy link
Contributor Author

suchipi commented Mar 23, 2017

@gaearon Any updates?

@gaearon
Copy link
Contributor

gaearon commented Mar 23, 2017

Not currently. I remember about releasing the DevTools. Right now it's secondary to our sprint to get React built with Rollup. This is a giant change internally, and we're very focused on it, but it won't take more than about a week more of my time. Then I'll be able to look at this again and cut a release.

@suchipi
Copy link
Contributor Author

suchipi commented Mar 23, 2017

Okay. Thanks for the info!

@suchipi
Copy link
Contributor Author

suchipi commented Apr 6, 2017

Looks like rollup work is done (facebook/react#9327); any chance this could be released?

@gaearon
Copy link
Contributor

gaearon commented Apr 6, 2017

Rollup work also involves updating our internal FB scripts to build Rollup bundle, releasing an alpha for RN, and then updating React Native to remove internal dependencies and then use the flat bundle. I’m sorry it’s taking time, but I don’t want to leave it unfinished.

@suchipi
Copy link
Contributor Author

suchipi commented Apr 6, 2017

Is there anything the community can do to help get this released sooner? As @rchanou indicated, this bugfix is significant for react storybook users (like myself).

@gaearon
Copy link
Contributor

gaearon commented Apr 6, 2017

Would you like to help with reviewing and merging pending PRs that are (close to) approved?

@suchipi
Copy link
Contributor Author

suchipi commented Apr 6, 2017

Sure; I should have some time to do that this Saturday.

@gaearon
Copy link
Contributor

gaearon commented Apr 10, 2017

@suchipi Apologies for late reply, took a while to approve the request in our internal systems 😞 You should have commit access now so please feel free to review and merge PRs you think are stable. I suggest starting with #459, #541, and #569. Please make sure to test changes extensively.

@suchipi
Copy link
Contributor Author

suchipi commented Apr 10, 2017

Thanks @gaearon. I will probably not have time to look at these until the upcoming weekend, but I took a look at a few other PRs in the meantime yesterday.

@gaearon
Copy link
Contributor

gaearon commented Apr 10, 2017

Thanks!

@suchipi
Copy link
Contributor Author

suchipi commented Apr 20, 2017

Sorry I didn't look at those PRs last weekend @gaearon. Hopefully I will have some time this weekend

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

Successfully merging this pull request may close these issues.

Inspected elements within iframes are highlighted incorrectly
4 participants