-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
[docs] Fix versions page #48261
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
Open
mnajdova
wants to merge
26
commits into
mui:master
Choose a base branch
from
mnajdova:docs/versions-page-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[docs] Fix versions page #48261
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
dc3ef8d
[docs] Move versions pages under Material UI and fix some issues
mnajdova d2ba916
remove unneded whitelist
mnajdova 07661a8
cleanup
mnajdova 2e396b4
move generateVersions to a docs utils package
mnajdova f154e9d
update release timeline
mnajdova fffd9ce
move dependency to depcencies not devDepecendecies
mnajdova 85c48b7
dedupe & fix
mnajdova eb120b0
move generateVersions to core internal docs
mnajdova 0274aad
CI fixes
mnajdova 120f001
non-breaking spaces
mnajdova 68afbb9
broken links
mnajdova bfd5cab
next branch
mnajdova 79e589e
more links fixes
mnajdova f40b2af
don't add regression tests for the versions apges
mnajdova 684d277
trailing slash
mnajdova ca410a8
lint
mnajdova de7d5a6
more fixes
mnajdova 5f92ee5
change translations path
mnajdova fb5e942
versions select
mnajdova c524629
prettier
mnajdova 4dea0f2
use JSON file
mnajdova 12d028e
Apply suggestion from @mnajdova
mnajdova 4b1ef3e
Apply suggestion from @mnajdova
mnajdova a13ab1e
Apply suggestion from @mnajdova
mnajdova 4053f65
Merge branch 'master' into docs/versions-page-fixes
mnajdova efd4bb2
import fix
mnajdova 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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
File renamed without changes.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,29 @@ | ||
| import * as React from 'react'; | ||
| import { MarkdownDocs } from '@mui/internal-core-docs/MarkdownDocs'; | ||
| import VersionsContext from 'docs/pages/material-ui/getting-started/VersionsContext'; | ||
| import * as pageProps from 'docs/data/material/getting-started/versions/versions.md?muiMarkdown'; | ||
|
|
||
| async function fetchVersions() { | ||
| if (process.env.NODE_ENV !== 'production') { | ||
| return (await import('../../../versions.json')).default; | ||
| } | ||
| // #target-branch-reference | ||
| const response = await fetch( | ||
| 'https://raw.githubusercontent.com/mui/material-ui/master/docs/versions.json', | ||
| ); | ||
| return response.json(); | ||
| } | ||
|
|
||
| export default function Page() { | ||
| const [versions, setVersions] = React.useState([]); | ||
|
|
||
| React.useEffect(() => { | ||
| fetchVersions().then(setVersions); | ||
| }, []); | ||
|
|
||
| return ( | ||
| <VersionsContext.Provider value={versions}> | ||
| <MarkdownDocs {...pageProps} /> | ||
| </VersionsContext.Provider> | ||
| ); | ||
| } | ||
Oops, something went wrong.
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.
Looks like this function is duplicated on _app.tsx as well