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

Iframe support #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

oneforwonder
Copy link

This PR adds the ability to inject Pesticide styles into iframes.

My particular motivation for this to allow Pesticide to work with the React component development environment Storybook that uses iframes to contain components. You can test this PR with any public Storybook site like this one.

Along the way, I moved the injection script from a line-by-line-concatenated string into a separate JS file where it can have proper indentation, syntax highlighting, etc. I believe this is much more maintainable, especially with the (slightly) increased complexity added by this PR.

@knd775
Copy link

knd775 commented Jul 19, 2019

It's unfortunate that this project was abandoned. This is an important PR.

@paulmolluzzo
Copy link
Contributor

Nearly 2 years later but I have an update. 😅 This is a huge improvement to the tool! Many thanks to @oneforwonder for the contribution and patience! I use Storybook on a daily basis myself, and I'm sure this change will help a ton of people. 👏 👏 👏

I am not a direct contributor on this repo, so I can't approve or merge this PR. However, I am the owner of the Chrome extension, so I can make those releases. I pulled the changes in this PR down locally, built a new version, and submitted it for publishing as version 1.2. I also had to fill out some info about the permissions this extension needs for activeTab, and I'm not sure what the requirements are to get approval, so 🤞.

Assuming this update passes, v1.2 will have iframe support. I tested this by going to the storybook website and using the extension there. Attached is a screenshot.

I am very sorry for neglecting this PR for so long. I've really fallen behind on my OSS projects. 😞 I hope this gets approved soon and is worth the wait.

works-in-iframes

@paulmolluzzo
Copy link
Contributor

It’s been published! v1.2 is out and available now.

@oneforwonder
Copy link
Author

Nice! Thanks.

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

Successfully merging this pull request may close these issues.

3 participants