-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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] Fix template page issues #44466
base: master
Are you sure you want to change the base?
Conversation
Netlify deploy previewhttps://deploy-preview-44466--material-ui.netlify.app/ Bundle size report |
module.exports = { | ||
rules: { | ||
'jsx-a11y/anchor-is-valid': 'off', | ||
}, | ||
}; |
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.
Initially, I wanted to do a small PR, wanted to move this to the root per mui/mui-public#213.
But then realize that this shouldn't be here in the first place. Developers will get the same experience once they copy and paste this into their filesystem.
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; | ||
|
||
export default function FAQ() { | ||
const [expanded, setExpanded] = React.useState<string | false>(false); |
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.
I hate this UX so much anytime I land on a website that does this (FAQ accordions close themselves, let me open everything). I think https://tailwindui.com/all-access or https://mui.com/pricing/ does this right.
import Typography from '@mui/material/Typography'; | ||
|
||
import { styled } from '@mui/material/styles'; | ||
|
||
import ForgotPassword from './ForgotPassword'; | ||
import { GoogleIcon, FacebookIcon, SitemarkIcon } from './CustomIcons'; |
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.
Weird.
viewport: { width: 1680, height: 1092 }, | ||
viewport: { width: 813 * 2, height: 457 * 2 }, |
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.
To match the layout of the page where those are shown.
export default function Templates() { | ||
export default function MaterialFreeTemplatesCollection() { |
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.
Should match the filename
@@ -115,7 +116,8 @@ export default function Templates() { | |||
component="img" | |||
// The image source is generated from `pnpm template:screenshot material-ui`, do not modify the image manually. | |||
image={`/static/screenshots${layout.href.replace(/\/$/, '')}.jpg`} | |||
title={layout.title} | |||
alt={layout.title} | |||
fetchPriority={index === 0 ? 'high' : undefined} |
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.
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.
Oh, annoying vercel/next.js#65161 only really works with React 19.
You can reach our customer support team by emailing | ||
<Link> [email protected] </Link> | ||
or calling our toll-free number. We're here to assist you | ||
You can reach our customer support team by emailing | ||
<Link href="mailto:[email protected]">[email protected]</Link> | ||
or calling our toll-free number. We're here to assist you |
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.
<Link | ||
href={layout.href} |
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.
Make the whole image clickable, reduce the distance the mouse has to travel, so much more enjoyable on my end 😌.
<symbol id="copied-icon" viewBox="0 0 24 24"> | ||
<path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.24 11.28L9.69 11.2c-.38-.39-.38-1.01 0-1.4.39-.39 1.02-.39 1.41 0l1.36 1.37 4.42-4.46c.39-.39 1.02-.39 1.41 0 .38.39.38 1.01 0 1.4l-5.13 5.17c-.37.4-1.01.4-1.4 0zM3 6c-.55 0-1 .45-1 1v13c0 1.1.9 2 2 2h13c.55 0 1-.45 1-1s-.45-1-1-1H5c-.55 0-1-.45-1-1V7c0-.55-.45-1-1-1z" /> | ||
</symbol> | ||
</svg>`); | ||
rendered.unshift(`<svg style="display: none;" xmlns="http://www.w3.org/2000/svg"> | ||
<symbol id="comment-link-icon" viewBox="0 0 24 24"> | ||
<path d="M22.8481 4C22.8481 2.9 21.9481 2 20.8481 2H4.84814C3.74814 2 2.84814 2.9 2.84814 4V16C2.84814 17.1 3.74814 18 4.84814 18H18.8481L22.8481 22V4ZM16.8481 11H13.8481V14C13.8481 14.55 13.3981 15 12.8481 15C12.2981 15 11.8481 14.55 11.8481 14V11H8.84814C8.29814 11 7.84814 10.55 7.84814 10C7.84814 9.45 8.29814 9 8.84814 9H11.8481V6C11.8481 5.45 12.2981 5 12.8481 5C13.3981 5 13.8481 5.45 13.8481 6V9H16.8481C17.3981 9 17.8481 9.45 17.8481 10C17.8481 10.55 17.3981 11 16.8481 11Z" /> | ||
</symbol> | ||
</svg>`); |
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.
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.
Thanks for the improvement! I still have a couple questions, though
docs/data/material/getting-started/templates/blog/components/Footer.js
Outdated
Show resolved
Hide resolved
docs/public/static/screenshots/material-ui/getting-started/templates/marketing-page-dark.jpg
Outdated
Show resolved
Hide resolved
0f7e6a0
to
21d7870
Compare
21d7870
to
83c80e0
Compare
83c80e0
to
4165747
Compare
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.
Cool, great improvement! 👍
Push #44253 forward (so asking a review from the same people).
Preview: https://deploy-preview-44466--material-ui.netlify.app/material-ui/getting-started/templates/
I landed here a bit by chance, I thought I would get a bit in the details 😄