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

addon-info: docgen on PropTypes.shape() #3031

Closed
shaun-sweet opened this issue Feb 19, 2018 · 5 comments
Closed

addon-info: docgen on PropTypes.shape() #3031

shaun-sweet opened this issue Feb 19, 2018 · 5 comments

Comments

@shaun-sweet
Copy link

I have my prop types

ApplicationSelector.propTypes = {
  /** Array of applications selector can render  */
  applications: PropTypes.arrayOf(PropTypes.shape({
    /** Name of application */
    name: PropTypes.string.isRequired,
    /** Label of link that actual renders to end user */
    displayName: PropTypes.string.isRequired,
    /** onClick link reference to the location of application */
    homePageUrl: PropTypes.string.isRequired
  })).isRequired
}

The descriptions don't actually show, nor do the isRequired flags in the nested props. Is this possible using the babel plugin you're using at all? Perhaps its currently implemented and I'm not doing something correct? Heres a screenshot

image

@Hypnosphi
Copy link
Member

Hypnosphi commented Feb 19, 2018

AFAIK this info is actually available in docgen. There was some suggestion about how it can be presented in PropTable: #1485 (comment)

@shaun-sweet
Copy link
Author

Hmm yea it shows the nested types, but there's a bit of missing data. It seems like that wasn't added. Perhaps I can dig into it a bit and expand it a bit.

@Hypnosphi
Copy link
Member

Cool, go for it

@stale
Copy link

stale bot commented Mar 24, 2018

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Mar 24, 2018
@danielduan danielduan added the todo label Apr 2, 2018
@stale stale bot removed the inactive label Apr 2, 2018
@ndelangen
Copy link
Member

This is fixed

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

4 participants