Addon Info: Omit empty inline info header#1306
Merged
shilman merged 2 commits intostorybookjs:masterfrom Jun 23, 2017
Merged
Conversation
e4649ac to
b62b685
Compare
Codecov Report
@@ Coverage Diff @@
## master #1306 +/- ##
=========================================
Coverage ? 13.75%
=========================================
Files ? 202
Lines ? 4623
Branches ? 510
=========================================
Hits ? 636
Misses ? 3547
Partials ? 440
Continue to review full report at Codecov.
|
04385e2 to
d80e1c5
Compare
d80e1c5 to
549e55e
Compare
Contributor
Author
|
Looks like this is a duplicate of https://github.com/storybooks/storybook/pull/1297/files Feel free to take whichever approach seems appropriate. |
Member
|
@duncanbeevers this one is a little cleaner, so I'm going to merge it. thanks for the PR! |
Member
|
@duncanbeevers NOTE: we are planning to move the info addon into a panel soon: #1147 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: Creating stories using
addWithInfo, configured not to show headers, and to render info inline displays a blank header container on each story.What I did
Instead of unconditionally rendering the header container and filling it with the (possibly
null) result of_getInfoHeader(), I check the result first, and render the container conditionally.How to test
Check the

'simple usage (no header)'example. Before this change is applied, it appears with a large empty white area above the example.After this change is applied, the empty white area is absent.
