Skip to content

Commit

Permalink
[code-infra] Cleanup monorepo and @mui/docs usage (mui#13713)
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas <[email protected]>
  • Loading branch information
LukasTy authored and DungTiger committed Jul 23, 2024
1 parent 0af5568 commit 78e48cf
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/data/charts/gauge/gauge.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/meter/

<p class="description">Gauge charts let the user evaluate metrics.</p>

{{"component": "modules/components/ComponentLinkHeader.js", "design": false}}
{{"component": "@mui/docs/ComponentLinkHeader", "design": false}}

## Basics

Expand Down
2 changes: 1 addition & 1 deletion docs/data/charts/overview/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ packageName: '@mui/x-charts'

<p class="description">A fast and extendable library of react chart components for data visualization.</p>

{{"component": "modules/components/ComponentLinkHeader.js", "design": false}}
{{"component": "@mui/docs/ComponentLinkHeader", "design": false}}

## Overview

Expand Down
2 changes: 1 addition & 1 deletion docs/data/data-grid/overview/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/grid/
The Data Grid component is built with React and TypeScript to provide a smooth UX for manipulating an unlimited set of data.
It features an intuitive API for real-time updates as well as theming and custom templates—all with blazing-fast performance.

{{"component": "modules/components/ComponentLinkHeader.js"}}
{{"component": "@mui/docs/ComponentLinkHeader"}}

## Overview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ToggleButton from '@mui/material/ToggleButton';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import Stack from '@mui/material/Stack';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import BrandingProvider from 'docs/src/BrandingProvider';
import { BrandingProvider } from '@mui/docs/branding';
import CustomizationPlayground from 'docsx/src/modules/components/CustomizationPlayground';
import CircularProgress from '@mui/material/CircularProgress';
import { pickerExamples } from './examplesConfig.styling';
Expand Down
2 changes: 1 addition & 1 deletion docs/data/date-pickers/overview/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/datepick

<p class="description">These react date picker and time picker components let users select date or time values.</p>

{{"component": "modules/components/ComponentLinkHeader.js"}}
{{"component": "@mui/docs/ComponentLinkHeader"}}

## Overview

Expand Down
2 changes: 1 addition & 1 deletion docs/data/tree-view/overview/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packageName: '@mui/x-tree-view'

<p class="description">The Tree View component lets users navigate hierarchical lists of data with nested levels that can be expanded and collapsed.</p>

{{"component": "modules/components/ComponentLinkHeader.js"}}
{{"component": "@mui/docs/ComponentLinkHeader"}}

## Available components

Expand Down
2 changes: 1 addition & 1 deletion docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default withDocsInfra({
transpilePackages: [
// TODO, those shouldn't be needed in the first place
'@mui/monorepo', // Migrate everything to @mui/docs until the @mui/monorepo dependency becomes obsolete
'@mui/docs',
'@mui/docs', // needed to fix slashes in the generated links (https://github.com/mui/mui-x/pull/13713#issuecomment-2205591461, )
],
// Avoid conflicts with the other Next.js apps hosted under https://mui.com/
assetPrefix: process.env.DEPLOY_ENV === 'development' ? undefined : '/x',
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.11.5",
"@mui/base": "^5.0.0-beta.40",
"@mui/docs": "^6.0.0-alpha.13",
"@mui/icons-material": "^5.15.21",
"@mui/joy": "5.0.0-beta.32",
"@mui/lab": "^5.0.0-alpha.170",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/ChartFeaturesGrid.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import Grid from '@mui/material/Unstable_Grid2';
import InfoCard from 'docs/src/components/action/InfoCard';
import { InfoCard } from '@mui/docs/InfoCard';
import LineAxisRoundedIcon from '@mui/icons-material/LineAxisRounded';
import DashboardCustomizeRoundedIcon from '@mui/icons-material/DashboardCustomizeRounded';
import LegendToggleRoundedIcon from '@mui/icons-material/LegendToggleRounded';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/ChartsUsageDemo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import Box from '@mui/joy/Box';
import BrandingProvider from 'docs/src/BrandingProvider';
import { BrandingProvider } from '@mui/docs/branding';
import { HighlightedCode } from '@mui/docs/HighlightedCode';
import DemoPropsForm from './DemoPropsForm';

Expand Down
1 change: 0 additions & 1 deletion docs/src/modules/components/ComponentLinkHeader.js

This file was deleted.

6 changes: 3 additions & 3 deletions docs/src/modules/components/CustomizationPlayground.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import * as React from 'react';
// @ts-ignore
import { HighlightedCode } from '@mui/docs/HighlightedCode';
// @ts-ignore
import BrandingProvider from 'docs/src/BrandingProvider';
import { BrandingProvider } from '@mui/docs/branding';
import { styled, Theme, alpha, useTheme } from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';
import Tabs from '@mui/material/Tabs';
Expand Down Expand Up @@ -353,6 +351,7 @@ const CustomizationPlayground = function CustomizationPlayground({
{moreInformation}
</PlaygroundDemoArea>
{shouldBeInteractive && (
// @ts-expect-error - should no longer be a problem when `BrandingProvider` supports `undefined`: https://github.com/mui/material-ui/pull/42833
<BrandingProvider>
<PlaygroundConfigArea>
<ConfigSectionWrapper>
Expand Down Expand Up @@ -406,6 +405,7 @@ const CustomizationPlayground = function CustomizationPlayground({
)}
</PlaygroundWrapper>
{selectedDemo && customizationOptions && selectedCustomizationOption && (
// @ts-expect-error - should no longer be a problem when `BrandingProvider` supports `undefined`: https://github.com/mui/material-ui/pull/42833
<BrandingProvider>
<TabsWrapper>
<StylingApproachTabs
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/InstallationGrid.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import Grid from '@mui/material/Unstable_Grid2';
import InfoCard from 'docs/src/components/action/InfoCard';
import { InfoCard } from '@mui/docs/InfoCard';
import AccountTreeRounded from '@mui/icons-material/AccountTreeRounded';
import PivotTableChartRoundedIcon from '@mui/icons-material/PivotTableChartRounded';
import CalendarMonthRoundedIcon from '@mui/icons-material/CalendarMonthRounded';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/InterfaceApiPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Typography from '@mui/material/Typography';
import Alert from '@mui/material/Alert';
import VerifiedRoundedIcon from '@mui/icons-material/VerifiedRounded';
import { alpha } from '@mui/material/styles';
import { useTranslate, useUserLanguage } from 'docs/src/modules/utils/i18n';
import { useTranslate, useUserLanguage } from '@mui/docs/i18n';
import { HighlightedCode } from '@mui/docs/HighlightedCode';
import { MarkdownElement } from '@mui/docs/MarkdownElement';
import { SectionTitle } from '@mui/docs/SectionTitle';
Expand Down
35 changes: 35 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions scripts/buildApiDocs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
"strict": true,
"baseUrl": "./",
"paths": {
"@mui/material-nextjs/*": [
"../../node_modules/@mui/monorepo/packages/mui-material-nextjs/src/*"
],
"docs/config": ["../../node_modules/@mui/monorepo/docs/config.d.ts"],
"@mui-internal/api-docs-builder": [
"../../node_modules/@mui/monorepo/packages/api-docs-builder/index.ts"
Expand Down

0 comments on commit 78e48cf

Please sign in to comment.