Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation. label Jan 14, 2024
@mui-bot
Copy link

mui-bot commented Jan 14, 2024

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 16aa6ed

Comment on lines 20 to 23
if (!mounted) {
return null;
return <Button variant="soft">Change mode</Button>;
}
Copy link
Member Author

@oliviertassinari oliviertassinari Jan 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solve layout shift, annoying.


export default function LoginFinal() {
return (
<CssVarsProvider>
Copy link
Member Author

@oliviertassinari oliviertassinari Jan 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicated, global styles are injected twice in the page, creating mess in the dev tools to debug.

Don&apos;t have an account?
<main>
<ModeToggle />
<CssBaseline />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was missing, not following the docs. I noticed because the export to codesandbox wouldn't look the same as in the iframe.

Comment on lines 431 to 438
if (demoOptions.bg == null) {
demoOptions.bg = 'outlined';
}

if (demoOptions.iframe) {
demoOptions.bg = true;
if (demoOptions.iframe) {
demoOptions.bg = true;
}
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Docs-infra bug, even if we set a default background for iframe different than for non-iframe demos, we should still be able to customize it.

Here's what the final product looks like—click on the "Show code" button underneath the demo to see the full source code:

{{"demo": "LoginFinal.js"}}
{{"demo": "LoginFinal.js", "iframe": true, "height": 500, "bg": "outlined"}}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This demo shows a full page. I believe it makes more sense to isolate the code in an iframe.

@oliviertassinari oliviertassinari added the scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). label Jan 20, 2024
@oliviertassinari oliviertassinari merged commit 8f0d955 into mui:master Jan 20, 2024
@oliviertassinari oliviertassinari deleted the joy-iframe branch January 20, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants