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

[material-ui][Progress] Add Circular progress gradient demo from Github comment #40559

Merged
merged 4 commits into from
Mar 14, 2024

Conversation

DiegoAndai
Copy link
Member

@DiegoAndai DiegoAndai commented Jan 12, 2024

Add gradient circular progress from #9496 (comment) to customization examples: https://deploy-preview-40559--material-ui.netlify.app/material-ui/react-progress/#customization. Thanks, @antokhio, for this one.

Suggestion from docs-feedback

@DiegoAndai DiegoAndai added docs Improvements or additions to the documentation component: progress This is the name of the generic UI component, not the React module! labels Jan 12, 2024
@DiegoAndai DiegoAndai self-assigned this Jan 12, 2024
@mui-bot
Copy link

mui-bot commented Jan 12, 2024

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against a0aab75

@DiegoAndai
Copy link
Member Author

@samuelsycamore I think we might want to think of a place to put these kinds of examples so they don't bloat the docs. Maybe use @siriwatknp's treasury as a base, move it to the MUI organization, revamp it, and start linking it in the docs 👀.

@danilo-leal danilo-leal added the package: material-ui Specific to @mui/material label Jan 12, 2024
@samuelsycamore
Copy link
Contributor

samuelsycamore commented Jan 15, 2024

@samuelsycamore I think we might want to think of a place to put these kinds of examples so they don't bloat the docs.

I think it would be helpful if these kinds of "Customization" demos were more specific. What exactly are we trying to demonstrate in these demos? If it's just "here's how to customize some stuff" broadly, then I think it's less helpful than if it was "here's how to customize to achieve a specific end goal."

In the Joy UI docs, we've established a nice pattern with Customization and Common Example demos:

  • Customization: here's how to go beyond the built-in props to achieve some specific use case - less complex, more for demo purposes
  • Common examples: here's how to (re)create well-known UI designs and patterns - more complex, closer to real-world UI that you could copy+paste directly into your app

I'd love to see this pattern ported over to the Material UI docs! It's something we've only just begun with a few docs in #35158, and it'll definitely take a lot of time.

In other words, I'd love to see this as ## Customization —> ### Gradients or something like that.

@DiegoAndai
Copy link
Member Author

I think it would be helpful if these kinds of "Customization" demos were more specific. What exactly are we trying to demonstrate in these demos? If it's just "here's how to customize some stuff" broadly, then I think it's less helpful than if it was "here's how to customize to achieve a specific end goal."

I agree this could be better organized.

In the Joy UI docs, we've established a nice pattern with Customization and Common Example demos:

I like it! I'll implement the sections you proposed and let you know when it's ready for re-review 😊

For the long term, I wondered if the Common Example ones should live elsewhere to avoid docs bloat. That would enable us to have a lot of common examples, and the community could contribute without worrying about the docs getting too big and scary.

@antokhio
Copy link

antokhio commented Jan 19, 2024

5 cents, here:
Why not add some accordions to the bottom? Something like Cases or 'FAQ'

Bit off topic, but: Would be really nice to have proper styled example. It was kinda nightmare to figure it out:

const MyStyledBox = styled(Box, { 
  shouldForwardProp: (props) => 
    ['myCustomProp'].every(key => key !== prop)
})<BoxProps & { myCustomProp?: boolean  }>(({ theme, myCustomProp }) => theme.unstable_sx({
   background: myCustomProp ? 'red' : 'green',
}))

const Component = () => {
   return <MyStyledBox myCustomProp>TEST<MyStyledBox/>
}

@DiegoAndai
Copy link
Member Author

Hey @samuelsycamore! I haven't had time to work on this (as you can see 😅).

I updated the colors as @siriwatknp suggested, but I don't have time to get the structure right. I tried reorganizing, but the changes kept growing; at this point, we can either merge this PR as is or close the PR and revisit it later. I'm happy with both alternatives.

And then, address this page's structure in a later PR. I agree with you that it needs a good restructuring.

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.

In my opinion, we can merge this and revisit the structure later (we need to restructure other components anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: progress This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants