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

Bind window access if window is defined; add addons channel access too #3243

Merged
merged 1 commit into from
Mar 20, 2018

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Mar 20, 2018

So __STORYBOOK_CLIENT_API__ can be used to get access to the store more directly, especially in
a) contexts without a channel (i.e. JSDOM)
b) places where you want to directly use the render function for the story.

OTOH __STORYBOOK_ADDONS_CHANNEL__ is useful to drive storybook directly via the API that addons use.

Uggh, I would really like to refactor this little snippet of code out into @storybook/core also. I forget why I didn't do it before but I think it was the fact that we were late in the release cycle...

@codecov
Copy link

codecov bot commented Mar 20, 2018

Codecov Report

Merging #3243 into master will decrease coverage by 0.15%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3243      +/-   ##
=========================================
- Coverage   36.06%   35.9%   -0.16%     
=========================================
  Files         437     437              
  Lines        9486    9485       -1     
  Branches     1073     912     -161     
=========================================
- Hits         3421    3406      -15     
- Misses       5389    5500     +111     
+ Partials      676     579      -97
Impacted Files Coverage Δ
app/vue/src/client/preview/index.js 0% <0%> (ø) ⬆️
app/angular/src/client/preview/index.js 0% <0%> (ø) ⬆️
app/react/src/client/preview/index.js 0% <0%> (ø) ⬆️
app/polymer/src/client/preview/index.js 0% <0%> (ø) ⬆️
app/react/src/server/utils.js 0% <0%> (-83.34%) ⬇️
lib/core/src/server/build-dev.js 0% <0%> (ø) ⬆️
addons/a11y/src/components/Report/Elements.js 0% <0%> (ø) ⬆️
addons/a11y/src/components/Report/Rules.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/api/index.js 0% <0%> (ø) ⬆️
lib/core/src/client/preview/reducer.js 37.5% <0%> (ø) ⬆️
... and 72 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d5d1be...7324d17. Read the comment docs.

@Hypnosphi Hypnosphi merged commit c3d9a41 into master Mar 20, 2018
@Hypnosphi Hypnosphi deleted the tmeasday/improve-attachment-to-window branch March 20, 2018 10:54
@Hypnosphi Hypnosphi added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Mar 29, 2018
Hypnosphi added a commit that referenced this pull request Mar 30, 2018
…to-window

Bind window access if `window` is defined; add `addons channel` access too
@Hypnosphi Hypnosphi added the patch:done Patch/release PRs already cherry-picked to main/release branch label Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: stories feature request patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants