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

[docs] Improve product identifier #32707

Merged
merged 33 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
004b8ad
initial commit: removing old links and switching to using chips
danilo-leal May 10, 2022
dd71355
remove unused component
danilo-leal May 10, 2022
6c0faa4
Merge branch 'master' of https://github.com/mui/material-ui into impr…
siriwatknp May 17, 2022
db4be56
add useRouterExtra
siriwatknp May 17, 2022
8abae1d
create MuiProductSelector
siriwatknp May 17, 2022
d009eb0
update HeaderNavDropdown
siriwatknp May 17, 2022
3a0e538
Update NavBar
siriwatknp May 17, 2022
57a660e
product selector design tweks
danilo-leal May 17, 2022
2bd166f
tweak a bit more
danilo-leal May 17, 2022
b003087
revise and refine product icons svgs
danilo-leal May 17, 2022
532d7b9
more icons fine tunning
danilo-leal May 17, 2022
7157aef
description color
danilo-leal May 17, 2022
82bfa24
fix lint
danilo-leal May 17, 2022
df53e49
leave the description commented for now
danilo-leal May 19, 2022
0e75a70
change base docs link
danilo-leal May 19, 2022
b92c2f5
fix lint
danilo-leal May 19, 2022
d32c812
Merge branch 'master' of https://github.com/mui/material-ui into impr…
danilo-leal May 19, 2022
0974bb7
make hover consistent
danilo-leal May 20, 2022
98f3fdb
change Joy link to navigate to the Overview page
danilo-leal May 20, 2022
448b870
make sure it works on mobile correctly
danilo-leal May 20, 2022
2cde3a5
extra: change blog links to primary color
danilo-leal May 20, 2022
6b71254
fix spacing
siriwatknp May 20, 2022
53d0737
remove hyphen from "use cases"
danilo-leal May 20, 2022
e2d804f
Merge branch 'master' into improve-product-identifier
danilo-leal May 23, 2022
40bc582
Merge branch 'master' into improve-product-identifier
danilo-leal May 24, 2022
47ba32a
add pointerEvents: 'none',
danilo-leal May 31, 2022
d20acde
fix pointer: none placement
danilo-leal Jun 1, 2022
8fcf7cc
remove redundant code
siriwatknp Jun 2, 2022
0cfa2d3
cleanup comment
siriwatknp Jun 2, 2022
1f94f12
remove pointer-events none
siriwatknp Jun 2, 2022
fe3a976
prevent menu reopen while it is closing
siriwatknp Jun 2, 2022
4c35b40
remove wrong code
siriwatknp Jun 2, 2022
18bc587
fix lint
danilo-leal Jun 2, 2022
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
12 changes: 6 additions & 6 deletions docs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import createEmotionCache from 'docs/src/createEmotionCache';
import BackToTop from 'docs/src/modules/components/BackToTop';
import findActivePage from 'docs/src/modules/utils/findActivePage';
import FEATURE_TOGGLE from 'docs/src/featureToggle';
import useRouterExtra from 'docs/src/modules/utils/useRouterExtra';

// Client-side cache, shared for the whole session of the user in the browser.
const clientSideEmotionCache = createEmotionCache();
Expand Down Expand Up @@ -173,7 +174,7 @@ Tip: you can access the documentation \`theme\` object directly in the console.
function AppWrapper(props) {
const { children, emotionCache, pageProps } = props;

const router = useRouter();
const { asPathWithoutLang, product, ...router } = useRouterExtra();

React.useEffect(() => {
loadDependencies();
Expand All @@ -186,18 +187,17 @@ function AppWrapper(props) {
}
}, []);

const asPathWithoutLang = router.asPath.replace(/^\/[a-zA-Z]{2}\//, '/');
let productPages = pages;
if (asPathWithoutLang.startsWith('/base')) {
if (product === 'base') {
productPages = basePages;
}
if (asPathWithoutLang.startsWith('/material-ui')) {
if (product === 'material-ui') {
productPages = materialPages;
}
if (asPathWithoutLang.startsWith('/joy-ui')) {
if (product === 'joy-ui') {
productPages = joyPages;
}
if (asPathWithoutLang.startsWith('/system') && FEATURE_TOGGLE.enable_system_scope) {
if (product === 'system') {
productPages = systemPages;
}

Expand Down
2 changes: 1 addition & 1 deletion docs/public/static/branding/product-advanced-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/public/static/branding/product-advanced-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/public/static/branding/product-core-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading