-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[Joy] Refine componentsProps
for all components
#34077
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
93b774e
update aspect ratio
siriwatknp a307f94
update Avatar
siriwatknp 958c66f
remove imgProps from Avatar
siriwatknp 83304e1
update avatar group
siriwatknp a13296a
fixes
siriwatknp 077cd7a
update Badge
siriwatknp 51bfb0f
update breadcrumbs
siriwatknp 9c49714
update Button
siriwatknp 04dc8a3
update card components ownerState types
siriwatknp 43ec99d
update checkbox
siriwatknp 3a4d7e0
update checkbox demos
siriwatknp 3572b8c
update Chip
siriwatknp 81090cd
update ChipDelete
siriwatknp c6ed861
update form helper text
siriwatknp 5f8609c
update form label
siriwatknp 8ffc2db
update icon button
siriwatknp da53110
update Input
siriwatknp 2ba3c83
update Link
siriwatknp 2990227
update list
siriwatknp fc9540d
update list divider
siriwatknp 0ec152b
update list item
siriwatknp eb9d014
update list item button
siriwatknp 3d9eb11
update list item content
siriwatknp 184470b
update list item decorator
siriwatknp 7ef2e66
update menu
siriwatknp 360df35
update menu item
siriwatknp 9976b37
update menu list
siriwatknp 52431c0
update option
siriwatknp a321d09
update radio
siriwatknp 7c7ad8d
update radio group
siriwatknp 4e61245
update select
siriwatknp 78a1a0c
update sheet
siriwatknp afca797
update slider
siriwatknp 8f3b6d3
update switch
siriwatknp bfce007
update tab
siriwatknp 1bee444
change to div
siriwatknp 91e6f49
update tablist
siriwatknp 44ecc8c
update tabpanel
siriwatknp 95dc848
update tabs
siriwatknp da3e6e7
fix switch
siriwatknp 6d905fd
update textarea
siriwatknp 5b3fbe2
update TextField
siriwatknp f63738e
update typography
siriwatknp fe11b6a
update ownerState in components
siriwatknp 86fafbf
revert change
siriwatknp bee2f42
update spec
siriwatknp 42716c8
yarn proptypes
siriwatknp f0e837f
run proptypes
siriwatknp eb4d19e
add custom variant test
siriwatknp 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
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
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
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
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
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
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.
While improving the support for
componentsProps
in all the Joy UI components sounds great, for adding custom attributes, and events. I wonder if using it for customization over the CSS selectors is a step forward. Personally, I found the previous approach better. We teach for customizations that are not one-off to use thestyled()
API, which was easier to migrate to with thesx
demo.Another way to look at it, SASS is still the most popular way to style: https://2021.stateofcss.com/en-US/technologies/#scatterplot_overview. How would somebody using SASS would figure out how to migrate the customization?
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.
I think this is not up to Joy and I don't even think which one is better. It's all up to the developers to choose the way they prefer. I will ensure that both ways are documented.
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.
@siriwatknp It's an interesting perspective. I had tried this path in the past (my initial intuition of how it should be done) and stopped once I saw too many developers struggling with deciding which option they should use. I saw them ask for the documentation to give them "the way". For example, in our last developer survey: https://www.notion.so/mui-org/Raw-data-aa374141dcb3453dbfea301dcc437126#8830e74c200946dcb29ce385684f1dc4
Maybe it would make sense to first decide on which approach is better, and then stick to it everywhere in the docs 😁