Skip to content

[docs-infra] Add x-chat to MuiProductId type and product switcher#48209

Merged
rita-codes merged 3 commits intomui:masterfrom
hasdfa:add-x-chat-to-packages-mui-docs
Apr 8, 2026
Merged

[docs-infra] Add x-chat to MuiProductId type and product switcher#48209
rita-codes merged 3 commits intomui:masterfrom
hasdfa:add-x-chat-to-packages-mui-docs

Conversation

@hasdfa
Copy link
Copy Markdown
Member

@hasdfa hasdfa commented Apr 6, 2026

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 errors
  • packages-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/'` route
  • docs/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 published

This mirrors the changes made for the Scheduler launch in #48185 and #48208.

Copilot AI review requested due to automatic review settings April 6, 2026 12:48
@mui-bot
Copy link
Copy Markdown

mui-bot commented Apr 6, 2026

Netlify deploy preview

https://deploy-preview-48209--material-ui.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against bf003b1

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 MuiProductId to include x-chat and 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.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 6, 2026
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.
@hasdfa hasdfa force-pushed the add-x-chat-to-packages-mui-docs branch from 726b18c to 9987dc3 Compare April 6, 2026 13:45
Signed-off-by: Vadym Raksha <vadym@mui.com>
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 6, 2026
@zannager zannager added the scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). label Apr 7, 2026
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 8, 2026
Copy link
Copy Markdown
Member

@rita-codes rita-codes left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 8, 2026
@rita-codes rita-codes enabled auto-merge (squash) April 8, 2026 17:07
@rita-codes rita-codes merged commit a6a9fe5 into mui:master Apr 8, 2026
19 checks passed
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>
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).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants