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

Fix storybook-build manager-head.html bug #1248

Merged
merged 3 commits into from
Jun 10, 2017
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Jun 10, 2017

Issue: #1239

What I did

  • rename getHeadHtml to getPreviewHeadHtml to make it more explicit
  • make sure that we are calling getManagerHeadHtml in both dev and build modes
  • chmod +x build.js

How to test

No preview/manager head case:

yarn bootstrap
cd examples/cra-storybook
yarn storybook
yarn build-storybook
cd storybook-public
serve
open http://localhost:5000

Verify that there is no undefined across the top of the screen

Preview/manager head case:

echo "manager" > examples/cra-storybook/.storybook/manager-head.html
echo "preview" > examples/cra-storybook/.storybook/preview-head.html

Run the same tests as above, verify that there is manager across the top of the screen and preview across the top of the preview iframe.

@shilman
Copy link
Member Author

shilman commented Jun 10, 2017

cc @ndelangen @enjoylife

@shilman shilman requested a review from ndelangen June 10, 2017 01:31
@codecov
Copy link

codecov bot commented Jun 10, 2017

Codecov Report

Merging #1248 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1248      +/-   ##
==========================================
+ Coverage   13.74%   13.75%   +<.01%     
==========================================
  Files         207      207              
  Lines        4633     4632       -1     
  Branches      504      511       +7     
==========================================
  Hits          637      637              
+ Misses       3564     3558       -6     
- Partials      432      437       +5
Impacted Files Coverage Δ
app/react/src/server/utils.js 32.14% <ø> (ø) ⬆️
app/react/src/server/middleware.js 0% <0%> (ø) ⬆️
app/react/src/server/index.html.js 0% <0%> (ø) ⬆️
app/react/src/server/build.js 0% <0%> (ø) ⬆️
app/react/src/server/iframe.html.js 0% <0%> (ø) ⬆️
addons/knobs/src/components/types/Number.js 8.06% <0%> (ø) ⬆️
...codemod/src/transforms/update-organisation-name.js 40.62% <0%> (ø) ⬆️
addons/info/src/components/PropTable.js 0% <0%> (ø) ⬆️
app/react/src/server/babel_config.js 44.82% <0%> (ø) ⬆️
... and 20 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 bb3e6d9...a2c3585. Read the comment docs.

@PavelPolyakov
Copy link

Confirming, no undefined there:
image

@shilman shilman changed the title Fix manager-/preview-head.hTML bugs introduced in #1134 Fix storybook-build manager-head.html bug Jun 10, 2017
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

LGTM and works

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

Successfully merging this pull request may close these issues.

3 participants