[docs-infra] Add x-chat to MuiProductId type and product switcher#48209
Merged
rita-codes merged 3 commits intomui:masterfrom Apr 8, 2026
Merged
[docs-infra] Add x-chat to MuiProductId type and product switcher#48209rita-codes merged 3 commits intomui:masterfrom
rita-codes merged 3 commits intomui:masterfrom
Conversation
Netlify deploy previewhttps://deploy-preview-48209--material-ui.netlify.app/ Bundle size report
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for the new MUI X Chat product to the docs infrastructure so URLs under /x/react-chat/ are recognized as x-chat and the product appears in the docs product switcher.
Changes:
- Extend
MuiProductIdto includex-chatand add a corresponding URL-parsing test case. - Register the
/x/react-chat/overview route in the docs routing constants. - Add “Chat” to the MUI X product switcher list (with icon, description, and link).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages-internal/core-docs/src/getProductInfoFromUrl/getProductInfoFromUrl.ts | Adds x-chat to the MuiProductId union for typed product identification. |
| packages-internal/core-docs/src/getProductInfoFromUrl/getProductInfoFromUrl.test.js | Adds coverage ensuring /x/react-chat/... resolves to { productCategoryId: 'x', productId: 'x-chat' }. |
| docs/src/route.ts | Introduces chatOverview route constant pointing at /x/react-chat/. |
| docs/src/modules/components/MuiProductSelector.tsx | Adds Chat entry to the MUI X section of the product selector dropdown. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds `'x-chat'` to the `MuiProductId` type union so MUI X docs can reference the Chat product without type errors. Also adds Chat to the product switcher dropdown and registers its overview route, mirroring the pattern used for the Scheduler launch.
726b18c to
9987dc3
Compare
Signed-off-by: Vadym Raksha <vadym@mui.com>
mnajdova
approved these changes
Apr 7, 2026
brijeshb42
added a commit
to brijeshb42/material-ui
that referenced
this pull request
Apr 8, 2026
The revert of e518e8b restored getProductInfoFromUrl.ts to its original location in docs/src/modules/utils/, but the x-chat product ID addition from a6a9fe5 was only applied to the new (now deleted) location. This applies that missing change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the Chat component to the MUI docs infrastructure for the MUI X Chat alpha launch.
Changes
packages-internal/core-docs/src/getProductInfoFromUrl/getProductInfoFromUrl.ts— adds `'x-chat'` to the `MuiProductId` type union so that `mui-x` docs can reference the Chat product without type errorspackages-internal/core-docs/src/getProductInfoFromUrl/getProductInfoFromUrl.test.js— adds a test case for the new product ID (`/x/react-chat/` → `x-chat`)docs/src/route.ts— registers `chatOverview: '/x/react-chat/'` routedocs/src/modules/components/MuiProductSelector.tsx— adds Chat to the product switcher dropdown with a `ForumRoundedIcon`packages-internal/markdown/prepareMarkdown.mjs— adds `x-chat` to `resolveComponentApiUrl` so component API URLs resolve to `/x/api/chat/{component}/`; this allows the `@mui__internal-markdown` patches currently carried in `mui-x` to be removed once a new version is publishedThis mirrors the changes made for the Scheduler launch in #48185 and #48208.