Skip to content

Commit

Permalink
[core] Prepare stable release from the v6.x branch (mui#45133)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai authored Jan 29, 2025
1 parent 045b84d commit 69238b8
Show file tree
Hide file tree
Showing 46 changed files with 118 additions and 98 deletions.
11 changes: 7 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
name: '`pnpm dedupe` was run?'
command: |
# #default-branch-switch
if [[ $(git diff --name-status master | grep -E 'pnpm-workspace\.yaml|pnpm-lock.yaml|package\.json') == "" ]];
if [[ $(git diff --name-status v6.x | grep -E 'pnpm-workspace\.yaml|pnpm-lock.yaml|package\.json') == "" ]];
then
echo "No changes to dependencies detected. Skipping..."
else
Expand Down Expand Up @@ -921,9 +921,10 @@ workflows:
filters:
branches:
only:
# #target-branch-reference
- master
- next
- v5.x
- v6.x
jobs:
- test_unit:
<<: *default-context
Expand Down Expand Up @@ -971,8 +972,9 @@ workflows:
filters:
branches:
only:
# #target-branch-reference
- master
- next
- v6.x
jobs:
- test_unit:
<<: *default-context
Expand All @@ -998,8 +1000,9 @@ workflows:
filters:
branches:
only:
# #target-branch-reference
- master
- next
- v6.x
jobs:
- test_types_next:
<<: *default-context
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ on:
# So that PRs touching the same files as the push are updated
push:
branches:
# #target-branch-reference
- master
- next
- v6.x
# So that the `dirtyLabel` is removed if conflicts are resolved
# Could put too much strain on rate limit
# If we hit the rate limit too often remove this event
pull_request_target:
branches:
# #target-branch-reference
- master
- next
- v6.x
types: [synchronize]

permissions: {}
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ For how-to questions that don't involve making changes to the code base, please

## Examples

Our documentation features [a collection of example projects](https://github.com/mui/material-ui/tree/master/examples).
<!-- #repo-reference -->

Our documentation features [a collection of example projects](https://github.com/mui/material-ui/tree/v6.x/examples).

## Premium templates

Expand Down
4 changes: 3 additions & 1 deletion docs/data/material/customization/dark-mode/dark-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ Use the `theme.applyStyles()` utility to apply styles for a specific mode.

We recommend using this function over checking `theme.palette.mode` to switch between styles as it has more benefits:

- It can be used with [Pigment CSS](https://github.com/mui/material-ui/tree/master/packages/pigment-css-react), our in-house zero-runtime CSS-in-JS solution.
<!-- #repo-reference -->

- It can be used with [Pigment CSS](https://github.com/mui/material-ui/tree/v6.x/packages/pigment-css-react), our in-house zero-runtime CSS-in-JS solution.
- It is generally more readable and maintainable.
- It is slightly more performant as it doesn't require to do style recalculation but the bundle size of SSR generated styles is larger.

Expand Down
4 changes: 3 additions & 1 deletion docs/data/material/customization/palette/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ const theme = createTheme({

{{"demo": "ManuallyProvideCustomColor.js", "defaultCodeOpen": false}}

If you need to manipulate colors, `@mui/material/styles` provides [a set of utilities](https://github.com/mui/material-ui/blob/master/packages/mui-material/src/styles/index.d.ts#L52-L67) to help with this.
<!-- #repo-reference -->

If you need to manipulate colors, `@mui/material/styles` provides [a set of utilities](https://github.com/mui/material-ui/blob/v6.x/packages/mui-material/src/styles/index.d.ts#L52-L67) to help with this.
The following example uses the `alpha()` and `getContrastRatio()` utilities to define tokens using opacity:

```jsx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

## Official integrations

The following integration examples are available in the [`/examples`](https://github.com/mui/material-ui/tree/master/examples) folder of the Material UI GitHub repository.
<!-- #repo-reference -->

The following integration examples are available in the [`/examples`](https://github.com/mui/material-ui/tree/v6.x/examples) folder of the Material UI GitHub repository.
These examples feature Material UI paired with other popular React libraries and frameworks, so you can skip the initial setup steps and jump straight into building.

:::success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ You can start using Material UI right away with minimal front-end infrastructur

<!-- #default-branch-switch -->

Follow [this CDN example](https://github.com/mui/material-ui/tree/master/examples/material-ui-via-cdn) to get started.
Follow [this CDN example](https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-via-cdn) to get started.

:::error
We do _not_ recommend using this approach in production.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You don't need to provide any JavaScript polyfill as it manages unsupported brow

<!-- #default-branch-switch -->

An extensive list can be found in our [.browserlistrc](https://github.com/mui/material-ui/blob/-/.browserslistrc#L12-L27) (check the `stable` entry).
An extensive list can be found in our [.browserlistrc](https://github.com/mui/material-ui/blob/v6.x/.browserslistrc#L12-L27) (check the `stable` entry).

Because Googlebot uses a web rendering service (WRS) to index the page content, it's critical that Material UI supports it.
[WRS regularly updates the rendering engine it uses](https://webmasters.googleblog.com/2019/05/the-new-evergreen-googlebot.html).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- #default-branch-switch -->

1. Copy these folders (`blog` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/master/examples).
1. Copy these folders (`blog` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/v6.x/examples).
2. Make sure your project has the required dependencies: @mui/material, @mui/icons-material, @emotion/styled, @emotion/react, markdown-to-jsx.
3. Import and use the `Blog` component.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- #default-branch-switch -->

1. Copy these folders (`checkout` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/master/examples).
1. Copy these folders (`checkout` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/v6.x/examples).
2. Make sure your project has the required dependencies: @mui/material, @emotion/styled, @emotion/react.
3. Import and use the `Checkout` component.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- #default-branch-switch -->

1. Copy these folders (`dashboard` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/master/examples).
1. Copy these folders (`dashboard` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/v6.x/examples).
2. Make sure your project has the required dependencies: @mui/material, @mui/icons-material, @emotion/styled, @emotion/react, @mui/x-charts, @mui/x-date-pickers, @mui/x-data-grid, @mui/x-tree-view, dayjs
3. Import and use the `Dashboard` component.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- #default-branch-switch -->

1. Copy these folders (`marketing-page` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/master/examples).
1. Copy these folders (`marketing-page` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/v6.x/examples).
2. Make sure your project has the required dependencies: @mui/material, @mui/icons-material, @emotion/styled, @emotion/react.
3. Import and use the `MarketingPage` component.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- #default-branch-switch -->

1. Copy these folders (`sign-in-side` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/master/examples).
1. Copy these folders (`sign-in-side` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/v6.x/examples).
2. Make sure your project has the required dependencies: @mui/material, @mui/icons-material, @emotion/styled, @emotion/react.
3. Import and use the `SignInSide` component.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- #default-branch-switch -->

1. Copy these folders (`sign-in` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/master/examples).
1. Copy these folders (`sign-in` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/v6.x/examples).
2. Make sure your project has the required dependencies: @mui/material, @mui/icons-material, @emotion/styled, @emotion/react.
3. Import and use the `SignIn` component.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- #default-branch-switch -->

1. Copy these folders (`sign-up` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/master/examples).
1. Copy these folders (`sign-up` and `shared-theme`) into your project, or one of the [example projects](https://github.com/mui/material-ui/tree/v6.x/examples).
2. Make sure your project has the required dependencies: @mui/material, @mui/icons-material, @emotion/styled, @emotion/react.
3. Import and use the `SignUp` component.

Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/guides/localization/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ The [Data Grid and Data Grid Pro](/x/react-data-grid/) components have their own

<!-- #default-branch-switch -->

You can [find the source](https://github.com/mui/material-ui/blob/master/packages/mui-material/src/locale/index.ts) in the GitHub repository.
You can [find the source](https://github.com/mui/material-ui/blob/v6.x/packages/mui-material/src/locale/index.ts) in the GitHub repository.

To create your own translation, or to customize the English text, copy this file to your project, make any changes needed and import the locale from there.

Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/guides/typescript/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<!-- #default-branch-switch -->

Material UI requires a minimum version of TypeScript 4.7. Have a look at the [Create React App with TypeScript](https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-ts) example.
Material UI requires a minimum version of TypeScript 4.7. Have a look at the [Create React App with TypeScript](https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-ts) example.

For types to work, it's recommended that you have at least the following options enabled in your `tsconfig.json`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ If, however, you would like to use styled-components, you can configure your app

<!-- #default-branch-switch -->

- [Create React App with styled-components](https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-styled-components)
- [Create React App with styled-components and TypeScript](https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-styled-components-ts)
- [Create React App with styled-components](https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-styled-components)
- [Create React App with styled-components and TypeScript](https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-styled-components-ts)

Following this approach reduces the bundle size, and removes the need to configure the CSS injection order.

Expand Down Expand Up @@ -580,7 +580,9 @@ It works exactly like styled components. You can [use the same guide](/material-

### Setup

If you are used to Tailwind CSS and want to use it together with the Material UI components, you can start by cloning the [Tailwind CSS](https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-tailwind-ts) example project.
<!-- #repo-reference -->

If you are used to Tailwind CSS and want to use it together with the Material UI components, you can start by cloning the [Tailwind CSS](https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-tailwind-ts) example project.
If you use a different framework, or already have set up your project, follow these steps:

1. Add Tailwind CSS to your project, following the instructions in https://tailwindcss.com/docs/installation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ We provide boilerplate examples of Create React App with Material UI and styled

<!-- #default-branch-switch -->

- [Material UI + CRA + styled-components (JavaScript)](https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-styled-components)
- [Material UI + CRA + styled-components (TypeScript)](https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-styled-components-ts)
- [Material UI + CRA + styled-components (JavaScript)](https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-styled-components)
- [Material UI + CRA + styled-components (TypeScript)](https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-styled-components-ts)

:::warning
`@emotion/react`, `@emotion/styled`, and `styled-components` are optional peer dependencies of `@mui/material`, so you need to install them yourself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ Now, the Button's `backgroundColor`, `borderColor` and text `color` values will
For framework- or language-specific setup instructions, see [CSS theme variables—Usage—Server-side rendering](/material-ui/customization/css-theme-variables/usage/).
For framework or language specific setup, see [this](/material-ui/customization/css-theme-variables/usage/)

See the complete usage of `createCssVarsProvider` in [Material UI](https://github.com/mui/material-ui/blob/master/packages/mui-material/src/styles/ThemeProviderWithVars.tsx) and [Joy UI](https://github.com/mui/material-ui/blob/master/packages/mui-joy/src/styles/CssVarsProvider.tsx).
<!-- #repo-reference -->

See the complete usage of `createCssVarsProvider` in [Material UI](https://github.com/mui/material-ui/blob/v6.x/packages/mui-material/src/styles/ThemeProviderWithVars.tsx) and [Joy UI](https://github.com/mui/material-ui/blob/v6.x/packages/mui-joy/src/styles/CssVarsProvider.tsx).

## API

Expand Down
2 changes: 1 addition & 1 deletion docs/data/system/getting-started/usage/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Runtime performance takes a hit.

<!-- #default-branch-switch -->

Visit the [benchmark folder](https://github.com/mui/material-ui/tree/master/benchmark/browser) for a reproduction of the metrics above.
Visit the [benchmark folder](https://github.com/mui/material-ui/tree/v6.x/benchmark/browser) for a reproduction of the metrics above.

We believe that for most use cases it's fast enough, but there are simple workarounds when performance becomes critical.
For instance, when rendering a list with many items, you can use a CSS child selector to have a single "style injection" point (using d. for the wrapper and a. for each item).
Expand Down
2 changes: 1 addition & 1 deletion docs/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default withDocsInfra({
// docs-infra
LIB_VERSION: pkg.version,
SOURCE_CODE_REPO: 'https://github.com/mui/material-ui',
SOURCE_GITHUB_BRANCH: 'master', // #default-branch-switch
SOURCE_GITHUB_BRANCH: 'v6.x', // #default-branch-switch
GITHUB_TEMPLATE_DOCS_FEEDBACK: '4.docs-feedback.yml',
BUILD_ONLY_ENGLISH_LOCALE: String(buildOnlyEnglishLocale),
// MUI Core related
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build:clean": "rimraf .next && pnpm build",
"build-sw": "node ./scripts/buildServiceWorker.js",
"dev": "next dev",
"deploy": "git push -f material-ui-docs master:latest",
"deploy": "git push -f material-ui-docs v6.x:latest",
"icons": "rimraf --glob public/static/icons/* && node ./scripts/buildIcons.js",
"start": "serve ./export",
"create-playground": "cpy --cwd=scripts playground.template.tsx ../../pages/playground --rename=index.tsx",
Expand Down
32 changes: 16 additions & 16 deletions docs/src/modules/components/MaterialUIExampleCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,78 +14,78 @@ const examples = [
name: 'Next.js App Router',
label: 'View JavaScript',
tsLabel: 'View TypeScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-nextjs',
tsLink: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-nextjs-ts',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-nextjs',
tsLink: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-nextjs-ts',
src: '/static/images/examples/next.svg',
},
{
name: 'Next.js Pages Router',
label: 'View JavaScript',
tsLabel: 'View TypeScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-nextjs-pages-router',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-nextjs-pages-router',
tsLink:
'https://github.com/mui/material-ui/tree/master/examples/material-ui-nextjs-pages-router-ts',
'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-nextjs-pages-router-ts',
src: '/static/images/examples/next.svg',
},
{
name: 'Vite.js',
label: 'View JavaScript',
tsLabel: 'View TypeScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-vite',
tsLink: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-vite-ts',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-vite',
tsLink: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-vite-ts',
src: '/static/images/examples/vite.svg',
},
{
name: 'Remix',
label: 'View TypeScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-remix-ts',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-remix-ts',
src: '/static/images/examples/remix.svg',
},
{
name: 'Create React App',
label: 'View JavaScript',
tsLabel: 'View TypeScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-cra',
tsLink: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-ts',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra',
tsLink: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-ts',
src: '/static/images/examples/cra.svg',
},
{
name: 'Tailwind CSS + Create React App',
label: 'View TypeScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-tailwind-ts',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-tailwind-ts',
src: '/static/images/examples/tailwindcss.svg',
},
{
name: 'styled-components',
label: 'View JavaScript',
tsLabel: 'View TypeScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-styled-components',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-styled-components',
tsLink:
'https://github.com/mui/material-ui/tree/master/examples/material-ui-cra-styled-components-ts',
'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-cra-styled-components-ts',
src: '/static/images/examples/styled.png',
},
{
name: 'Preact',
label: 'View JavaScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-preact',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-preact',
src: '/static/images/examples/preact.svg',
},
{
name: 'CDN',
label: 'View JavaScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-via-cdn',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-via-cdn',
src: <CloudRoundedIcon />,
},
{
name: 'Express.js (server-rendered)',
label: 'View JavaScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-express-ssr',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-express-ssr',
src: '/static/images/examples/express.png',
},
{
name: 'Gatsby',
label: 'View JavaScript',
link: 'https://github.com/mui/material-ui/tree/master/examples/material-ui-gatsby',
link: 'https://github.com/mui/material-ui/tree/v6.x/examples/material-ui-gatsby',
src: '/static/images/examples/gatsby.svg',
},
];
Expand Down
Loading

0 comments on commit 69238b8

Please sign in to comment.