Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][docs] Categorize the "How-to guides" pages #40403

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d8c8b6c
attempt at reorganizing the how-to-guides pages
danilo-leal Jan 2, 2024
f893d9b
yarn docs:i18n
danilo-leal Jan 3, 2024
b7bd31a
push proposed content reorganization
danilo-leal Jan 10, 2024
51dbfe1
Merge branch 'master' into material-how-to-guides-organization
danilo-leal Jan 10, 2024
205b671
run docs:i18n
danilo-leal Jan 10, 2024
dc08533
iterate on the Customization + How-to guides structure
danilo-leal Jan 10, 2024
94e84f9
run docs:i18n
danilo-leal Jan 10, 2024
7edc21d
trigger ci again
danilo-leal Jan 11, 2024
0c437f1
change Routing page placement
danilo-leal Jan 16, 2024
69f6cba
run docs:i18n
danilo-leal Jan 16, 2024
2df3106
trigger ci
danilo-leal Jan 16, 2024
93c9cd1
fix page paths (no broken link)
danilo-leal Jan 16, 2024
db3e94f
Merge branch 'master' into material-how-to-guides-organization
danilo-leal Jan 16, 2024
35d39dc
fix broken links throughout
danilo-leal Jan 16, 2024
db60b17
Merge branch 'master' into material-how-to-guides-organization
danilo-leal Jan 17, 2024
5ab1387
Merge branch 'master' into material-how-to-guides-organization
danilo-leal Jan 19, 2024
49f62bb
Merge branch 'master' into material-how-to-guides-organization
danilo-leal Jan 22, 2024
a22d910
adding redirects for pages that changed their URLs
danilo-leal Jan 23, 2024
d70ad28
add the RtlDemo to the list of ignored demos
danilo-leal Jan 24, 2024
dfda22a
try to make vale happy
danilo-leal Jan 24, 2024
c0c0311
try to make vale happy again
danilo-leal Jan 24, 2024
89dd306
Merge branch 'master' into material-how-to-guides-organization
danilo-leal Jan 29, 2024
58327eb
trying to make Vale happy once again
danilo-leal Jan 29, 2024
9e4e9f4
missed this MUI System instance
danilo-leal Jan 29, 2024
7d0ea2a
Vale again: punctuation inside quotes
danilo-leal Jan 29, 2024
a75dfc9
tackle other errors pointed out by Vale
danilo-leal Jan 29, 2024
4d4283a
continue on error
alexfauquette Jan 30, 2024
232e2d4
Merge branch 'master' into material-how-to-guides-organization
danilo-leal Jan 30, 2024
d2e324f
Merge branch 'master' into material-how-to-guides-organization
danilo-leal Feb 5, 2024
09ad4a3
remove duplicated redirection rule
oliviertassinari Feb 5, 2024
722568a
fix double redirection
oliviertassinari Feb 5, 2024
d26349f
this feels easier to read and CI should catch them
oliviertassinari Feb 6, 2024
0bfc2b0
fix lint error
danilo-leal Feb 6, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/vale-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: errata-ai/vale-action@c4213d4de3d5f718b8497bd86161531c78992084 # v2.0.1
continue-on-error: true
with:
reporter: github-pr-review
files: docs/data
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11939,7 +11939,7 @@ A big thanks to the 18 contributors who made this release possible. Here are som
);
```

This enforces emotion being injected first. [More details](https://mui.com/material-ui/guides/interoperability/#css-injection-order) in the documentation.
This enforces emotion being injected first. [More details](https://mui.com/material-ui/integrations/interoperability/#css-injection-order) in the documentation.

- [Autocomplete] Rename `closeIcon` prop with `clearIcon` to avoid confusion (#23617) @akhilmhdh.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ This demo keeps bottom navigation fixed to the bottom, no matter the amount of c

One frequent use case is to perform navigation on the client only, without an HTTP round-trip to the server.
The `BottomNavigationAction` component provides the `component` prop to handle this use case.
Here is a [more detailed guide](/material-ui/guides/routing/).
Here is a [more detailed guide](/material-ui/integrations/routing/).
2 changes: 1 addition & 1 deletion docs/data/material/components/buttons/buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ You can take advantage of this lower-level component to build custom interaction

One frequent use case is to perform navigation on the client only, without an HTTP round-trip to the server.
The `ButtonBase` component provides the `component` prop to handle this use case.
Here is a [more detailed guide](/material-ui/guides/routing/#button).
Here is a [more detailed guide](/material-ui/integrations/routing/#button).

## Limitations

Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/links/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ When you use `target="_blank"` with Links, it is [recommended](https://developer

One frequent use case is to perform navigation on the client only, without an HTTP round-trip to the server.
The `Link` component provides the `component` prop to handle this use case.
Here is a [more detailed guide](/material-ui/guides/routing/#link).
Here is a [more detailed guide](/material-ui/integrations/routing/#link).

## Accessibility

Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/lists/lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The last item of the previous demo shows how you can render a link:
</ListItemButton>
```

