[DataGrid] Replace style-components with @material-ui/styles#168
Conversation
…tStyles.ts Co-authored-by: Olivier Tassinari <[email protected]>
oliviertassinari
left a comment
There was a problem hiding this comment.
A first pass at the review
oliviertassinari
left a comment
There was a problem hiding this comment.
A summary of the propose changes:
- Flatten CSS specificity as much as possible: make overrides easier.
- Use unitless when possible: won't make a large difference, only to match current coding style.
- Remove blank lines: won't make a large difference, only to match the current coding style.
- Use
MuiDataGrid-to prefix all applied class names. - Use
Mui-to prefix artificial pseudo-classes. - Hardcoded color prevent customization, e.g. dark theme.
- Use theme.typography variants over cherry-picking values
|
I have updated the pull request's description to link all the related issues to the pull request. |
…-table But I won't have time to push it further today. For tomorrow 😴
oliviertassinari
left a comment
There was a problem hiding this comment.
Great progress :)! I have started to continue the pull request to match the style of https://material-ui.com/components/tables/#simple-table. I will finish tomorrow.
|
@dtassone Could you double-check my changes? A couple of things we can still do to improve the UI:
|
I don't think it's ideal to work on the same PR. It's not easy to see what has changed and understand why it has. It would have been better to create a feature branch on upstream and iterate on this one. AFAIK we were using material ui core 4. Not sure what happened with the number and the sort icon |
I can still do that if you would like.
You can see the full diff along with detailed commits at 883c789...8640691.
I have tried to explain it in the previous comment. It's an issue with the version imported of @material-ui/core (v4 on npm vs. v4 on git). It doesn't impact the end-user (outside of the documentation). We need to use the right version. I can work on it after. |
Let's merge and create another PR for future changes
I didn't know the trick! But not ideal to comment...
Hmm I see. I thought the component would use the npm modules, but if I understand well it uses the code in the repo, due to babel conf? |
Ok!
True, only work for small changes, I think that after +-100 it starts to be questionable.
It has something to do with using the docs components from the mono-repo. I can't tell without investigating. |


https://deploy-preview-168--material-ui-x.netlify.app/components/data-grid/