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

[blog] Making customizable components #33183

Merged
merged 18 commits into from Aug 25, 2022

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Jun 16, 2022

@mui-bot
Copy link

mui-bot commented Jun 16, 2022

No bundle size changes

Generated by 🚫 dangerJS against 33c2e6e

Copy link
Member Author

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

@samuelsycamore I migrated the remaining comments on the G-doc into this PR

docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
Comment on lines 63 to 64
You maybe be don’t want to spend time writing long CSS files, spending time saying “In which file is define this f\*\*\*ing 5px padding?” or modifying all your files, because a designer decided that blue should be #29b6f6 instead of #4fc3f7.

Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
You maybe be don’t want to spend time writing long CSS files, spending time saying “In which file is define this f\*\*\*ing 5px padding?” or modifying all your files, because a designer decided that blue should be #29b6f6 instead of #4fc3f7.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps these 3 examples can be combined for brevity?

Maybe you’re sick of digging in a hundred different places just to find the single instance of that 5px padding or where “blue” suddenly changed from #4fc3f7 to #29b6f6.

}
```

### Let JS generate the CSS
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 section is super short because modifying style is well explained in the doc, it does not require a blog article.

It's here to remind the reader to use JS libraries to simplify her life

docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
@alexfauquette alexfauquette marked this pull request as ready for review June 16, 2022 15:43
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
Comment on lines 63 to 64
You maybe be don’t want to spend time writing long CSS files, spending time saying “In which file is define this f\*\*\*ing 5px padding?” or modifying all your files, because a designer decided that blue should be #29b6f6 instead of #4fc3f7.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps these 3 examples can be combined for brevity?

Maybe you’re sick of digging in a hundred different places just to find the single instance of that 5px padding or where “blue” suddenly changed from #4fc3f7 to #29b6f6.

docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
Co-authored-by: Gerda <106991024+gerdadesign@users.noreply.github.com>
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Cool blog post 👍 , nice to share with curious developers

docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
docs/pages/blog/making-customizable-components.md Outdated Show resolved Hide resolved
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
@samuelsycamore
Copy link
Member

Thanks @oliviertassinari! @alexfauquette asked me to take over here to finish this post. I'm hoping to get it ready to publish this week.

@samuelsycamore
Copy link
Member

@alexfauquette let me know what you think about the latest draft here! The biggest changes include a new title and description, as well as a conclusion to try to tie it all together at the end. I also made some smaller edits throughout the text.

Copy link
Member Author

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

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

Perfect for me, ready to be merged 🚀

I’m not a designer, so I made an ugly switch example using only CSS.
You can play with those examples in a [codesandbox](https://codesandbox.io/s/fast-http-kv85p5?file=/src/App.js)
I’m not a designer, so I made an ugly switch example using only CSS
you can play around with it in [CodeSandbox](https://codesandbox.io/s/fast-http-kv85p5?file=/src/App.js):
Copy link
Member Author

Choose a reason for hiding this comment

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

What's the name of this element bewteen "CSS" and "you"?

Copy link
Member

Choose a reason for hiding this comment

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

That is every editor's favorite punctuation mark—the em dash! 😁


You should add slots to override icons, because it's common to need to replace them, so it should be easy to do.

Slots should also be added when your component is somewhat independent from the main one.
For example, a grid can exist without its filter panel, or without its toolbar.

## Customization is key
Copy link
Member Author

Choose a reason for hiding this comment

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

😍

@samuelsycamore
Copy link
Member

Hey @danilo-leal! 👋 Can we get an OG card for this post? 😁

Copy link
Contributor

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

Sweet, this looks great! Added the card and did a small improvement to the switch-related images there! The one with the hand-written red writing there could also use a bit of care but I'll leave it up for y'all!

@samuelsycamore
Copy link
Member

Thanks @danilo-leal! Personally I thought @alexfauquette's red handwriting in that screenshot was endearing 😂 but it wouldn't hurt to make it look a little more professional. As is, I think it contributes well to the overall tone of the piece. I'm cool with it either way.

@samuelsycamore samuelsycamore merged commit ba6b1bb into mui:master Aug 25, 2022
@oliviertassinari
Copy link
Member

@danilo-leal The new image in https://deploy-preview-33183--material-ui.netlify.app/blog/making-customizable-components/#good-old-css looks super clean 👌. Happy to see that https://www.notion.so/mui-org/Blog-247ec2bff5fa46e799ef06a693c94917#af943b7359c7439d8457dee53f51f184 work :)

daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
Co-authored-by: Gerda <106991024+gerdadesign@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Co-authored-by: danilo leal <67129314+danilo-leal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants