Skip to content

[docs] Full screen demos in new tab #46088

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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

cherniavskii
Copy link
Member

@cherniavskii cherniavskii commented May 5, 2025

@cherniavskii cherniavskii added docs Improvements or additions to the documentation enhancement This is not a bug, nor a new feature labels May 5, 2025
@mui-bot
Copy link

mui-bot commented May 5, 2025

Netlify deploy preview

https://deploy-preview-46088--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against b637287

@oliviertassinari oliviertassinari added the scope: docs-infra Specific to the docs-infra product label May 5, 2025
@cherniavskii cherniavskii marked this pull request as ready for review May 7, 2025 11:53
@@ -127,6 +127,7 @@ export default withDocsInfra({
{
loader: require.resolve('@mui/internal-markdown/loader'),
options: {
enableOpenInNewTab: 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.

I made it opt-in; the "Open in new tab" button in the demo toolbar is not shown by default.
But the ?scopedDemo URL is supported regardless of this setting.

I don't know if the Core wants to have this enabled for the whole repo.
You can disable enableOpenInNewTab and enable it for specific pages like this:

import * as pageProps from 'docs/data/material/components/drawers/drawers.md?muiMarkdown';

export default function Page() {
  return <MarkdownDocs {...pageProps} enableOpenInNewTab />;
}

This could be particularly useful for pages like https://mui.com/material-ui/react-drawer/

Let me know if you have a preference for this setting, and I'll update the PR accordingly.

@cherniavskii cherniavskii requested a review from a team May 7, 2025 12:02
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 enhancement This is not a bug, nor a new feature scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants