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

[core][docs] Revise the Container docs #41074

Closed

Conversation

samuelsycamore
Copy link
Member

Part of #35158

The Container doc (shared by Material UI and MUI System) is pretty sparse, and doesn't give the reader a very good idea of why to choose this component over other ostensibly similar wrappers. This PR rewrites the doc to match current formatting standards and offer more guidance on usage.

I don't think the fixed-width demo does a great job of demonstrating its usage (as I understand it anyway), so I need to revise it before this will be ready for review.

@mui-bot
Copy link

mui-bot commented Feb 13, 2024

@@ -7,7 +7,7 @@ githubLabel: 'component: Container'

# Container

<p class="description">The container centers your content horizontally. It's the most basic layout element.</p>
<p class="description">The Container component centers your content horizontally. It's the most basic layout element.</p>
Copy link
Member

@oliviertassinari oliviertassinari Feb 13, 2024

Choose a reason for hiding this comment

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

To match 1:1 the Material UI page.

Suggested change
<p class="description">The Container component centers your content horizontally. It's the most basic layout element.</p>
<p class="description">The Container component centers primary layout elements with a fluid or fixed width.</p>

Overtime, I think we can remove this Material UI page, I believe forcing people to MUI System would be best (forcing them to separate in their mind Material UI and MUI System) like they would between Tailwind CSS and Shadcn UI. In the same way, I would progressively stop reexporting Container from @mui/material, but this requires: #40594 first.

Copy link
Member Author

Choose a reason for hiding this comment

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

FYI, I haven't duplicated the changes from the Material UI page over to the System page in this PR yet. I will probably do another pass on the Material UI page first.

As for removing the Material UI page: I would vote to keep it for as long as the component is reexported from @mui/material—as we've seen with the Box component, many users get confused when the Material UI docs attempt to redirect them to the System docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Container The React component docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants