-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
[website] Fix a few regression #38050
Conversation
3649651
to
2f5d308
Compare
Netlify deploy preview
Bundle size report |
2f5d308
to
ac9efe8
Compare
@@ -228,7 +246,7 @@ export default function MarkdownDocsV2(props) { | |||
> | |||
{disableAd ? null : ( | |||
<BrandingProvider> | |||
<AdGuest classSelector=".component-tabs"> | |||
<AdGuest classSelector={hasTabs ? '.component-tabs' : 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.
Fix the missing ad in https://mui.com/base-ui/all-components/.
@@ -86,7 +86,7 @@ export default function DiamondSponsors() { | |||
(theme) => ({ | |||
'& a': { | |||
width: '100%', | |||
height: { xs: 40, sm: 50 }, | |||
height: { xs: 40, sm: 45 }, |
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'm struggling with the diamond sponsors at the bottom, the UX issue for me is when I expand a side nav I don't have enough vertical height to browse the list comfortably (desktop)
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.
Seems aligned with what a community member is feeling too (#38033)... I'm considering changing it.
@@ -47,7 +47,7 @@ export default function HeroContainer({ | |||
|
|||
const renderRightWrapper = (sx?: BoxProps['sx']) => ( | |||
<Box | |||
id="hero-container-right-area" | |||
ref={frame} |
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.
Open https://mui.com/, you can Tab between the different elements in the hero.
<Typography variant="h2" sx={{ textAlign: 'center' }} gutterBottom> | ||
Ready to use components, | ||
<br /> |
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 is a missing space in https://mui.com/core/, but new line feels even better.
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.
Much better, good catch!
@@ -76,7 +76,7 @@ function ProductItem({ | |||
event.stopPropagation(); | |||
}} | |||
> | |||
<span>Learn more</span>{' '} | |||
<span>Learn more</span> <Box sx={visuallyHidden}>{label}</Box> |
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.
import * as React from 'react'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocsV2'; | ||
import AppFrame from 'docs/src/modules/components/AppFrame'; | ||
import * as pageProps from 'docs/data/base/getting-started/customization/customization.md?@mui/markdown'; | ||
|
||
export default function Page() { | ||
return <MarkdownDocs {...pageProps} />; | ||
} | ||
|
||
Page.getLayout = (page) => { | ||
return <AppFrame>{page}</AppFrame>; | ||
}; |
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.
What I believe we should do on ALL the pages of the docs. It's a continuation from #35938 (comment).
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.
@alexfauquette I have tested https://www.notion.so/mui-org/Migrate-all-pages-to-Page-getLayout-212d920a9ab245f08ac3a2aea874f1bc with a few more pages. I had to fix 2 bugs in MarkdownDocsV2
(ad & codeblocks) but so far so good. The improvement is quite noticeable (before -> after):
I also love how the layout is stable (no more search flash, no more badge notification flash, etc.)
It will be a great step for https://www.notion.so/mui-org/Docs-page-transition-performance-regression-b9e887541f5e4380b991ba173f4c0f6e but I doubt it will be enough. Maybe Romain would enjoy this challenge, he has proven on the data grid that he's more than capable 😁.
46b004d
to
135d38d
Compare
135d38d
to
e14c641
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.
Some tiny considerations!
@@ -86,7 +86,7 @@ export default function DiamondSponsors() { | |||
(theme) => ({ | |||
'& a': { | |||
width: '100%', | |||
height: { xs: 40, sm: 50 }, | |||
height: { xs: 40, sm: 45 }, |
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.
Seems aligned with what a community member is feeling too (#38033)... I'm considering changing it.
color: 'primary.300', | ||
borderColor: 'primaryDark.600', | ||
backgroundColor: alpha(theme.palette.primaryDark[700], 0.4), | ||
backgroundColor: theme.palette.primaryDark[700], |
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.
Any reason to remove the background opacity?
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'm outdoor, I could not see the difference, but no objections to revert.
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'm happy to change it, just wanted to know if there was a reason!
{rendered.map((renderedMarkdownOrDemo, index) => { | ||
if (typeof renderedMarkdownOrDemo === 'string') { | ||
return ( | ||
<Wrapper key={index} {...(isJoy && { mode: theme.palette.mode })}> | ||
<MarkdownElement renderedMarkdown={renderedMarkdownOrDemo} /> | ||
</Wrapper> | ||
); | ||
} | ||
|
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.
This duplication was not great, we introduced the support for "codeblock" here and forgot about the V2 🙈
|
||
export default function DemosDocs(props) { | ||
const { WrapperComponent: Wrapper, wrapperProps, rendered = [], ...rest } = props; | ||
return ( | ||
<React.Fragment key="demos-docs"> | ||
{rendered.map((renderedMarkdownOrDemo, index) => { | ||
return ( | ||
<MarkdownElement |
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.
dead code
activeTab={activeTab} | ||
setActiveTab={setActiveTab} |
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.
Dead code
mt: 1, | ||
pt: 0.5, | ||
pb: 0.5, |
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.
Much better indeed!
MarkdownElementV2.propTypes = { | ||
RichMarkdownElement.propTypes = { |
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.
The name wa wrong, it's not the same level of abstraction.
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 explaining some of the changes in the comments ⎯ it's a good learning resource! 🤙
I'm excited about these fixes, it's cleaner 😌 |
https://deploy-preview-38050--material-ui.netlify.app/