Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Divider from '@mui/material/Divider';
import MenuList, { MenuListProps } from '@mui/material/MenuList';
import MenuItem, { MenuItemProps } from '@mui/material/MenuItem';
import BackupTableRoundedIcon from '@mui/icons-material/BackupTableRounded';
import ForumRoundedIcon from '@mui/icons-material/ForumRounded';
import CalendarMonthRoundedIcon from '@mui/icons-material/CalendarMonthRounded';
import AccountTreeRoundedIcon from '@mui/icons-material/AccountTreeRounded';
import BarChartRoundedIcon from '@mui/icons-material/BarChartRounded';
Expand Down Expand Up @@ -193,6 +194,13 @@ const advancedProducts = [
icon: <EventNoteRoundedIcon sx={iconStyles} />,
href: ROUTES.schedulerOverview,
},
{
id: 'x-chat',
name: 'Chat',
description: 'AI-powered chat components.',
icon: <ForumRoundedIcon sx={iconStyles} />,
href: ROUTES.chatOverview,
},
];

export const MuiProductSelector = React.forwardRef(function MuiProductSelector(
Expand Down
2 changes: 2 additions & 0 deletions packages-internal/core-docs/src/constants/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export const ROUTES = {
treeViewOverview: '/x/react-tree-view/',
// Scheduler doc pages
schedulerOverview: '/x/react-scheduler/',
// Chat doc pages
chatOverview: '/x/react-chat/',
// Toolpad pages
toolpadLandingPage: '/toolpad/',
toolpadStudioLandingPage: '/toolpad/studio/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ describe('getProductInfoFromUrl', () => {
});
});

it('should handle MUI X Chat', () => {
expect(getProductInfoFromUrl('/x/react-chat/components')).to.deep.equal({
productCategoryId: 'x',
productId: 'x-chat',
});
});

it('should handle MUI X', () => {
expect(getProductInfoFromUrl('/x/migration/migration-data-grid-v5/')).to.deep.equal({
productCategoryId: 'x',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type MuiProductId =
| 'x-charts'
| 'x-tree-view'
| 'x-scheduler'
| 'x-chat'
| 'toolpad-studio'
| 'toolpad-core';

Expand Down
3 changes: 3 additions & 0 deletions packages-internal/markdown/prepareMarkdown.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ function resolveComponentApiUrl(productId, componentPkg, component) {
if (productId === 'x-scheduler') {
return `/x/api/scheduler/${kebabCase(component)}/`;
}
if (productId === 'x-chat') {
return `/x/api/chat/${kebabCase(component)}/`;
}
if (componentPkg === 'mui-base' || BaseUIReexportedComponents.includes(component)) {
return `/base-ui/react-${kebabCase(component)}/components-api/#${kebabCase(component)}`;
}
Expand Down
Loading