Skip to content

[docs-infra] Migrate modules to be used from @mui/docs#21590

Open
brijeshb42 wants to merge 2 commits intomui:masterfrom
brijeshb42:migrate-to-mui-docs
Open

[docs-infra] Migrate modules to be used from @mui/docs#21590
brijeshb42 wants to merge 2 commits intomui:masterfrom
brijeshb42:migrate-to-mui-docs

Conversation

@brijeshb42
Copy link
Contributor

@brijeshb42 brijeshb42 commented Mar 4, 2026

Companion PR to follow the migration of components moved from material-ui/docs to @mui/docs.

Currently, the monorepo dependency is still there and will continue to be there till 100% migration is done. I've removed @mui/docs dependency for now since the docs was using source from monorepo anyways. Will be added in the 100% migration PR.

Migration PR for Core -

@brijeshb42 brijeshb42 added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). labels Mar 4, 2026
@brijeshb42 brijeshb42 requested review from a team March 4, 2026 12:28
@mui-bot
Copy link

mui-bot commented Mar 4, 2026

Deploy preview: https://deploy-preview-21590--material-ui-x.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 2001f6a

package.json Outdated
"@mui/internal-test-utils": "catalog:",
"@mui/material": "catalog:",
"@mui/monorepo": "github:mui/material-ui#600ea849c3a238c97ca0eb0c9e06da7f1cd2f366",
"@mui/monorepo": "github:brijeshb42/material-ui#30b88e3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be updated before merging.

'@mui/internal-test-utils': 2.0.18-canary.9
'@mui/material': ^7.3.7
'@mui/stylis-plugin-rtl': ^7.3.7
'@mui/stylis-plugin-rtl': 'https://pkg.pr.new/mui/material-ui/@mui/stylis-plugin-rtl@ca39e3b'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same^

@brijeshb42 brijeshb42 changed the title [code-infra] Migrate more modules to be used from @mui/docs [code-infra] Migrate modules to be used from @mui/docs Mar 4, 2026
@brijeshb42 brijeshb42 force-pushed the migrate-to-mui-docs branch 5 times, most recently from 3d8f9da to 89d4936 Compare March 9, 2026 14:08
],
"test/*": ["./test/*"],
"docs/src/modules/utils/mapApiPageTranslations": [
"./docs/src/modules/utils/mapApiPageTranslations.js"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be removed once the docs generation script is updated

@brijeshb42 brijeshb42 force-pushed the migrate-to-mui-docs branch 5 times, most recently from 086612e to 82c53f2 Compare March 10, 2026 07:53
@brijeshb42 brijeshb42 changed the title [code-infra] Migrate modules to be used from @mui/docs [docs-infra] Migrate modules to be used from @mui/docs Mar 10, 2026
@brijeshb42 brijeshb42 force-pushed the migrate-to-mui-docs branch from 82c53f2 to f330a50 Compare March 10, 2026 07:57
…ument to TypeScript

Migrate _app.js → _app.tsx and _document.js → _document.tsx, using the
new <DocsApp> component and createGetInitialProps factory from
@mui/docs/DocsApp. This removes ~170 lines of duplicated boilerplate
(service worker, loadDependencies, console banner, emotion cache,
provider tree, reportWebVitals, getInitialProps) that are now shared
with material-ui via @mui/docs.

Project-specific code retained in _app.tsx:
- Font loading (Inter, Roboto, General Sans, IBM Plex Sans)
- X telemetry initialization
- productId ad-hoc overrides for /x/api/ URLs
- X product identifiers with version env vars
- X demo context with sandbox config (getVersions, includePeerDependencies, postProcessImport)
- Conditional ThemeWrapper for /playground routes

Added docs-env.d.ts importing '@mui/docs/webpack' for require.context()
type declarations.

Updated @mui/monorepo dependency to pick up:
- Shared DocsApp component and utilities
- Optional ProductInfo.logo/logoSvg/wordmarkSvg (not used by MUI X)
- Optional SandboxConfig.getRootIndex (not used by MUI X)
- TypeScript conversions of codeStyling, codeVariant, constants in @mui/docs
@brijeshb42 brijeshb42 force-pushed the migrate-to-mui-docs branch from f330a50 to 2001f6a Compare March 10, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants