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

Adding custom handler is not listing components in webpage #465

Closed
pasupuletics opened this issue Jun 6, 2017 · 5 comments
Closed

Adding custom handler is not listing components in webpage #465

pasupuletics opened this issue Jun 6, 2017 · 5 comments

Comments

@pasupuletics
Copy link
Contributor

pasupuletics commented Jun 6, 2017

Adding a custom handler causes not to generate/list the components, server is up and running on configured port, but it is not listing any components in left nav(no console errors in the browser). once I remove handlers attribute from config its working fine. As per styleguidist docs which is valid. Any thoughts....

Below is the sample code.

styleguide.config.js
{
  ...,
  "handlers": componetPath => require('react-docgen').defaultHandlers.concat((doc, path) => {
    //some custom logic or empty function as is.
  })
}

CC: @sapegin

@pasupuletics pasupuletics changed the title Adding custom handler is not listing components in the webpage Adding custom handler is not listing components in webpage Jun 6, 2017
@sapegin
Copy link
Member

sapegin commented Jun 6, 2017

Please make an example as described here.

@sapegin sapegin closed this as completed Jun 6, 2017
@sapegin sapegin reopened this Jun 6, 2017
@pasupuletics
Copy link
Contributor Author

@sapegin, this issue got resolved after adding display handler along with my custom handler. It's better to document this specific step or else better to incorporate in stypeguidit itself. I mean if handlers attribute is configured then we should also contact display handler to existing handlers. Thanks for you time and stuleguidist is awesome.

@sapegin
Copy link
Member

sapegin commented Jun 7, 2017

The docs are already mention it, feel free to send a pull request though.

@pasupuletics
Copy link
Contributor Author

@sapegin , You mean do you want me to create pull request for the below scenario:
Concating react-docgen-displayname-handler handler to be part of stylegudist(internal implim) when user configured handlers property? please confirm I am more happy to do that.

@sapegin
Copy link
Member

sapegin commented Jun 8, 2017

I’m wondering if it can break existing style guides. I think it would be better to remove mentions of HOCs in the docs and check if component has displayName in props-loader.

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

No branches or pull requests

2 participants