[docs-infra] Migrate demos to docs-infra - #48842
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
c560c40 to
2a567f5
Compare
…e-demos-trimmed # Conflicts: # docs/data/material/components/drawers/drawers.md # docs/data/material/components/pagination/UsePagination.js # docs/data/material/components/pagination/demos/use/UsePagination.tsx # package.json # packages-internal/core-docs/package.json # pnpm-lock.yaml
200b696 to
c50e33f
Compare
mnajdova
left a comment
There was a problem hiding this comment.
Some issues I noticed, clicking on View Sources on GH on a preview link is broken:
- https://github.com/mui/material-ui/blob/docs-infra/migrate-demos-trimmed/docs/data/material/components/autocomplete/demos/combo-box/ComboBox.tsx vs other PR https://github.com/mui/material-ui/blob/v9.3.1/docs/data/material/components/autocomplete/ComboBox.tsx
- we are missing the JS/TS switcher
- I also noticed on master we are missing gap between the Edit in Chat and JS/TS switcher, we can fix it

- the demo on (perma|PR|master|next) anchor is wrong, e.g. it generates https://deploy-preview-48842--material-ui.netlify.app/material-ui/react-autocomplete/#ComboBox, while it should be https://deploy-preview-48842--material-ui.netlify.app/material-ui/react-autocomplete/#combo-box
Not for the scope of this PR, I accidently noticed that for the Autocomplete, in some demos we have a dedicated file for the movies, while on other they are inlined. I guess we should have a dedicated file for files in all demos.
Note that for a demo, if js and ts contents remain same after transpiling from ts to js, the switcher won't show since it'll switch to the same content. Checking others. |
silviuaavram
left a comment
There was a problem hiding this comment.
Will continue the review but what to mention a critical bug:
The Reset button functionality is broken. Even when you're in JS, and hit reset, it will bring back the TS version.
In the demo below I used quite a few clicks, but eventually it starts to bring the TS version.
Screen.Recording.2026-08-07.at.15.08.46.mov
| @@ -4,6 +4,7 @@ import Autocomplete from '@mui/material/Autocomplete'; | |||
| import Stack from '@mui/material/Stack'; | |||
|
|
|||
| export default function Playground() { | |||


Extension of #47821
Comparison with original PR.
Performance benchmark
I benchmarked this PR against
masterand the original PR across five representative documentation pages:Summary
Overall values are the mean of the five route medians.
New PR vs old PR by route
Interaction performance
The only regression is the code editing part since we are going back to textarea based editor. This will be solved separately when we migrate back to content editable in a dedicated PR.
What changed in the waterfall
Goal assessment
Methodology
58cfb571212961a46cce5ef51418cf4dcc8da4cb9f883f3561a4f0a3b6b4735c589e475d4649082d13d6f50caef899d0c09d5c31352df4765ebdf514loadto capture deferred imports.