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

[docs] Docs are not being generated for Hidden #6961

Closed
kgregory opened this issue May 25, 2017 · 3 comments
Closed

[docs] Docs are not being generated for Hidden #6961

kgregory opened this issue May 25, 2017 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@kgregory
Copy link
Member

Imported PropTypes not working with react-docgen

I am encountering an error when running the npm script to build docs:

Error generating markdown for Hidden
TypeError: Cannot read property 'name' of undefined
    at generatePropDescription (/material-ui/scripts/generate-docs-markdown.js:32:7)
    at /material-ui/scripts/generate-docs-markdown.js:144:25
    at Array.reduce (native)
    at generateProps (/material-ui/scripts/generate-docs-markdown.js:142:29)
    at generateMarkdown (/material-ui/scripts/generate-docs-markdown.js:198:8)
    at /material-ui/scripts/build-api-docs.js:60:18
    at tryToString (fs.js:456:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:443:12)

This is happening because react-docgen is not providing required, description, flowType, or type for any of the props defined in src/Hidden/types.js:

  • xsUp: { defaultValue: { value: 'false', computed: false } }
  • smUp: { defaultValue: { value: 'false', computed: false } }
  • mdUp: { defaultValue: { value: 'false', computed: false } }
  • lgUp: { defaultValue: { value: 'false', computed: false } }
  • xlUp: { defaultValue: { value: 'false', computed: false } }
  • xsDown: { defaultValue: { value: 'false', computed: false } }
  • smDown: { defaultValue: { value: 'false', computed: false } }
  • mdDown: { defaultValue: { value: 'false', computed: false } }
  • lgDown: { defaultValue: { value: 'false', computed: false } }
  • xlDown: { defaultValue: { value: 'false', computed: false } }

It looks like the last time Hidden.md was built was with this commit, but it should have been built when @oliviertassinari updated the docs with PR #6892.

Also, the type listed on Grid for the Hidden property is HiddenProps, which may benefit from more of an explanation. Maybe a link to the Grid/Hidden demos would be sufficient.

Versions

  • Material-UI: 1.0.0-alpha.15
@kgregory
Copy link
Member Author

react-docgen has an open issue for imported propTypes (I see you in the comments, @oliviertassinari! 👋)

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label May 25, 2017
@oliviertassinari
Copy link
Member

Closing for #6818.

@oliviertassinari
Copy link
Member

Also, the type listed on Grid for the Hidden property is HiddenProps, which may benefit from more of an explanation. Maybe a link to the Grid/Hidden demos would be sufficient.

Regarding that point. I agree, to you want to submit a PR? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants