[docs-infra] Fix Material UI docs links in code-infra-dashboard PR comment - #1770
Conversation
Deploy previewBundle sizeTotal Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%) Show details for 69 more bundles@mui/internal-docs-infra/abstractCreateDemo parsed: 0B(0.00%) gzip: 0B(0.00%) PerformanceTotal duration: 18.17 ms +0.42 ms(+2.4%) | Renders: 5 (+0) | Paint: 63.50 ms -7.08 ms(-10.0%)
5 tests within noise — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
|
@brijeshb42 @Janpot Tagging for review. |
|
@brijeshb42 You can merge and release. I don't have access to merge in this repo. |
| const DOCS_DATA_PREFIX = 'docs/data/'; | ||
| const MATERIAL_UI_COMPONENTS_PREFIX = 'material/components/'; | ||
| const MATERIAL_UI_PREFIX = 'material/'; | ||
| const SUPPORTED_DOC_FILE_EXTENSIONS = ['.md', '.mdx', '.js', '.jsx', '.ts', '.tsx', '.json']; |
There was a problem hiding this comment.
One could make this a set as well and do the check with
SUPPORTED_DOC_FILE_EXTENSIONS.has(path.extname(theFilePath))to avoid the O(n) complexity. It's not that critical for this use-case though.
I noticed that the code-infra-dashboard comment in docs related PRs of Material UI points to wrong doc pages.
For example in a recent PR: mui/material-ui#48939 (comment) points to https://deploy-preview-48939--material-ui.netlify.app/material-ui/components/tabs whereas it should link to https://deploy-preview-48939--material-ui.netlify.app/material-ui/react-tabs/
Code was generated by Codex. But the code logic has been verified by me.