Skip to content

Commit

Permalink
[docs] Fix experimental API page duplication (mui#35213)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored and felipe.richter committed Dec 6, 2022
1 parent 9ad7326 commit 2c67150
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 35 deletions.
@@ -1,4 +1,4 @@
# Customization
# CSS theme variables - Customization

<p class="description">A guide for customizing CSS theme variables in Material UI.</p>

Expand Down
@@ -1,4 +1,4 @@
# Migrating to CSS variables
# Migrating to CSS theme variables

<p class="description">A step-by-step migration guide to start using CSS theme variables in your project.</p>

Expand Down
Expand Up @@ -28,8 +28,8 @@ For server-side applications, there are some trade-offs to consider:

| | Compare to the default method | Reason |
| ---------------------------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------ |
| HTML size | bigger | CSS variables are generated for both light and dark mode at build time. |
| [First Contentful Paint (FCP)](https://web.dev/fcp/) | larger | Since the HTML size is generally bigger, the time to download the HTML before showing the content is longer. |
| HTML size | Bigger | CSS variables are generated for both light and dark mode at build time. |
| [First Contentful Paint (FCP)](https://web.dev/fcp/) | Larger | Since the HTML size is generally bigger, the time to download the HTML before showing the content is longer. |
| [Time to Interactive (TTI)](https://web.dev/tti/) | Smaller (for dark mode) | Stylesheets are not regenerated between light and dark mode, so it takes less time for JavaScript to run. |

:::warning
Expand Down
@@ -1,4 +1,4 @@
# Usage
# CSS theme variables - Usage

<p class="description">Learn how to use the experimental APIs to adopt CSS theme variables.</p>

Expand Down
@@ -1,4 +1,4 @@
# CSS variables
# TODO merge with other pages

<p class="description">Learn about the experimental API for using CSS variables with Material UI components.</p>

Expand Down
6 changes: 5 additions & 1 deletion docs/data/material/pages.ts
Expand Up @@ -230,7 +230,11 @@ const pages: MuiPage[] = [
{ pathname: '/material-ui/experimental-api/css-theme-variables/customization' },
{
pathname: '/material-ui/experimental-api/css-theme-variables/migration',
title: 'Migrating to CSS theme variables',
title: 'Migrating to CSS variables',
},
{
pathname: '/material-ui/experimental-api/css-variables',
title: 'TODO merge with other pages',
},
],
},
Expand Down
7 changes: 0 additions & 7 deletions docs/pages/experimental-api/classname-generator.js

This file was deleted.

7 changes: 0 additions & 7 deletions docs/pages/experimental-api/css-variables.js

This file was deleted.

18 changes: 14 additions & 4 deletions docs/public/_redirects
Expand Up @@ -378,18 +378,28 @@ https://v4.material-ui.com/* https://v4.mui.com/:splat 301!
/:lang/joy-ui/core-features/global-variant/ /:langjoy-ui/main-features/global-variants/ 301
/joy-ui/core-features/automatic-adjustment/ /joy-ui/main-features/automatic-adjustment/ 301
/:lang/joy-ui/core-features/automatic-adjustment/ /:lang/joy-ui/main-features/automatic-adjustment/ 301
/joy-ui/core-features/perfect-dark-mode/ /joy-ui/main-features/perfect-dark-mode/ 301
/:lang/joy-ui/core-features/perfect-dark-mode/ /:lang/joy-ui/main-features/perfect-dark-mode/ 301
/joy-ui/core-features/perfect-dark-mode/ /joy-ui/main-features/dark-mode-optimization/ 301
/:lang/joy-ui/core-features/perfect-dark-mode/ /:lang/joy-ui/main-features/dark-mode-optimization/ 301
/system/basics/ /system/getting-started/overview/ 301
/:lang/system/basics/ /:lang/system/getting-started/overview/ 301
/system/the-sx-prop/ /system/getting-started/the-sx-prop/ 301
/:lang/system/the-sx-prop/ /:lang/system/getting-started/the-sx-prop/ 301
/system/advanced/ /system/getting-started/custom-components/ 301
/:lang/base/react-trap-focus/ /:lang/base/react-focus-trap/ 301
/:lang/base/api/trap-focus/ /:lang/base/api/focus-trap/ 301
/:lang/system/advanced/ /:lang/system/getting-started/custom-components/ 301
/base/react-trap-focus/ /base/react-focus-trap/ 301
/:lang/base/react-trap-focus/ /:lang/base/react-focus-trap/ 301
/base/api/trap-focus/ /base/api/focus-trap/ 301
/:lang/base/api/trap-focus/ /:lang/base/api/focus-trap/ 301
/material-ui/experimental-api/css-variables/ /material-ui/experimental-api/css-theme-variables/overview/ 301
/:lang/material-ui/experimental-api/css-variables/ /:lang/material-ui/experimental-api/css-theme-variables/overview/ 301
/joy-ui/main-features/perfect-dark-mode/ /joy-ui/main-features/dark-mode-optimization/ 301
/:lang/joy-ui/main-features/perfect-dark-mode/ /:lang/joy-ui/main-features/dark-mode-optimization/ 301
/joy-ui/guides/applying-dark-mode/ /joy-ui/customization/dark-mode/ 301
/:lang/joy-ui/guides/applying-dark-mode/ /:lang/joy-ui/customization/dark-mode/ 301
/experimental-api/classname-generator/ /material-ui/experimental-api/classname-generator/ 301
/:lang/experimental-api/classname-generator/ /:lang/material-ui/experimental-api/classname-generator/ 301
/experimental-api/css-variables/ /material-ui/experimental-api/css-theme-variables/overview/ 301
/:lang/experimental-api/css-variables/ /:lang/material-ui/experimental-api/css-theme-variables/overview/ 301
# 2023

# Proxies
Expand Down
9 changes: 0 additions & 9 deletions docs/src/pages.ts
Expand Up @@ -280,15 +280,6 @@ const pages: readonly MuiPage[] = [
{ pathname: '/guides/flow' },
],
},
{
pathname: '/experimental-api',
title: 'Experimental APIs',
icon: 'ExperimentIcon',
children: [
{ pathname: '/experimental-api/classname-generator', title: 'ClassName generator' },
{ pathname: '/experimental-api/css-variables', title: 'CSS variables' },
],
},
{
pathname: '/styles',
title: 'Styles',
Expand Down
3 changes: 2 additions & 1 deletion docs/translations/translations.json
Expand Up @@ -345,7 +345,8 @@
"/material-ui/experimental-api/css-theme-variables/overview": "Overview",
"/material-ui/experimental-api/css-theme-variables/usage": "Usage",
"/material-ui/experimental-api/css-theme-variables/customization": "Customization",
"/material-ui/experimental-api/css-theme-variables/migration": "Migrating to CSS theme variables",
"/material-ui/experimental-api/css-theme-variables/migration": "Migrating to CSS variables",
"/material-ui/experimental-api/css-variables": "TODO merge with other pages",
"/material-ui/discover-more": "Discover more",
"/material-ui/discover-more/showcase": "Showcase",
"/material-ui/discover-more/related-projects": "Related projects",
Expand Down

0 comments on commit 2c67150

Please sign in to comment.