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

Don't display sidebar and search field if there are no components found #247

Merged
merged 2 commits into from
Nov 20, 2016
Merged

Conversation

n1313
Copy link
Collaborator

@n1313 n1313 commented Nov 20, 2016

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.

@@ -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)}
Copy link
Member

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.

@n1313
Copy link
Collaborator Author

n1313 commented Nov 20, 2016

Whoops, my bad, I thought it was a boolean.

@sapegin
Copy link
Member

sapegin commented Nov 20, 2016

It is boolean, and it’s false isolated mode ;-)

@n1313
Copy link
Collaborator Author

n1313 commented Nov 20, 2016

Right, it can also be false in isolated mode. It's getting late, I should get some sleep... Is the PR ok otherwise?

@sapegin sapegin merged commit 0ddded4 into styleguidist:master Nov 20, 2016
@sapegin
Copy link
Member

sapegin commented Nov 20, 2016

Yep, thanks!

@n1313 n1313 deleted the search-fix branch November 21, 2016 02:05
sapegin added a commit that referenced this pull request Nov 22, 2016
## 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)
sapegin added a commit that referenced this pull request Nov 22, 2016
For some reason (most probably after transition to a GitHub
organization) Travis CI stopped to check pull requests.
sapegin added a commit that referenced this pull request Nov 22, 2016
## 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants