-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Addon-backgrounds: set background on iframe instead of adding a wrapper in preview #2807
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2807 +/- ##
=========================================
- Coverage 37.37% 35.8% -1.57%
=========================================
Files 426 428 +2
Lines 9151 9422 +271
Branches 870 965 +95
=========================================
- Hits 3420 3374 -46
- Misses 5184 5410 +226
- Partials 547 638 +91
Continue to review full report at Codecov.
|
@Hypnosphi We can actually improve this addon a lot. We can set the iframe background to be transparent, and set the background in the manager. What do you think? |
@ndelangen Sorry, missed your comment. Yeah, that sounds like a good idea, will try. |
@ndelangen wouls your idea mean an API change? Currently the addon is used as decorator, which implies that it adds something to preview not manager UPD: nevermind, I can just render the story as is |
Another problem is, addons can't currently add things anywhere in manager outside of the addons panel. Should we allow them? |
@Hypnosphi the viewport addon seems to be able to just fine? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I wonder if these changes are considered backward compatible. For example for people that use both, storyshots and background addons.
Do you mean that people will need to update their snapshots? To me personally it seems OK. Plus we're actually removing noise from storyshots: https://github.com/storybooks/storybook/pull/2807/files#diff-261e00eb9848ef08cfb37eb5e7e0b012 |
Yeah, that what I meant. Maybe it worth adding some note about it, Just to reduce confusion... I don't know where though |
I'm pretty sure we're introducing changes that can affect existing snapshots all the time |
It fixes second part of #2655
This change is