-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Prepare scripts for migrating to new structure #30386
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
0327656
refactor e2e tests
siriwatknp 73c3a3a
refactor findActivePage
siriwatknp dc62e59
add new pages data
siriwatknp 371864b
refactor restructure
siriwatknp 52d2903
mapping api to package
siriwatknp 65b8011
update apiUrl & demoUrl to match new structure
siriwatknp c41f425
support new structure
siriwatknp 70e4f08
add filepath extracter
siriwatknp 4b5ec16
refactor code
siriwatknp d772709
remove unused file
siriwatknp 1eb597c
fix inheritance
siriwatknp c28ea2d
remove unnecessary /
siriwatknp 4286c0c
manually update pages
siriwatknp 97a75a6
fix current e2e tests
siriwatknp ebb2fa4
change feature toggle to commonjs
siriwatknp 71b63d4
use feature toggle when parsing markdown
siriwatknp 956670f
fix build api scripts to support all cases
siriwatknp 36e2323
include preview when migrate to data
siriwatknp 40c9081
add script to turn on enable_product_scope
siriwatknp 7a8d188
fix lint
siriwatknp 79e7bb3
exclude pages.ts for ts formatted
siriwatknp 0683778
fix lint
siriwatknp 23c4a5f
fix syntax not support
siriwatknp ba8c42e
set redirects
siriwatknp 75ba147
fix redirects
siriwatknp 34e626f
replace links in markdown when location is new
siriwatknp c763801
don't replace links
siriwatknp 8c9200b
skip some tests for new structure
siriwatknp 88f1324
Merge branch 'master' of https://github.com/mui-org/material-ui into …
siriwatknp 4115a77
remove url replacement on search
siriwatknp e0e80ed
point translation to new urls
siriwatknp 2091741
use feature toggle and fix e2e
siriwatknp baf0b26
use common js
siriwatknp f5e0b6e
fix lint
siriwatknp 21f8b31
revert the change and fix it in another PR
siriwatknp f7cee97
Merge branch 'master' of https://github.com/mui-org/material-ui into …
siriwatknp 2f3e7f3
unskip e2e tests
siriwatknp 0519f25
remove unused feature toggle
siriwatknp de65ae5
fix `base` related urls
siriwatknp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pagesApi from './pagesApi'; | ||
|
||
const pages = [ | ||
{ | ||
title: 'Component API', | ||
pathname: '/base/api', | ||
icon: 'CodeIcon', | ||
children: pagesApi, | ||
}, | ||
]; | ||
|
||
export default pages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,240 @@ | ||
import pagesApi from './pagesApi'; | ||
|
||
const pages = [ | ||
{ | ||
pathname: '/material/getting-started', | ||
icon: 'DescriptionIcon', | ||
children: [ | ||
{ pathname: '/material/getting-started/installation' }, | ||
{ pathname: '/material/getting-started/usage' }, | ||
{ pathname: '/material/getting-started/example-projects' }, | ||
{ pathname: '/material/getting-started/templates' }, | ||
{ pathname: '/material/getting-started/learn' }, | ||
{ pathname: '/material/getting-started/faq', title: 'FAQs' }, | ||
{ pathname: '/material/getting-started/supported-components' }, | ||
{ pathname: '/material/getting-started/supported-platforms' }, | ||
{ pathname: '/material/getting-started/support' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/react-', | ||
title: 'Components', | ||
icon: 'ToggleOnIcon', | ||
children: [ | ||
{ | ||
pathname: '/material/components/inputs', | ||
subheader: 'inputs', | ||
children: [ | ||
{ pathname: '/material/react-autocomplete' }, | ||
{ pathname: '/material/react-buttons', title: 'Button' }, | ||
{ pathname: '/material/react-button-group' }, | ||
{ pathname: '/material/react-checkboxes', title: 'Checkbox' }, | ||
{ pathname: '/material/react-floating-action-button' }, | ||
{ pathname: '/material/react-radio-buttons', title: 'Radio button' }, | ||
{ pathname: '/material/react-rating' }, | ||
{ pathname: '/material/react-selects', title: 'Select' }, | ||
{ pathname: '/material/react-slider' }, | ||
{ pathname: '/material/react-switches', title: 'Switch' }, | ||
{ pathname: '/material/react-text-fields', title: 'Text field' }, | ||
{ pathname: '/material/react-transfer-list' }, | ||
{ pathname: '/material/react-toggle-button' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/components/data-display', | ||
subheader: 'data-display', | ||
children: [ | ||
{ pathname: '/material/react-avatars', title: 'Avatar' }, | ||
{ pathname: '/material/react-badges', title: 'Badge' }, | ||
{ pathname: '/material/react-chips', title: 'Chip' }, | ||
{ pathname: '/material/react-dividers', title: 'Divider' }, | ||
{ pathname: '/material/react-icons' }, | ||
{ pathname: '/material/react-material-icons' }, | ||
{ pathname: '/material/react-lists', title: 'List' }, | ||
{ pathname: '/material/react-tables', title: 'Table' }, | ||
{ pathname: '/material/react-tooltips', title: 'Tooltip' }, | ||
{ pathname: '/material/react-typography' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/components/feedback', | ||
subheader: 'feedback', | ||
children: [ | ||
{ pathname: '/material/react-alert' }, | ||
{ pathname: '/material/react-backdrop' }, | ||
{ pathname: '/material/react-dialogs' }, | ||
{ pathname: '/material/react-progress' }, | ||
{ pathname: '/material/react-skeleton' }, | ||
{ pathname: '/material/react-snackbars', title: 'Snackbar' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/components/surfaces', | ||
subheader: 'surfaces', | ||
children: [ | ||
{ pathname: '/material/react-accordion' }, | ||
{ pathname: '/material/react-app-bar' }, | ||
{ pathname: '/material/react-cards', title: 'Card' }, | ||
{ pathname: '/material/react-paper' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/components/navigation', | ||
subheader: 'navigation', | ||
children: [ | ||
{ pathname: '/material/react-bottom-navigation' }, | ||
{ pathname: '/material/react-breadcrumbs' }, | ||
{ pathname: '/material/react-drawers', title: 'Drawer' }, | ||
{ pathname: '/material/react-links', title: 'Link' }, | ||
{ pathname: '/material/react-menus', title: 'Menu' }, | ||
{ pathname: '/material/react-pagination' }, | ||
{ pathname: '/material/react-speed-dial' }, | ||
{ pathname: '/material/react-steppers', title: 'Stepper' }, | ||
{ pathname: '/material/react-tabs' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/components/layout', | ||
subheader: 'layout', | ||
children: [ | ||
{ pathname: '/material/react-box' }, | ||
{ pathname: '/material/react-container' }, | ||
{ pathname: '/material/react-grid' }, | ||
{ pathname: '/material/react-stack' }, | ||
{ pathname: '/material/react-image-list' }, | ||
{ pathname: '/material/react-hidden' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/components/utils', | ||
subheader: 'utils', | ||
children: [ | ||
{ pathname: '/material/react-click-away-listener' }, | ||
{ pathname: '/material/react-css-baseline', title: 'CSS Baseline' }, | ||
{ pathname: '/material/react-modal' }, | ||
{ pathname: '/material/react-no-ssr', title: 'No SSR' }, | ||
{ pathname: '/material/react-popover' }, | ||
{ pathname: '/material/react-popper' }, | ||
{ pathname: '/material/react-portal' }, | ||
{ pathname: '/material/react-textarea-autosize' }, | ||
{ pathname: '/material/react-transitions' }, | ||
{ pathname: '/material/react-use-media-query', title: 'useMediaQuery' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/x/data-grid', | ||
subheader: 'data-grid', | ||
}, | ||
{ | ||
pathname: '/material', | ||
subheader: 'lab', | ||
children: [ | ||
{ pathname: '/material/about-the-lab', title: 'About the lab 🧪' }, | ||
{ | ||
pathname: '/material/lab/pickers', | ||
subheader: 'pickers', | ||
title: 'Date / Time', | ||
children: [ | ||
{ pathname: '/material/react-pickers', title: 'Introduction' }, | ||
{ pathname: '/material/react-date-picker' }, | ||
{ | ||
pathname: '/material/react-date-range-picker', | ||
title: 'Date Range Picker ⚡️', | ||
}, | ||
{ pathname: '/material/react-date-time-picker' }, | ||
{ pathname: '/material/react-time-picker' }, | ||
], | ||
}, | ||
{ pathname: '/material/react-masonry' }, | ||
{ pathname: '/material/react-timeline' }, | ||
{ pathname: '/material/react-trap-focus' }, | ||
{ pathname: '/material/react-tree-view' }, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'Component API', | ||
pathname: '/material/api', | ||
icon: 'CodeIcon', | ||
children: [ | ||
...pagesApi, | ||
{ | ||
pathname: '/x/api/mui-data-grid', | ||
title: 'Data Grid', | ||
}, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/customization', | ||
icon: 'CreateIcon', | ||
children: [ | ||
{ | ||
pathname: '/material/customization', | ||
subheader: '/material/customization/theme', | ||
children: [ | ||
{ pathname: '/material/customization/theming' }, | ||
{ pathname: '/material/customization/palette' }, | ||
{ pathname: '/material/customization/dark-mode', title: 'Dark mode' }, | ||
{ pathname: '/material/customization/typography' }, | ||
{ pathname: '/material/customization/spacing' }, | ||
{ pathname: '/material/customization/breakpoints' }, | ||
{ pathname: '/material/customization/density' }, | ||
{ pathname: '/material/customization/z-index', title: 'z-index' }, | ||
{ pathname: '/material/customization/transitions' }, | ||
{ pathname: '/material/customization/theme-components', title: 'Components' }, | ||
{ pathname: '/material/customization/default-theme', title: 'Default Theme' }, | ||
], | ||
}, | ||
{ pathname: '/material/customization/how-to-customize' }, | ||
{ pathname: '/material/customization/color' }, | ||
{ pathname: '/material/customization/unstyled-components' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/guides', | ||
title: 'How To Guides', | ||
icon: 'VisibilityIcon', | ||
children: [ | ||
{ pathname: '/material/guides/api', title: 'API Design Approach' }, | ||
{ pathname: '/material/guides/classname-generator', title: 'ClassName Generator' }, | ||
{ pathname: '/material/guides/understand-mui-packages', title: 'Understand MUI packages' }, | ||
{ pathname: '/material/guides/typescript', title: 'TypeScript' }, | ||
{ pathname: '/material/guides/interoperability', title: 'Style Library Interoperability' }, | ||
{ pathname: '/material/guides/styled-engine' }, | ||
{ pathname: '/material/guides/minimizing-bundle-size' }, | ||
{ pathname: '/material/guides/composition' }, | ||
{ pathname: '/material/guides/routing' }, | ||
{ pathname: '/material/guides/server-rendering' }, | ||
{ pathname: '/material/guides/responsive-ui', title: 'Responsive UI' }, | ||
{ | ||
pathname: '/material/guides/pickers-migration', | ||
title: 'Migration from @material-ui/pickers', | ||
}, | ||
{ pathname: '/material/guides/migration-v4', title: 'Migration From v4' }, | ||
{ pathname: '/material/guides/migration-v3', title: 'Migration From v3' }, | ||
{ pathname: '/material/guides/migration-v0x', title: 'Migration From v0.x' }, | ||
{ pathname: '/material/guides/testing' }, | ||
{ pathname: '/material/guides/localization' }, | ||
{ pathname: '/material/guides/content-security-policy', title: 'Content Security Policy' }, | ||
{ pathname: '/material/guides/right-to-left', title: 'Right-to-left' }, | ||
{ pathname: '/material/guides/flow' }, | ||
], | ||
}, | ||
{ | ||
pathname: '/material/discover-more', | ||
icon: 'AddIcon', | ||
children: [ | ||
{ pathname: '/material/discover-more/showcase' }, | ||
{ pathname: '/material/discover-more/related-projects' }, | ||
{ pathname: '/material/discover-more/roadmap' }, | ||
{ pathname: '/material/discover-more/backers', title: 'Sponsors & Backers' }, | ||
{ pathname: '/material/discover-more/vision' }, | ||
{ pathname: '/material/discover-more/changelog' }, | ||
{ pathname: '/material/discover-more/languages' }, | ||
{ pathname: '/about', title: 'About us' }, | ||
], | ||
}, | ||
]; | ||
|
||
export default pages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const pages = [ | ||
{ | ||
pathname: '/styles', | ||
title: 'Styles (legacy)', | ||
icon: 'StyleIcon', | ||
children: [ | ||
{ pathname: '/styles/basics' }, | ||
{ pathname: '/styles/advanced' }, | ||
{ pathname: '/styles/api', title: 'API' }, | ||
], | ||
}, | ||
]; | ||
|
||
export default pages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const pages = [ | ||
{ | ||
pathname: '/system', | ||
icon: 'BuildIcon', | ||
children: [ | ||
{ pathname: '/system/basics' }, | ||
{ pathname: '/system/properties' }, | ||
{ pathname: '/system/the-sx-prop', title: 'The sx prop' }, | ||
{ pathname: '/system/borders' }, | ||
{ pathname: '/system/display' }, | ||
{ pathname: '/system/flexbox' }, | ||
{ pathname: '/system/grid' }, | ||
{ pathname: '/system/palette' }, | ||
{ pathname: '/system/positions' }, | ||
{ pathname: '/system/shadows' }, | ||
{ pathname: '/system/sizing' }, | ||
{ pathname: '/system/spacing' }, | ||
{ pathname: '/system/screen-readers' }, | ||
{ pathname: '/system/typography' }, | ||
{ pathname: '/system/advanced' }, | ||
{ pathname: '/system/box' }, | ||
{ pathname: '/system/styled', title: 'styled' }, | ||
], | ||
}, | ||
]; | ||
|
||
export default pages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the data-grid pages here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently have data-grid in the components. I group all data-grid related to one link so that the people who are familiar with the previous layout don't confuse.