-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
refactor storybook and add first keyboard test #36
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b7cc87d
refactor storybook and added first keyboard test
dtassone 622497d
lint and prettier
dtassone 3f11f2e
fix issue with stories and rollback change on totalHeight
dtassone 3ee11d2
Merge branch 'master' into image-snap
dtassone 8a897ea
refactor keyboard test and add components
dtassone 3d8e4fc
lint and prettier
dtassone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
*.log | ||
dist | ||
node_modules | ||
__diff_output__ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem right.
https://github.com/mui-org/material-ui-x/blob/6ded9f9c625b14be75289119153430b75b4a4a19/packages/grid/data-grid/package.json#L26-L30
@material-ui/core already has a CSS-in-JS solution, introducing a second means duplication of bundle size and configuration. I think that we should stick to using @material-ui/styles until we figure out the way out of this with @mnajdova in v5.
Note that it doesn't prevent end-users to use styled-components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Styled components is one of the most popular solution now. Css in js is much less practical. If you move away of this framework in v5, I think it is a waste of time to realign it now, and change it again later. Don't you think?
It is a peer dependency so it won't be bundled. Happy to refactor it and use css modules with less
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yet, it's not the most popular one in the first userbase we are going after with this MIT version: https://deploy-preview-21555--material-ui.netlify.app/blog/2020-developer-survey-results/#19-what-styling-system-are-you-using
What happen if the peer dependency is missing? Does it crash?
If it doesn't crash, why do we need to include it? If it crashes, it will be bundled.
No strong preference, I'm curious to see how this will play out. I wanted to raise the concern for the record, so we can come back to it in 6 months and reevaluate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main reason for adding it as peer dependency is to allow the consumer to control the version of the package and avoid having several versions of the same package in the components tree which usually have disastrous consequences if packages interact with each other like for react.
TBH I'm not a big fan of having any dependencies beside react, let see if we can improve that in the future ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users can control the version of the dependency even if it's not a peer dependency. The reason has to be found somewhere else. It's the same as why react and react-dom should be peer dependencies: they have a singleton. SC explains a bit more why in https://styled-components.com/docs/faqs#i-am-a-library-author-should-i-bundle-styledcomponents-with-my-library and https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page.
💯 so much agree here, I hope we can take this problem down in v5, it will both help for users asking for better bundle size (no duplication), users asking for easier customization (no need to configure the CSS injection order with another tool), help with the marketing perceived value (you are in control, it's light).