-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Don't display sidebar and search field if there are no components found #247
Conversation
@@ -64,7 +64,7 @@ export default class StyleGuide extends Component { | |||
components={this.renderComponents(components, sections, sidebar, singleExample)} | |||
sections={sections} | |||
toc={this.renderTableOfContents(components, sections)} | |||
sidebar={sidebar} | |||
sidebar={!isEmpty(components) || !isEmpty(sections)} |
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.
You need to keep sidebar
here too, otherwise it breaks isolated view.
Whoops, my bad, I thought it was a boolean. |
It is boolean, and it’s false isolated mode ;-) |
Right, it can also be false in isolated mode. It's getting late, I should get some sleep... Is the PR ok otherwise? |
Yep, thanks! |
## New feature Now style guide should hot reload when you add new components. New config option , by default will watch common root folder for all your components. (#242 by @aaronjensen) ## Bug fixes and other improvements * Don’t show sidebar if there are no components found (#247 by @n1313) * Add mobile styles to improve display on narrow screens (#244 by @n1313) * Add extra HTML markup to make previews easier to find with CSS selectors (#238, #243 by @n1313)
For some reason (most probably after transition to a GitHub organization) Travis CI stopped to check pull requests.
## New feature Now style guide should hot reload when you add new components. New config option , by default will watch common root folder for all your components. (#242 by @aaronjensen) ## Bug fixes and other improvements * Don’t show sidebar if there are no components found (#247 by @n1313) * Add mobile styles to improve display on narrow screens (#244 by @n1313) * Add extra HTML markup to make previews easier to find with CSS selectors (#238, #243 by @n1313)
There is a search field on the "no components found" page (can be encountered in
customised
example before PR #246 It is lonely and somewhat useless, and probably shouldn't be there in the first place.