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 82 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.
3 changes: 3 additions & 0 deletions docs/public/static/sponsors/doit.svg
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.
3 changes: 3 additions & 0 deletions docs/public/static/sponsors/octopus.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/src/components/header/ThemeModeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ThemeModeToggle = (props: { checked: boolean; onChange: (checked: boolean)
bgcolor: (theme) => (theme.palette.mode === 'dark' ? 'primaryDark.700' : 'transparent'),
borderColor: (theme) => (theme.palette.mode === 'dark' ? 'primaryDark.500' : 'grey.200'),
'& svg': {
fontSize: 18,
fontSize: (theme) => theme.typography.pxToRem(18),
},
}}
>
Expand Down
5 changes: 4 additions & 1 deletion docs/src/components/home/AdvancedShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ export default function DataTable() {
boxShadow: '0px 4px 20px rgb(61 71 82 / 25%)',
borderRadius: '10px',
'& .MuiMenuItem-root': {
fontSize: 12,
fontSize: '0.75rem',
},
},
}}
Expand Down Expand Up @@ -2066,6 +2066,9 @@ export default function DataTable() {
'&::-webkit-scrollbar': {
display: 'none',
},
'& code[class*="language-"]': {
fontSize: 'inherit',
},
},
}}
>
Expand Down
11 changes: 7 additions & 4 deletions docs/src/components/home/CoreShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const FlashCode = styled('div', {
position: 'absolute',
left: 0,
right: 0,
top: startLine * 18,
height: (endLine - startLine + 1) * 18,
top: `calc(0.75rem * 1.5 * ${startLine})`,
height: `calc(0.75rem * 1.5 * ${endLine - startLine + 1})`,
transition: '0.3s',
...theme.typography.caption,
backgroundColor: alpha(theme.palette.primary.main, 0.2),
Expand Down Expand Up @@ -226,8 +226,8 @@ export default function CoreShowcase() {
noWrap
sx={{ opacity: 0.5 }}
>
<TouchAppRounded sx={{ fontSize: 14, verticalAlign: 'text-bottom' }} /> Hover the
component to highlight the code.
<TouchAppRounded sx={{ fontSize: '0.875rem', verticalAlign: 'text-bottom' }} /> Hover
the component to highlight the code.
</Typography>
</Box>
<ThemeProvider theme={theme}>
Expand Down Expand Up @@ -287,6 +287,9 @@ export default function CoreShowcase() {
'&::-webkit-scrollbar': {
display: 'none',
},
'& code[class*="language-"]': {
fontSize: 'inherit',
},
},
}}
>
Expand Down
8 changes: 4 additions & 4 deletions docs/src/components/home/MaterialDesignComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ function buildTheme(theme: Theme): ThemeOptions {
},
iconSizeSmall: {
'& > *:nth-of-type(1)': {
fontSize: 14,
fontSize: '0.875rem',
},
},
iconSizeMedium: {
'& > *:nth-of-type(1)': {
fontSize: 16,
fontSize: '1rem',
},
},
},
Expand Down Expand Up @@ -299,7 +299,7 @@ function buildTheme(theme: Theme): ThemeOptions {
paddingTop: 1,
paddingBottom: 0,
'& > *': {
fontSize: 18,
fontSize: '1.125rem',
},
},
},
Expand Down Expand Up @@ -382,7 +382,7 @@ function buildTheme(theme: Theme): ThemeOptions {
root: {
padding: theme.spacing(1, 2),
'& svg': {
fontSize: 18,
fontSize: '1.125rem',
color:
theme.palette.mode === 'dark'
? theme.palette.primary[500]
Expand Down
6 changes: 3 additions & 3 deletions docs/src/components/home/References.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const References = ({
minHeight: 42, // a hack to reduce CLS (layout shift)
mt: 4,
mx: 'auto',
maxWidth: 450,
maxWidth: 400,
}}
>
From startups to Fortune 500s, the world&apos;s best product teams leverage MUI to build
their UIs.
From startups to Fortune 500s, the world&apos;s best product teams use MUI to build their
UIs.
</Typography>
</Container>
);
Expand Down
1 change: 1 addition & 0 deletions docs/src/components/pricing/PricingTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ const RowCategory = (props: BoxProps) => (
{...props}
sx={{
typography: 'caption',
display: 'block',
fontWeight: 500,
bgcolor: (theme) => (theme.palette.mode === 'dark' ? 'primaryDark.900' : 'grey.50'),
py: 1,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/showcase/NotificationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default function NotificationCard() {
variants: [
{
props: { variant: 'notification' },
style: { color: '#fff', fontSize: 12, height: 18 },
style: { color: '#fff', fontSize: '0.75rem', height: 18 },
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/showcase/ThemeChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function ThemeChip() {
styleOverrides: {
label: {
marginBottom: '1px',
fontSize: 14,
fontSize: '0.875rem',
lineHeight: 1.5,
fontWeight: 600,
},
Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/branding/CommunitySayCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export default function CommunitySayCard(props: CommunitySayCardProps) {
>
<img loading="lazy" src={avatar} width="48" height="48" alt={`${name} avatar`} />
</Avatar>
<Box sx={{ fontSize: 16, lineHeight: '24px' }}>
<Box sx={{ fontSize: '1rem', lineHeight: '24px' }}>
<Typography sx={{ fontWeight: 'bold' }}>{name}</Typography>
<Typography sx={{ fontSize: 16 }}>{id}</Typography>
<Typography sx={{ fontSize: '1rem' }}>{id}</Typography>
</Box>
</Box>
</Box>
Expand Down
10 changes: 6 additions & 4 deletions docs/src/modules/brandingTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { deepmerge } from '@material-ui/utils';
import { createTheme, ThemeOptions, Theme } from '@material-ui/core/styles';
import { deepmerge } from '@material-ui/utils';

declare module '@material-ui/core/styles/createPalette' {
interface ColorRange {
Expand Down Expand Up @@ -68,7 +68,7 @@ const blue = {
800: '#004C99',
900: '#003A75',
};
const blueDark = {
export const blueDark = {
50: '#E2EDF8',
100: '#CEE0F3',
200: '#91B9E3',
Expand Down Expand Up @@ -404,6 +404,8 @@ export function getThemedComponents(theme: Theme) {
MuiPaper: {
styleOverrides: {
root: {
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.primaryDark[900] : '#fff',
'&[href]': {
textDecorationLine: 'none',
},
Expand Down Expand Up @@ -444,7 +446,7 @@ export function getThemedComponents(theme: Theme) {
styleOverrides: {
root: {
backgroundColor:
theme.palette.mode === 'dark' ? theme.palette.primaryDark[800] : '#fff',
theme.palette.mode === 'dark' ? theme.palette.primaryDark[900] : '#fff',
},
},
},
Expand All @@ -465,7 +467,7 @@ export function getThemedComponents(theme: Theme) {
backgroundColor:
theme.palette.mode === 'dark'
? theme.palette.primary[800]
: theme.palette.primaryDark[50],
: theme.palette.primary[50],
},
},
},
Expand Down
10 changes: 5 additions & 5 deletions docs/src/modules/components/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import Container from '@material-ui/core/Container';

const StyledContainer = styled(Container)(({ theme }) => {
return {
paddingTop: 80 + 16,
paddingTop: 80 + 20,
[theme.breakpoints.up('md')]: {
// We're mostly hosting text content so max-width by px does not make sense considering font-size is system-adjustable.
// 120ch960px (theme.breakpoints.values.md) using 16px Roboto
// 94ch902px (theme.breakpoints.values.md) using 16px IBM Plex Sans
// TODO Does it make sense to create breakpoints based on `ch`?
maxWidth: '120ch',
maxWidth: '94ch',
},
[theme.breakpoints.up('lg')]: {
paddingLeft: theme.spacing(6),
paddingRight: theme.spacing(6),
paddingLeft: theme.spacing(8),
paddingRight: theme.spacing(8),
},
};
});
Expand Down
3 changes: 2 additions & 1 deletion docs/src/modules/components/AppFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const GrowingDiv = styled('div')({
const LanguageSpan = styled('span')(({ theme }) => {
return {
display: 'none',
fontWeight: theme.typography.fontWeightMedium,
[theme.breakpoints.up('md')]: {
display: 'block',
},
Expand Down Expand Up @@ -252,6 +253,7 @@ function AppFrame(props) {
</NavIconButton>
<GrowingDiv />
<Stack direction="row" gap={2.5}>
<DeferredAppSearch />
<Tooltip title={t('appFrame.changeLanguage')} enterDelay={300}>
<Button {...languageButtonProps} sx={{ display: { xs: 'none', md: 'flex' } }}>
<LanguageSpan sx={{ display: { xs: 'none', md: 'block' } }}>
Expand Down Expand Up @@ -314,7 +316,6 @@ function AppFrame(props) {
</MenuItem>
</Menu>
</NoSsr>
<DeferredAppSearch />
<Tooltip title={t('appFrame.github')} enterDelay={300}>
<IconButton
component="a"
Expand Down
11 changes: 9 additions & 2 deletions docs/src/modules/components/AppLayoutDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import AdManager from 'docs/src/modules/components/AdManager';
import AdGuest from 'docs/src/modules/components/AdGuest';
import AppLayoutDocsFooter from 'docs/src/modules/components/AppLayoutDocsFooter';

const TOC_WIDTH = 175;
const TOC_WIDTH = 210;
const NAV_WIDTH = 240;

const Main = styled('main', {
Expand Down Expand Up @@ -50,13 +50,20 @@ const StyledAppContainer = styled(AppContainer, {
width: `calc(100% - ${TOC_WIDTH}px)`,
},
}),
...(!disableToc && {
[theme.breakpoints.up('lg')]: {
paddingLeft: '60px',
paddingRight: '60px',
},
}),
}),
};
});

const ActionsDiv = styled('div')({
position: 'absolute',
right: 16,
right: 20,
top: 120,
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
Expand Down
15 changes: 9 additions & 6 deletions docs/src/modules/components/AppLayoutDocsFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,18 @@ const PaginationDiv = styled('div')(({ theme }) => {
const PageLinkButton = styled(Button)(({ theme }) => {
return {
textTransform: 'none',
fontWeight: theme.typography.fontWeightRegular,
fontWeight: theme.typography.fontWeightMedium,
color: theme.palette.mode === 'dark' ? theme.palette.primary[300] : theme.palette.primary[500],
};
});

const FeedbackGrid = styled(Grid)(({ theme }) => {
return {
width: 'auto',
color: theme.palette.text.secondary,
[theme.breakpoints.down('sm')]: {
order: 3,
marginTop: 40,
width: '100%',
},
};
Expand Down Expand Up @@ -253,7 +256,7 @@ export default function AppLayoutDocsFooter() {
component={Link}
noLinkStyle
href={prevPage.pathname}
size="large"
size="medium"
startIcon={<ChevronLeftIcon />}
>
{pageToTitleI18n(prevPage, t)}
Expand All @@ -272,19 +275,19 @@ export default function AppLayoutDocsFooter() {
align="center"
component="div"
id="feedback-message"
variant="subtitle1"
variant="body2"
>
{t('feedbackMessage')}
</FeedbackMessage>
<div>
<Tooltip title={t('feedbackYes')}>
<IconButton onClick={handleClickThumb(1)} aria-pressed={rating === 1}>
<ThumbUpIcon color={rating === 1 ? 'primary' : undefined} />
<ThumbUpIcon fontSize="small" color={rating === 1 ? 'primary' : undefined} />
</IconButton>
</Tooltip>
<Tooltip title={t('feedbackNo')}>
<IconButton onClick={handleClickThumb(0)} aria-pressed={rating === 0}>
<ThumbDownIcon color={rating === 0 ? 'error' : undefined} />
<ThumbDownIcon fontSize="small" color={rating === 0 ? 'error' : undefined} />
</IconButton>
</Tooltip>
</div>
Expand All @@ -294,7 +297,7 @@ export default function AppLayoutDocsFooter() {
component={Link}
noLinkStyle
href={nextPage.pathname}
size="large"
size="medium"
endIcon={<ChevronRightIcon />}
>
{pageToTitleI18n(nextPage, t)}
Expand Down
Loading