-
-
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
[docs] Generate docs for components #2465
Conversation
903a4f8
to
e7524bb
Compare
e7524bb
to
e316c98
Compare
e316c98
to
0be463e
Compare
const indexPath = path.resolve(__dirname, '../../packages/grid/_modules_/index.ts'); | ||
const program = ttp.createTSProgram([...componentsToGenerateDocs, indexPath], tsconfig); | ||
|
||
// Uncomment below to generate documentation for all exported components |
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.
I prefer to only document now DataGrid
and DataGridPro
. There're a few small components we could merge together into bigger and meaninful components. Not documenting them allows us to change them without declaring breaking changes.
"@emotion/cache": "^11.4.0", | ||
"@emotion/react": "^11.4.1", | ||
"@emotion/styled": "^11.3.0", | ||
"@eps1lon/enzyme-adapter-react-17": "^0.1.0", | ||
"@material-ui/monorepo": "https://github.com/mui-org/material-ui.git#next", | ||
"@material-ui/monorepo": "https://github.com/m4theushw/material-ui.git#master", |
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.
Once we're okay with the shape of this PR, I'll open another one in the core with the changes from my fork. Basically what I did was to move code from the core's script to separate files to reuse here. Here's the diff: mui/material-ui@master...m4theushw:master
@@ -2138,9 +2185,9 @@ | |||
npmlog "^4.1.2" | |||
write-file-atomic "^3.0.3" | |||
|
|||
"@material-ui/monorepo@https://github.com/mui-org/material-ui.git#next": | |||
"@material-ui/monorepo@https://github.com/m4theushw/material-ui.git#master": |
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.
Weird (m4theushw)
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.
|
||
Page.getInitialProps = () => { | ||
const req = require.context('docsx/translations/api-docs/data-grid', false, /data-grid.*.json$/); | ||
const descriptions = mapApiPageTranslations(req); |
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.
I don't know how heavy is the JSON to MD processing
But we may want to cache these pages at some point (same of the core).
Not blocking for this PR ofc
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Co-authored-by: Flavien DELANGLE <[email protected]>
Should we proceed with setting the correct repo in the |
Let's go, it would be nice to have this one on this week release |
We need to wait for mui/material-ui#28828 to be merged. |
Right, the timing may be to short... next one then 😛 |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This reverts commit 8ea7f81.
I'll merge this keeping my fork. We need the auto-generated docs ASAP. Once mui/material-ui#28828 is merged I'll revert to use the correct monorepo. I had to change the cache key used by the CircleCI to force the cache invalidation. After rebasing mui/material-ui#28828, it broke because it was trying to merge when |
Fixes #2465
Preview: https://deploy-preview-2465--material-ui-x.netlify.app/api/data-grid/data-grid/
Preview: https://deploy-preview-2465--material-ui-x.netlify.app/api/data-grid/data-grid-pro/