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] Markdown redesign polish #27956

Merged
merged 84 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
6e85603
init
mnajdova Aug 25, 2021
98bbbdd
heading colors
danilo-leal Aug 25, 2021
94e827a
table of contents active and hover styles
danilo-leal Aug 25, 2021
aa807c8
code block and code inline typeface
danilo-leal Aug 25, 2021
5c53214
iteration on the app container max width
danilo-leal Aug 25, 2021
43e5dd1
docs footer tweaks
danilo-leal Aug 25, 2021
f1763cb
"edit page" button positioning
danilo-leal Aug 25, 2021
ddbef60
iteration on the navigation sidebar
danilo-leal Aug 25, 2021
7ec2161
minor adjustments and iteration on the blockquote element
danilo-leal Aug 25, 2021
06bce06
app search tweaks
danilo-leal Aug 25, 2021
58c1436
fix runtime error for primaryDark, fix prettier
mnajdova Aug 26, 2021
b2a751d
dark theme creation update
mnajdova Aug 26, 2021
9885ecb
fix table of content
mnajdova Aug 26, 2021
ec93692
inline code adjustments
danilo-leal Aug 26, 2021
b6d6782
wip sidebar
mnajdova Aug 26, 2021
3f3326f
Merge branch 'docs/redesign-third-iteration' of https://github.com/mn…
mnajdova Aug 26, 2021
8a3e336
app container padding
danilo-leal Aug 26, 2021
21f73be
refining the app container max-width
danilo-leal Aug 26, 2021
a665f5e
Merge branch 'docs/redesign-third-iteration' of https://github.com/mn…
danilo-leal Aug 26, 2021
db43108
more spacing tweaks on the app layout docs and table of contents
danilo-leal Aug 26, 2021
7e33c47
minor detail on the toolbar div
danilo-leal Aug 26, 2021
7181e30
navigation sidebar adjustments
danilo-leal Aug 26, 2021
8441b6c
more navigation sidebar adjustments
danilo-leal Aug 26, 2021
c2c35fe
diamond sponsor tweaks
danilo-leal Aug 26, 2021
8754536
color tweaks
danilo-leal Aug 26, 2021
535de59
keyboard nav key color tweaks
danilo-leal Aug 26, 2021
f21eb5f
minor tweak and adding myself to the team page
danilo-leal Aug 26, 2021
f1996d8
small tweaks on the team page
danilo-leal Aug 26, 2021
623395e
polish sidebar, prettier
mnajdova Aug 27, 2021
9856c66
increase diamond sponsors
mnajdova Aug 27, 2021
ac9593f
chevron color
mnajdova Aug 27, 2021
c93edf3
Merge branch 'next' of https://github.com/mui-org/material-ui into do…
siriwatknp Aug 27, 2021
64b7eef
add spacing at the bottom of nav drawer
siriwatknp Aug 27, 2021
07a2d42
add height at the bottom
siriwatknp Aug 27, 2021
e30e366
replace px with rem values
mnajdova Aug 27, 2021
951c492
remove force html font-size and fix code highlight to be dynamic
siriwatknp Aug 27, 2021
1ee8208
Merge branch 'docs/redesign-third-iteration' of https://github.com/mn…
siriwatknp Aug 27, 2021
05241dd
fix font size in Safari
siriwatknp Aug 27, 2021
750a108
reduce table of content font weight and tweak colors
danilo-leal Aug 27, 2021
c9dcfb0
nav drawer item tweak
danilo-leal Aug 27, 2021
8629501
using the pxToRem helper
danilo-leal Aug 27, 2021
574a346
language span font weight
danilo-leal Aug 27, 2021
e430b08
changing the nav icons and other tweaks
danilo-leal Aug 27, 2021
260433b
diamond sponsor iteration
danilo-leal Aug 27, 2021
be4413b
changing from link to button - version button
danilo-leal Aug 27, 2021
8954156
going back to Consolas as typeface for code
danilo-leal Aug 27, 2021
a839e22
fix row category display
siriwatknp Aug 30, 2021
00c0b9d
prettier and fix lint
siriwatknp Aug 30, 2021
27aa020
no need to set font to initial
siriwatknp Aug 30, 2021
c508730
fix Safari code size issue
siriwatknp Aug 30, 2021
2b864eb
iterating code font size
danilo-leal Aug 30, 2021
21093c4
minor color adjustment
danilo-leal Aug 30, 2021
35614a8
spacing minor adjustments
danilo-leal Aug 30, 2021
871ec8e
more minor spacing adjustments and adding svg diamond sponsors logos
danilo-leal Aug 30, 2021
63b7e3b
small details
danilo-leal Aug 30, 2021
9c6013c
table of contents active color adjustment
danilo-leal Aug 30, 2021
e40f197
more small adjustments
danilo-leal Aug 30, 2021
fcba589
PlusJakartaSans for headings
danilo-leal Aug 30, 2021
021824e
refining colors
danilo-leal Aug 30, 2021
a40c48e
link chips smaller
danilo-leal Aug 30, 2021
5b8d54a
minor colors tweaks
danilo-leal Aug 30, 2021
f8aa03f
sneaky home page wording fix
danilo-leal Aug 30, 2021
3722428
heading colors
danilo-leal Aug 30, 2021
c226bfb
Fix layout shift in the AppBar
mnajdova Aug 31, 2021
d30a07c
force dark mode native UI
oliviertassinari Aug 31, 2021
d094c92
toc width fix
danilo-leal Aug 31, 2021
221bb86
Merge branch 'docs/redesign-third-iteration' of https://github.com/mn…
danilo-leal Aug 31, 2021
e22d5b4
yarn prettier
oliviertassinari Aug 31, 2021
7b1b1da
Fix layout shift
oliviertassinari Aug 31, 2021
0114569
remove unused DOM node
oliviertassinari Aug 31, 2021
9e42597
unitless
oliviertassinari Aug 31, 2021
f54bd4f
dead ternary
oliviertassinari Aug 31, 2021
f199d38
We can't use font that are not loaded
oliviertassinari Aug 31, 2021
44b0a39
leverage utils
oliviertassinari Aug 31, 2021
e1e0394
no need for an extra div
oliviertassinari Aug 31, 2021
9ab8a30
we can't use flex gap, it's not supported by all our browser targets
oliviertassinari Aug 31, 2021
6c3b282
avoid repetition
oliviertassinari Aug 31, 2021
db2c679
concentrate styles in the same place
oliviertassinari Aug 31, 2021
1c56bbb
concentrate styles in the same place
oliviertassinari Aug 31, 2021
8e87e5b
remove one DOM node
oliviertassinari Aug 31, 2021
f6ecc26
small color fix
danilo-leal Aug 31, 2021
df92c8e
minor tweaks
danilo-leal Aug 31, 2021
20f1f2f
Merge branch 'next' into docs/redesign-third-iteration
mnajdova Sep 1, 2021
535684f
fix lint
siriwatknp Sep 1, 2021
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
Binary file added docs/public/static/sponsors/doit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/static/sponsors/octopus.png
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/src/modules/brandingTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export const getDesignTokens = (mode: 'light' | 'dark') =>
fontSize: 'clamp(1.5rem, 0.9643rem + 1.4286vw, 2.25rem)',
fontWeight: 800,
lineHeight: 44 / 36,
color: mode === 'dark' ? grey[300] : blue[900],
color: mode === 'dark' ? grey[200] : blueDark[700],
},
h3: {
fontSize: defaultTheme.typography.pxToRem(36),
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/AppLayoutDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const StyledAppContainer = styled(AppContainer, {
},
...(!disableToc && {
[theme.breakpoints.up('sm')]: {
width: `calc(100% - ${TOC_WIDTH}px)`,
maxWidth: '900px',
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
},
}),
}),
Expand Down
28 changes: 11 additions & 17 deletions docs/src/modules/components/AppNavDrawer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import NextLink from 'next/link';
import { styled } from '@material-ui/core/styles';
import List from '@material-ui/core/List';
import Drawer from '@material-ui/core/Drawer';
Expand All @@ -8,6 +9,7 @@ import Divider from '@material-ui/core/Divider';
import useMediaQuery from '@material-ui/core/useMediaQuery';
import Box from '@material-ui/core/Box';
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@material-ui/utils';
import SvgMuiLogo from 'docs/src/icons/SvgMuiLogo';
import DiamondSponsors from 'docs/src/modules/components/DiamondSponsors';
import AppNavDrawerItem from 'docs/src/modules/components/AppNavDrawerItem';
import Link from 'docs/src/modules/components/Link';
Expand Down Expand Up @@ -60,19 +62,9 @@ const ToolbarDiv = styled('div')(({ theme }) => {
paddingLeft: theme.spacing(3),
display: 'flex',
flexGrow: 1,
flexDirection: 'column',
alignItems: 'flex-start',
justifyContent: 'center',
};
});

const TitleLink = styled(Link)(({ theme }) => {
return {
color: theme.palette.text.secondary,
marginBottom: theme.spacing(0.5),
'&:hover': {
color: theme.palette.primary.main,
},
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'flex-start',
};
});

Expand Down Expand Up @@ -172,16 +164,18 @@ function AppNavDrawer(props) {
<React.Fragment>
<ToolbarIE11>
<ToolbarDiv>
<TitleLink href="/" underline="hover" onClick={onClose} variant="h6" color="inherit">
Material-UI
</TitleLink>
<NextLink href="/" passHref onClick={onClose}>
<Box component="a" aria-label="Goto homepage" sx={{ lineHeight: 0, mr: 2 }}>
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
<SvgMuiLogo width={32} />
</Box>
</NextLink>
{process.env.LIB_VERSION ? (
<Link
color="text.secondary"
underline="hover"
variant="caption"
href={`https://material-ui.com${languagePrefix}/versions/`}
onClick={onClose}
sx={{ color: (theme) => (theme.palette.mode === 'dark' ? 'grey.500' : 'grey.800') }}
>
{/* eslint-disable-next-line material-ui/no-hardcoded-labels -- version string is untranslatable */}
{`v${process.env.LIB_VERSION}`}
Expand Down
9 changes: 5 additions & 4 deletions docs/src/modules/components/AppTableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ const NavItem = styled(Link, {
})(({ active, secondary, theme }) => {
const activeStyles = {
borderLeftColor:
theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800],
color: theme.palette.mode === 'dark' ? theme.palette.grey[400] : theme.palette.grey[800],
theme.palette.mode === 'light' ? theme.palette.primary[200] : theme.palette.primary[700],
color: theme.palette.mode === 'dark' ? theme.palette.primary[400] : theme.palette.primary[500],
fontWeight: 600
};

return {
Expand All @@ -58,8 +59,8 @@ const NavItem = styled(Link, {
boxSizing: 'border-box',
'&:hover': {
borderLeftColor:
theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[900],
color: theme.palette.grey[700],
theme.palette.mode === 'light' ? theme.palette.primary[200] : theme.palette.primary[700],
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
color: theme.palette.mode === 'light' ? theme.palette.primary[500] : theme.palette.primary[400],
},
...(!active && {
color: theme.palette.mode === 'dark' ? theme.palette.grey[500] : theme.palette.grey[900],
Expand Down
120 changes: 67 additions & 53 deletions docs/src/modules/components/DiamondSponsors.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import Typography from '@material-ui/core/Typography';
import Grid from '@material-ui/core/Grid';
import Box from '@material-ui/core/Box';
import { useTheme, styled } from '@material-ui/core/styles';
import AddIcon from '@material-ui/icons/Add';
import { useTranslate } from 'docs/src/modules/utils/i18n';

const Root = styled('div')(({ theme }) => ({
'& a': {
display: 'block',
marginBottom: theme.spacing(1),
},
'& img': {
display: 'inline-block',
},
}));

const Placeholder = styled('a')(({ theme }) => ({
width: 125,
height: 35,
width: 40,
height: 40,
fontWeight: 600,
alignItems: 'center',
justifyContent: 'center',
textDecoration: 'none',
borderRadius: theme.shape.borderRadius,
color: theme.palette.divider,
color: theme.palette.mode === 'dark' ? theme.palette.grey[500] : theme.palette.grey[800],
border: `1px dashed ${theme.palette.divider}`,
transition: theme.transitions.create(['color', 'border-color']),
'&&': {
Expand All @@ -40,53 +39,68 @@ export default function DiamondSponsors(props) {

return (
<Root>
<Typography variant="caption" color="text.secondary" display="block" gutterBottom>
<Typography variant="caption" color="primary.main" display="block" gutterBottom>
{t('diamondSponsors')}
</Typography>
<a
data-ga-event-category="sponsor"
data-ga-event-action={spot}
data-ga-event-label="octopus"
href="https://octopus.com/?utm_source=materialui&utm_medium=referral"
rel="noopener noreferrer sponsored"
target="_blank"
style={{ width: 125, height: 35 }}
>
<img
width="125"
height="35"
src={`/static/sponsors/octopus-${theme.palette.mode}.png`}
alt="octopus"
title="Repeatable, reliable deployments"
loading="lazy"
/>
</a>
<a
data-ga-event-category="sponsor"
data-ga-event-action={spot}
data-ga-event-label="doit"
href="https://www.doit-intl.com/?utm_source=materialui&utm_medium=referral"
rel="noopener noreferrer sponsored"
target="_blank"
style={{ width: 125, height: 35 }}
>
<img
width="125"
height="35"
src={`/static/sponsors/doit-intl.png`}
alt="doit-intl"
title="Management Platform for Google Cloud and AWS"
loading="lazy"
/>
</a>
<Placeholder
aria-label={t('diamondSponsors')}
rel="noopener noreferrer"
target="_blank"
href="/discover-more/backers/#diamond"
>
<AddIcon />
</Placeholder>
<Grid container direction="row" alignItems="center" gap={2}>
<Box
component="a"
data-ga-event-category="sponsor"
data-ga-event-action={spot}
data-ga-event-label="octopus"
href="https://octopus.com/?utm_source=materialui&utm_medium=referral"
rel="noopener noreferrer sponsored"
target="_blank"
style={{ width: 40, height: 40 }}
>
<img
width="40"
height="40"
src="/static/sponsors/octopus.png"
alt="octopus"
title="Repeatable, reliable deployments"
loading="lazy"
/>
</Box>
<Box
component="a"
data-ga-event-category="sponsor"
data-ga-event-action={spot}
data-ga-event-label="doit"
href="https://www.doit-intl.com/?utm_source=materialui&utm_medium=referral"
rel="noopener noreferrer sponsored"
target="_blank"
sx={{
width: 40,
height: 40,
pt: '10px',
pl: '5px',
border: `1px solid ${
theme.palette.mode === 'dark'
? theme.palette.primaryDark[700]
: theme.palette.grey[300]
}`,
borderRadius: 0.5,
}}
>
<img
width="30"
height="15"
src={`/static/sponsors/doit.png`}
alt="doit-intl"
title="Management Platform for Google Cloud and AWS"
loading="lazy"
/>
</Box>
<Placeholder
aria-label={t('diamondSponsors')}
rel="noopener noreferrer"
target="_blank"
href="/discover-more/backers/#diamond"
>
+1
</Placeholder>
</Grid>
</Root>
);
}
Expand Down
9 changes: 6 additions & 3 deletions docs/src/modules/components/MarkdownElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const Root = styled('div')(({ theme }) => ({
direction: 'ltr',
lineHeight: 1.4,
display: 'inline-block',
fontFamily: 'Consolas, "Liberation Mono", Menlo, Courier, monospace',
fontFamily: '"IBM Plex Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace',
fontWeight: 600,
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
WebkitFontSmoothing: 'subpixel-antialiased',
padding: '0 5px',
color: theme.palette.text.primary,
Expand All @@ -48,6 +49,8 @@ const Root = styled('div')(({ theme }) => ({
// code blocks
'& pre code': {
fontSize: '.9em',
fontFamily: '"IBM Plex Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace',
danilo-leal marked this conversation as resolved.
Show resolved Hide resolved
fontWeight: 500
},
'& .token.operator': {
background: 'transparent',
Expand All @@ -57,7 +60,7 @@ const Root = styled('div')(({ theme }) => ({
fontSize: 40,
fontFamily: ['"PlusJakartaSans-ExtraBold"'].join(','),
margin: '16px 0',
color: theme.palette.mode === 'dark' ? theme.palette.grey[200] : theme.palette.primary[900],
color: theme.palette.mode === 'dark' ? theme.palette.grey[200] : theme.palette.primaryDark[900],
fontWeight: 800,
},
'& .description': {
Expand All @@ -69,7 +72,7 @@ const Root = styled('div')(({ theme }) => ({
fontSize: 30,
margin: '40px 0 10px',
fontWeight: 500,
color: theme.palette.mode === 'dark' ? theme.palette.grey[300] : theme.palette.grey[900],
color: theme.palette.mode === 'dark' ? theme.palette.grey[200] : theme.palette.primaryDark[700],
},
'& h3': {
...theme.typography.h6,
Expand Down