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

[docs] Update unstyled demos to not depend on @material-ui/core #26869

Merged
merged 9 commits into from
Jun 28, 2021

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Jun 21, 2021

@mui-pr-bot
Copy link

mui-pr-bot commented Jun 21, 2021

No bundle size changes (experimental)

Generated by 🚫 dangerJS against 5d0313d

@@ -74,13 +72,15 @@ function BadgeContent() {

export default function UnstyledBadge() {
return (
<Stack spacing={4} direction="row">
Copy link
Member

@oliviertassinari oliviertassinari Jun 21, 2021

Choose a reason for hiding this comment

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

Why not keep the Stack? It's meant as a CSS helper. It might where the limit between @material-ui/system and @material-ui/core is. Developers won't use it when they copy the demo.

Copy link
Member Author

Choose a reason for hiding this comment

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

The goal was to eliminate any dependency on @material-ui/core. Once we have a dedicated doc for the unstyled components I think it would be strange that we have the @material-ui/core as a dependency here. Anyway, no strong opinion as as you mention it is a CSS helper, so I could revert this change.

Copy link
Member

@oliviertassinari oliviertassinari Jun 21, 2021

Choose a reason for hiding this comment

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

Interesting problem, not sure what would be best, no objection to moving forward with your approach.

  • Stack break the system only dependency narrative
  • Stack is superior to Box in this case
  • Stack is not meant to be part of the examples, but to support the demo ("demo" is the whole file, "example" is one instance of the demo".
  • Stack is not available in the system, maybe Grid, Typography, Stack should be in the system, generic style helpers unrelated to Material Design.

We could likely add the Stack back once migrated to the system?

Copy link
Member Author

Choose a reason for hiding this comment

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

Stack is not available in the system, maybe Grid, Typography, Stack should be in the system, generic style helpers unrelated to Material Design.

This makes sense 👍 will leave the comment open for reference, and will keep the demo without the Stack component for now.

Copy link
Member

Choose a reason for hiding this comment

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

What changed now? I remember also trying to remove unrelated components from demos and I think I was shut down.

To be clear: I'm very much in favor of removing unrelated components like Stack or Box because they make the learning curve steeper.

Copy link
Member

Choose a reason for hiding this comment

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

Oops, the conversation got moved to #26869 (comment).

@mnajdova mnajdova marked this pull request as ready for review June 21, 2021 14:28
@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation package: base-ui Specific to @mui/base labels Jun 21, 2021
@oliviertassinari oliviertassinari removed their request for review June 21, 2021 15:10
@mnajdova mnajdova requested a review from siriwatknp June 21, 2021 15:27
@oliviertassinari oliviertassinari deleted the branch mui:next June 22, 2021 00:28
@oliviertassinari oliviertassinari changed the base branch from foo to next June 22, 2021 00:36
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 22, 2021 via email

@eps1lon
Copy link
Member

eps1lon commented Jun 23, 2021

Capture d’écran 2021-06-23 à 14 50 02

It's more descriptive/shorter than a Box with sx.

For you. I guarentee that 99% of developers are more familiar with CSS than what a "Stack" component does.

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 23, 2021

developers are more familiar with CSS than what a "Stack" component does.

@eps1lon How about we use Twitter to resolve the question (what would yield the best DX in the demos)? At the end of the day, we are trying to be a proxy for what the community enjoy more. We can improve our intuition by asking them from time to time, e.g. when we have two distinct version of reality. Do you want to frame the question so that it would match your expectations of non biases in the poll? Otherwise, I can propose something.

@eps1lon
Copy link
Member

eps1lon commented Jun 25, 2021

How about we use Twitter to resolve the question (what would yield the best DX in the demos)?

These are already people following us not new learners.

At the end of the day, we are trying to be a proxy for what the community enjoy more.

I'm not. I try to give people the right tools to build good UIs. The web is for the end-user not the developer.

@mnajdova mnajdova merged commit 9d26bca into mui:next Jun 28, 2021
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 package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants