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

[core] Batch small changes #800

Merged
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
22 changes: 11 additions & 11 deletions .github/ISSUE_TEMPLATE/1.bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ labels: 'status: needs triage'
Provide a link to a live example (you can use codesandbox.io) and an unambiguous set of steps to reproduce this bug.
Include code to reproduce, if relevant (which it most likely is).

You should use the official codesandbox template as a starting point: https://material-ui.com/r/issue-template
You should use the official codesandbox template as a starting point: https://material-ui.com/r/issue-template-latest

If you have an issue concerning TypeScript please start from this TypeScript playground: https://material-ui.com/r/ts-issue-template

Expand All @@ -54,14 +54,14 @@ Steps:
## Your Environment 🌎

<!--
Include as many relevant details about the environment with which you experienced the bug.
If you encounter issues with TypeScript please include version and tsconfig.
Run `npx @material-ui/envinfo` and post the results.
If you encounter issues with TypeScript please include the used tsconfig.
-->

| Tech | Version |
| ------------- | ------- |
| Material-UI X | v0.?.? |
| React | |
| Browser | |
| TypeScript | |
| etc. | |
<details>
<summary>`npx @material-ui/envinfo`</summary>
```
Don't forget to mention which browser you used.
Output from `npx @material-ui/envinfo` goes here.
```
</details>
331 changes: 57 additions & 274 deletions docs/src/pages.js
Original file line number Diff line number Diff line change
@@ -1,277 +1,60 @@
import findPages from /* preval */ 'docs/src/modules/utils/findPages';
import pages from '@material-ui/monorepo/docs/src/pages';

const pages = [
{
pathname: '/getting-started',
children: [
{ pathname: '/getting-started/installation' },
{ pathname: '/getting-started/usage' },
{ pathname: '/getting-started/example-projects' },
{ pathname: '/getting-started/templates' },
{ pathname: '/getting-started/learn' },
{ pathname: '/getting-started/faq', title: 'FAQs' },
{ pathname: '/getting-started/supported-components' },
{ pathname: '/getting-started/supported-platforms' },
{ pathname: '/getting-started/support' },
],
},
{
pathname: '/components',
children: [
{
pathname: '/components',
subheader: '/components/layout',
children: [
{ pathname: '/components/box' },
{ pathname: '/components/container' },
{ pathname: '/components/grid' },
{ pathname: '/components/grid-list' },
{ pathname: '/components/hidden' },
],
},
{
pathname: '/components',
subheader: '/components/inputs',
children: [
{ pathname: '/components/buttons' },
{ pathname: '/components/button-group' },
{ pathname: '/components/checkboxes' },
{ pathname: '/components/floating-action-button' },
{ pathname: '/components/pickers', title: 'Date / Time' },
{ pathname: '/components/radio-buttons' },
{ pathname: '/components/selects' },
{ pathname: '/components/slider' },
{ pathname: '/components/switches' },
{ pathname: '/components/text-fields' },
{ pathname: '/components/transfer-list' },
],
},
{
pathname: '/components',
subheader: '/components/navigation',
children: [
{ pathname: '/components/bottom-navigation' },
{ pathname: '/components/breadcrumbs' },
{ pathname: '/components/drawers' },
{ pathname: '/components/links' },
{ pathname: '/components/menus' },
{ pathname: '/components/steppers' },
{ pathname: '/components/tabs' },
],
},
{
pathname: '/components',
subheader: '/components/surfaces',
children: [
{ pathname: '/components/app-bar' },
{ pathname: '/components/paper' },
{ pathname: '/components/cards' },
{ pathname: '/components/accordion' },
],
},
{
pathname: '/components',
subheader: '/components/feedback',
children: [
{ pathname: '/components/progress' },
{ pathname: '/components/dialogs' },
{ pathname: '/components/snackbars' },
{ pathname: '/components/backdrop' },
],
},
{
pathname: '/components',
subheader: '/components/data-display',
children: [
{ pathname: '/components/avatars' },
{ pathname: '/components/badges' },
{ pathname: '/components/chips' },
{ pathname: '/components/dividers' },
{ pathname: '/components/icons' },
{ pathname: '/components/material-icons' },
{ pathname: '/components/lists' },
{ pathname: '/components/tables' },
{ pathname: '/components/tooltips' },
{ pathname: '/components/typography' },
],
},
{
pathname: '/components',
subheader: '/components/utils',
children: [
{ pathname: '/components/click-away-listener' },
{ pathname: '/components/css-baseline', title: 'CSS Baseline' },
{ pathname: '/components/modal' },
{ pathname: '/components/no-ssr', title: 'No SSR' },
{ pathname: '/components/popover' },
{ pathname: '/components/popper' },
{ pathname: '/components/portal' },
{ pathname: '/components/textarea-autosize' },
{ pathname: '/components/transitions' },
{ pathname: '/components/use-media-query', title: 'useMediaQuery' },
],
},
{
pathname: '/components',
subheader: '/components/lab',
children: [
{ pathname: '/components/about-the-lab' },
{ pathname: '/components/alert' },
{ pathname: '/components/autocomplete' },
{
pathname: '/components',
subheader: '/components/data-grid',
children:
process.env.PULL_REQUEST === 'false'
? [
{
pathname: '/components/data-grid',
title: 'Overview',
},
{ pathname: '/components/data-grid/getting-started' },
{ pathname: '/components/data-grid/columns' },
{ pathname: '/components/data-grid/rows' },
{ pathname: '/components/data-grid/filtering', title: 'Filtering' },
{ pathname: '/components/data-grid/pagination' },
{ pathname: '/components/data-grid/selection' },
{ pathname: '/components/data-grid/editing', title: '🚧 Editing' },
{ pathname: '/components/data-grid/rendering' },
{ pathname: '/components/data-grid/export', title: '🚧 Export & Import' },
{ pathname: '/components/data-grid/localization', title: 'Localization' },
{ pathname: '/components/data-grid/group-pivot', title: '🚧 Group & Pivot' },
{ pathname: '/components/data-grid/accessibility' },
]
: [
{
pathname: '/components/data-grid',
title: 'Overview',
},
{ pathname: '/components/data-grid/getting-started' },
{ pathname: '/components/data-grid/columns' },
{ pathname: '/components/data-grid/rows' },
{ pathname: '/components/data-grid/filtering', title: 'Filtering' },
{ pathname: '/components/data-grid/pagination' },
{ pathname: '/components/data-grid/selection' },
{ pathname: '/components/data-grid/editing', title: '🚧 Editing' },
{ pathname: '/components/data-grid/rendering' },
{ pathname: '/components/data-grid/export', title: '🚧 Export & Import' },
{ pathname: '/components/data-grid/localization', title: 'Localization' },
{ pathname: '/components/data-grid/group-pivot', title: '🚧 Group & Pivot' },
{ pathname: '/components/data-grid/accessibility' },
],
},
{ pathname: '/components/pagination' },
{ pathname: '/components/rating' },
{ pathname: '/components/skeleton' },
{ pathname: '/components/speed-dial' },
{ pathname: '/components/timeline' },
{ pathname: '/components/toggle-button' },
{ pathname: '/components/tree-view' },
],
},
],
},
{
title: 'Component API',
pathname: '/api-docs',
children: [
...findPages[0].children,
{ pathname: '/api-docs/data-grid' },
{ pathname: '/api-docs/x-grid' },
],
},
{
pathname: '/styles',
children: [
{ pathname: '/styles/basics' },
{ pathname: '/styles/advanced' },
{ pathname: '/styles/api', title: 'API' },
],
},
{
pathname: '/system',
children: [
{ pathname: '/system/basics' },
{ pathname: '/system/borders' },
{ pathname: '/system/display' },
{ pathname: '/system/flexbox' },
{ pathname: '/system/palette' },
{ pathname: '/system/positions' },
{ pathname: '/system/shadows' },
{ pathname: '/system/sizing' },
{ pathname: '/system/spacing' },
{ pathname: '/system/screen-readers' },
{ pathname: '/system/typography' },
{ pathname: '/system/api', title: 'API' },
],
},
{
pathname: '/customization',
children: [
{
pathname: '/customization',
subheader: '/customization/theme',
children: [
{ pathname: '/customization/theming' },
{ pathname: '/customization/palette' },
{ pathname: '/customization/typography' },
{ pathname: '/customization/spacing' },
{ pathname: '/customization/breakpoints' },
{ pathname: '/customization/density' },
{ pathname: '/customization/z-index', title: 'z-index' },
{ pathname: '/customization/globals' },
{ pathname: '/customization/transitions' },
],
},
{ pathname: '/customization/components' },
{ pathname: '/customization/color' },
{ pathname: '/customization/default-theme', title: 'Default Theme' },
],
},
{
pathname: '/guides',
children: [
{ pathname: '/guides/api', title: 'API Design Approach' },
{ pathname: '/guides/typescript', title: 'TypeScript' },
{ pathname: '/guides/interoperability', title: 'Style Library Interoperability' },
{ pathname: '/guides/minimizing-bundle-size' },
{ pathname: '/guides/composition' },
{ pathname: '/guides/server-rendering' },
{ pathname: '/guides/responsive-ui', title: 'Responsive UI' },
{ pathname: '/guides/migration-v4', title: 'Migration From v4' },
{ pathname: '/guides/migration-v3', title: 'Migration From v3' },
{ pathname: '/guides/migration-v0x', title: 'Migration From v0.x' },
{ pathname: '/guides/testing' },
{ pathname: '/guides/localization' },
{ pathname: '/guides/right-to-left', title: 'Right-to-left' },
{ pathname: '/guides/flow' },
],
},
{
pathname: 'https://material-ui.com/store/',
title: 'Premium themes',
linkProps: {
'data-ga-event-category': 'store',
'data-ga-event-action': 'click',
'data-ga-event-label': 'sidenav',
},
},
{
pathname: '/discover-more',
children: [
{ pathname: '/discover-more/showcase' },
{ pathname: '/discover-more/related-projects' },
{ pathname: '/discover-more/roadmap' },
{ pathname: '/discover-more/backers', title: 'Sponsors & Backers' },
{ pathname: '/discover-more/vision' },
{ pathname: '/discover-more/team' },
{ pathname: '/discover-more/changelog' },
{ pathname: '/discover-more/languages' },
],
},
{ pathname: '/versions', disableNav: true },
{ pathname: '/', displayNav: false, disableDrawer: true },
{ pathname: 'https://medium.com/material-ui', title: 'Blog' },
];
const components = pages[1];

if (components.pathname !== '/components') {
throw new Error('Integration not compatible.');
}

const lab = components.children[components.children.length - 1];

if (lab.subheader !== '/components/lab') {
throw new Error('Integration not compatible.');
}

const datagrid = lab.children[3];

if (datagrid.subheader !== '/components/data-grid') {
throw new Error('Integration not compatible.');
}

datagrid.children =
process.env.PULL_REQUEST === 'false'
? [
{
pathname: '/components/data-grid',
title: 'Overview',
},
{ pathname: '/components/data-grid/getting-started' },
{ pathname: '/components/data-grid/columns' },
{ pathname: '/components/data-grid/rows' },
{ pathname: '/components/data-grid/filtering', title: 'Filtering' },
{ pathname: '/components/data-grid/pagination' },
{ pathname: '/components/data-grid/selection' },
{ pathname: '/components/data-grid/editing', title: '🚧 Editing' },
{ pathname: '/components/data-grid/rendering' },
{ pathname: '/components/data-grid/export', title: '🚧 Export & Import' },
{ pathname: '/components/data-grid/localization', title: 'Localization' },
{ pathname: '/components/data-grid/group-pivot', title: '🚧 Group & Pivot' },
{ pathname: '/components/data-grid/accessibility' },
]
: [
{
pathname: '/components/data-grid',
title: 'Overview',
},
{ pathname: '/components/data-grid/getting-started' },
{ pathname: '/components/data-grid/columns' },
{ pathname: '/components/data-grid/rows' },
{ pathname: '/components/data-grid/filtering', title: 'Filtering' },
{ pathname: '/components/data-grid/pagination' },
{ pathname: '/components/data-grid/selection' },
{ pathname: '/components/data-grid/editing', title: '🚧 Editing' },
{ pathname: '/components/data-grid/rendering' },
{ pathname: '/components/data-grid/export', title: '🚧 Export & Import' },
{ pathname: '/components/data-grid/localization', title: 'Localization' },
{ pathname: '/components/data-grid/group-pivot', title: '🚧 Group & Pivot' },
{ pathname: '/components/data-grid/accessibility' },
];

export default pages;