You can find a [demo with React Router following this section](/material-ui/guides/routing/#list) of the documentation.
You can find a [demo with React Router following this section](/material-ui/integrations/routing/#list) of the documentation.

## Nested List

Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/tabs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ By default, tabs use a `button` element, but you can provide your custom tag or

One frequent use case is to perform navigation on the client only, without an HTTP round-trip to the server.
The `Tab` component provides the `component` prop to handle this use case.
Here is a [more detailed guide](/material-ui/guides/routing/#tabs).
Here is a [more detailed guide](/material-ui/integrations/routing/#tabs).

## Icon tabs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ These class names can't be used as CSS selectors because they are unstable.
If you want to override a component's styles using custom classes, you can use the `className` prop, available on each component.
To override the styles of a specific part of the component, use the global classes provided by Material UI, as described in the previous section **"Overriding nested component styles"** under the [`sx` prop section](#the-sx-prop).

Visit the [Style library interoperability](/material-ui/guides/interoperability/) guide to find examples of this approach using different styling libraries.
Visit the [Style library interoperability](/material-ui/integrations/interoperability/) guide to find examples of this approach using different styling libraries.

### State classes

Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/customization/theming/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You can check out the [default theme section](/material-ui/customization/default

### Custom variables

When using Material UI's theme with [MUI System](/system/getting-started/) or [any other styling solution](/material-ui/guides/interoperability/), it can be convenient to add additional variables to the theme so you can use them everywhere.
When using Material UI's theme with [MUI System](/system/getting-started/) or [any other styling solution](/material-ui/integrations/interoperability/), it can be convenient to add additional variables to the theme so you can use them everywhere.
For instance:

```jsx
Expand Down
17 changes: 8 additions & 9 deletions docs/data/material/getting-started/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- **Spread the word**. Evangelize MUI's products by [linking to mui.com](https://mui.com/) on your website—every backlink matters.
Follow us on [X](https://twitter.com/MUI_hq), like and retweet the important news. Or just talk about us with your friends.
- **Give us feedback**. Tell us what we're doing well or where we can improve. Please upvote (👍) the issues that you are the most interested in seeing solved.
- **Give us feedback**. Tell us what is going well or where there is improvement opportunities. Please upvote (👍) the issues that you are the most interested in seeing solved.

Check warning on line 13 in docs/data/material/getting-started/faq/faq.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.We] Try to avoid using first-person plural like 'us'. Raw Output: {"message": "[Google.We] Try to avoid using first-person plural like 'us'.", "location": {"path": "docs/data/material/getting-started/faq/faq.md", "range": {"start": {"line": 13, "column": 10}}}, "severity": "WARNING"}

Check warning on line 13 in docs/data/material/getting-started/faq/faq.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.We] Try to avoid using first-person plural like 'us'. Raw Output: {"message": "[Google.We] Try to avoid using first-person plural like 'us'.", "location": {"path": "docs/data/material/getting-started/faq/faq.md", "range": {"start": {"line": 13, "column": 30}}}, "severity": "WARNING"}
- **Help new users**. You can answer questions on
[Stack Overflow](https://stackoverflow.com/questions/tagged/material-ui).
- **Make changes happen**.
Expand Down Expand Up @@ -59,7 +59,7 @@

const theme = createTheme({
transitions: {
// So we have `transition: none;` everywhere
// So `transition: none;` gets applied everywhere
create: () => 'none',
},
});
Expand Down Expand Up @@ -106,8 +106,7 @@

Perhaps, however, you're adding some Material UI components to an app that already uses another styling solution,
or are already familiar with a different API, and don't want to learn a new one? In that case, head over to the
[Style library interoperability](/material-ui/guides/interoperability/) section,
where we show how simple it is to restyle Material UI components with alternative style libraries.
[Style library interoperability](/material-ui/integrations/interoperability/) section to learn how to restyle Material UI components with alternative style libraries.

## When should I use inline-style vs. CSS?

Expand All @@ -121,7 +120,7 @@

## How do I use react-router?

We detail the [integration with third-party routing libraries](/material-ui/guides/routing/) like react-router or Next.js in our guide.
Visit the guide about [integration with third-party routing libraries](/material-ui/integrations/routing/), like react-router or Next.js, for more details.

## How can I access the DOM element?

Expand All @@ -138,7 +137,7 @@
const element = ref.current;
```

If you're not sure if the Material UI component in question forwards its ref you can check the API documentation under "Props".
If you're not sure if the Material UI component in question forwards its ref you can check the API documentation under "Props."
You should find the message below, like in the [Button API](/material-ui/api/button/#props), [Button API](/material-ui/api/button/#props)

> The ref is forwarded to the root element.
Expand Down Expand Up @@ -204,7 +203,7 @@
This is especially apparent for React.lazy components in Suspense.
The above implementation could also not account for a change in the DOM node.

This is why we require a prop with the actual DOM node so that React can take care of determining when the `Portal` should re-render:
This is why a prop is required to the actual DOM node so that React can take care of determining when the `Portal` should re-render:

```jsx
function App() {
Expand Down Expand Up @@ -276,8 +275,8 @@
There are several common reasons for this to happen:

- You have another `@mui/styles` library somewhere in your dependencies.
- You have a monorepo structure for your project (e.g, lerna, yarn workspaces) and `@mui/styles` module is a dependency in more than one package (this one is more or less the same as the previous one).
- You have several applications that are using `@mui/styles` running on the same page (e.g., several entry points in Webpack are loaded on the same page).
- You have a monorepo structure for your project (for example, lerna or yarn workspaces) and `@mui/styles` module is a dependency in more than one package (this one is more or less the same as the previous one).
- You have several applications that are using `@mui/styles` running on the same page (for example, several entry points in Webpack are loaded on the same page).

### Duplicated module in node_modules

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pnpm add @mui/material @mui/styled-engine-sc styled-components

</codeblock>

Next, follow the [styled-components how-to guide](/material-ui/guides/styled-components/) to properly configure your bundler to support `@mui/styled-engine-sc`.
Next, follow the [styled-components how-to guide](/material-ui/integrations/styled-components/) to properly configure your bundler to support `@mui/styled-engine-sc`.

:::error
As of late 2021, [styled-components](https://github.com/styled-components/styled-components) is **not compatible** with server-rendered Material UI projects.
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/guides/composition/composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Now the `CustomComponent` can be used with a `component` prop which should be se
In addition, the `CustomComponent` will have all props of a `<a>` HTML element.
The other props of the `Typography` component will also be present in props of the `CustomComponent`.

You can find a code example with the Button and react-router-dom in [these demos](/material-ui/guides/routing/#component-prop).
You can find a code example with the Button and react-router-dom in [these demos](/material-ui/integrations/routing/#component-prop).

#### Generic

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 @@ -107,4 +107,4 @@ However, Material UI aims to support the [100 most common](https://en.wikipedia
## RTL Support

Right-to-left languages such as Arabic, Persian, or Hebrew are supported.
Follow [this guide](/material-ui/guides/right-to-left/) to use them.
Follow [this guide](/material-ui/customization/right-to-left/) to use them.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export default function GlobalCssSliderDeep() {
### Change the default styled engine

By default, Material UI components come with Emotion as their style engine.
If, however, you would like to use styled-components, you can configure your app by following the [styled-components guide](/material-ui/guides/styled-components/) or starting with one of the example projects:
If, however, you would like to use styled-components, you can configure your app by following the [styled-components guide](/material-ui/integrations/styled-components/) or starting with one of the example projects:

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

Expand Down Expand Up @@ -593,17 +593,17 @@ export default function CssModulesSliderDeep2() {

### The `css` prop

Emotion's **css()** method works seamlessly with Material UI.
Emotion's `css()` method works seamlessly with Material UI.

{{"demo": "EmotionCSS.js", "defaultCodeOpen": true}}

### Theme

It works exactly like styled components. You can [use the same guide](/material-ui/guides/interoperability/#styled-components).
It works exactly like styled components. You can [use the same guide](/material-ui/integrations/interoperability/#styled-components).

### The `styled()` API

It works exactly like styled components. You can [use the same guide](/material-ui/guides/interoperability/#styled-components).
It works exactly like styled components. You can [use the same guide](/material-ui/integrations/interoperability/#styled-components).

## Tailwind CSS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
### 2. Use [tss-react](https://github.com/garronej/tss-react)

:::error
This API will not work if you are [using `styled-components` as the underlying styling engine in place of `@emotion`](/material-ui/guides/interoperability/#styled-components).
This API will not work if you are [using `styled-components` as the underlying styling engine in place of `@emotion`](/material-ui/integrations/interoperability/#styled-components).

Check warning on line 194 in docs/data/material/migration/migration-v4/migrating-from-jss.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/data/material/migration/migration-v4/migrating-from-jss.md", "range": {"start": {"line": 194, "column": 10}}}, "severity": "WARNING"}
:::

The API is similar to JSS `makeStyles`, but under the hood, it uses `@emotion/react`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@

## @material-ui/pickers

We have a [dedicated page](/material-ui/guides/pickers-migration/) for migrating `@material-ui/pickers` to v5.
We have a [dedicated page](/material-ui/migration/pickers-migration/) for migrating `@material-ui/pickers` to v5.

Check warning on line 664 in docs/data/material/migration/migration-v4/v5-style-changes.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.We] Try to avoid using first-person plural like 'We'. Raw Output: {"message": "[Google.We] Try to avoid using first-person plural like 'We'.", "location": {"path": "docs/data/material/migration/migration-v4/v5-style-changes.md", "range": {"start": {"line": 664, "column": 1}}}, "severity": "WARNING"}

## System

Expand Down
101 changes: 63 additions & 38 deletions docs/data/material/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ const pages: MuiPage[] = [
{ pathname: '/material-ui/getting-started/learn' },
{ pathname: '/material-ui/getting-started/design-resources' },
{ pathname: '/material-ui/getting-started/faq', title: 'FAQs' },
{
pathname: '/material-ui/getting-started/understand-mui-packages',
title: 'Understanding MUI packages',
},
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
{ pathname: '/material-ui/getting-started/supported-components' },
{ pathname: '/material-ui/getting-started/supported-platforms' },
{ pathname: '/material-ui/getting-started/support' },
Expand Down Expand Up @@ -158,64 +162,81 @@ const pages: MuiPage[] = [
{
pathname: '/material-ui/customization',
children: [
{ pathname: '/material-ui/customization/how-to-customize' },
{ pathname: '/material-ui/customization/dark-mode' },
{ pathname: '/material-ui/customization/color' },
{ pathname: '/material-ui/customization/right-to-left', title: 'Right-to-left' },
{ pathname: '/material-ui/customization/shadow-dom', title: 'Shadow DOM' },
{
pathname: '/material-ui/customization/theme',
subheader: '/material-ui/customization/theme',
children: [
{ pathname: '/material-ui/customization/theming' },
{ pathname: '/material-ui/customization/default-theme', title: 'Default theme viewer' },
{ pathname: '/material-ui/customization/theming', title: 'Customizing the theme' },
{
pathname: '/material-ui/customization/creating-themed-components',
title: 'Creating themed components',
},
{ pathname: '/material-ui/customization/theme-components', title: 'Components' },
],
},
{
pathname: '/material-ui/customization/tokens',
subheader: 'tokens',
children: [
{ pathname: '/material-ui/customization/palette' },
{ pathname: '/material-ui/customization/dark-mode' },
{ pathname: '/material-ui/customization/typography' },
{ pathname: '/material-ui/customization/spacing' },
{ pathname: '/material-ui/customization/breakpoints' },
{ pathname: '/material-ui/customization/density' },
{ pathname: '/material-ui/customization/z-index', title: 'z-index' },
{ pathname: '/material-ui/customization/transitions' },
{ pathname: '/material-ui/customization/theme-components', title: 'Components' },
{ pathname: '/material-ui/customization/default-theme', title: 'Default theme viewer' },
],
},
{ pathname: '/material-ui/customization/how-to-customize' },
{ pathname: '/material-ui/customization/color' },
],
},
{
pathname: '/material-ui/guides',
title: 'How-to guides',
children: [
{ pathname: '/material-ui/guides/api', title: 'API design approach' },
{
pathname: '/material-ui/guides/creating-themed-components',
title: 'Creating themed components',
pathname: '/material-ui/guides/material-3-components',
title: 'Material 3 components',
newFeature: true,
},
{ pathname: '/material-ui/guides/typescript', title: 'TypeScript' },
{ pathname: '/material-ui/guides/interoperability', title: 'Style library interoperability' },
{ pathname: '/material-ui/guides/styled-components', title: 'Using styled-components' },
{ pathname: '/material-ui/guides/theme-scoping' },
{ pathname: '/material-ui/guides/minimizing-bundle-size' },
{ pathname: '/material-ui/guides/composition' },
{ pathname: '/material-ui/guides/routing' },
{ pathname: '/material-ui/guides/server-rendering' },
{ pathname: '/material-ui/guides/responsive-ui', title: 'Responsive UI' },
{
pathname: '/material-ui/guides/pickers-migration',
title: 'Migration from @material-ui/pickers',
},
{ pathname: '/material-ui/guides/testing' },
{ pathname: '/material-ui/guides/localization' },
{ pathname: '/material-ui/guides/content-security-policy', title: 'Content Security Policy' },
{ pathname: '/material-ui/guides/right-to-left', title: 'Right-to-left support' },
{ pathname: '/material-ui/guides/shadow-dom', title: 'Shadow DOM' },
{ pathname: '/material-ui/guides/api', title: 'API design approach' },
{ pathname: '/material-ui/guides/typescript', title: 'TypeScript' },
{ pathname: '/material-ui/guides/composition' },
{
pathname: '/material-ui/guides/content-security-policy',
title: 'Content Security Policy',
},
],
},
{
pathname: '/material-ui/integrations',
title: 'Integrations',
children: [
{
pathname: '/material-ui/guides/nextjs',
pathname: '/material-ui/integrations/nextjs',
title: 'Next.js integration',
newFeature: true,
},
{ pathname: '/material-ui/integrations/routing', title: 'Routing libraries' },
{
pathname: '/material-ui/guides/material-3-components',
title: 'Material 3 components',
newFeature: true,
pathname: '/material-ui/integrations/styled-components',
title: 'Usage with styled-components',
},
{
pathname: '/material-ui/integrations/interoperability',
title: 'Style library interoperability',
},
{ pathname: '/material-ui/integrations/theme-scoping' },
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
],
},
{
Expand All @@ -241,18 +262,6 @@ const pages: MuiPage[] = [
},
],
},
{
pathname: '/material-ui/discover-more',
children: [
{ pathname: '/material-ui/discover-more/showcase' },
{ pathname: '/material-ui/discover-more/related-projects' },
{ pathname: '/material-ui/discover-more/design-kits' },
{ pathname: '/material-ui/discover-more/roadmap' },
{ pathname: '/material-ui/discover-more/backers', title: 'Sponsors and Backers' },
{ pathname: '/material-ui/discover-more/vision' },
{ pathname: '/material-ui/discover-more/changelog' },
],
},
{
pathname: '/material-ui/migration',
title: 'Migration',
Expand All @@ -261,6 +270,10 @@ const pages: MuiPage[] = [
pathname: '/material-ui/migration/migration-grid-v2',
title: 'Migrating to Grid v2',
},
{
pathname: '/material-ui/migration/pickers-migration',
title: 'Migration from @material-ui/pickers',
},
{
pathname: '/material-ui/migration/v5',
subheader: 'Upgrade to v5',
Expand Down Expand Up @@ -297,6 +310,18 @@ const pages: MuiPage[] = [
},
],
},
{
pathname: '/material-ui/discover-more',
children: [
{ pathname: '/material-ui/discover-more/showcase' },
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
{ pathname: '/material-ui/discover-more/related-projects' },
{ pathname: '/material-ui/discover-more/design-kits' },
{ pathname: '/material-ui/discover-more/roadmap' },
{ pathname: '/material-ui/discover-more/backers', title: 'Sponsors and Backers' },
{ pathname: '/material-ui/discover-more/vision' },
{ pathname: '/material-ui/discover-more/changelog' },
],
},
{
pathname: 'https://mui.com/store/?utm_source=docs&utm_medium=referral&utm_campaign=sidenav',
title: 'Templates',
Expand Down
Loading
Loading