-
-
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
[RFC] Renaming Joy APIs #32141
Comments
Thanks for writing this up, Jun! Here's my perspective:
|
When was the last time you used this CSS property? I almost forgot it existed 😁
|
Joy use Another benefit is that in Chrome & Firefox (too sad for Safari), the outline radius follows the |
I'd say that using |
I am not sure only on this one. I think the problem is not with the |
+1 for this. |
Interesting choice! I listed the efforts to help us decide. 1. Add
2. Renaming to
For me, I'll vote for @mnajdova option because it is not a breaking change and require a lot smaller effort. We have to write a doc to clarify the meaning of the prop regardless of the choice. |
Sweet! Let's go for |
This RFC list several points related to renaming Joy UI APIs so that we can discussed before making the changes.
RenameDecided to go withcolor
prop topalette
textColor
prop instead, details here:The
color
prop creates confusion around the palette & CSS color property as indicated incolor="action.disabled"
is crashing #32270 (comment)TheLink
component needs to support both palette and color props (using color prop alone would make the logic very complicated and code suggestion would not work because the color type is a string)In Joy, most components havevariant
prop which most of the time needspalette
to work, so thepalette
prop sounds like the best option.Add
textColor
prop to the components that support shorthand props eg. Link✅ Rename variant values: The reason to rename the values is to set apart from these existing names (CSS properties, color modes) and make them meaningful as much as possible. [Joy] Rename variants #32489
text
toplain
(as discussed in [WIP] Fluent button and switch light theme #31090 (comment))outlined
toframe
|shell
|pod
|crust
. (we haven't discussed about this yet but usingoutlined
is too close to the CSS outline property)light
tosoft
(as discussed in [WIP] Fluent button and switch light theme #31090 (comment))contained
tosolid
(as discussed in [WIP] Fluent button and switch light theme #31090 (comment))These are other names that we can consider.
border
)~Rename
primary
palette tobrand
: continue from [WIP] Fluent button and switch light theme #31090 (comment) to gather more thoughts. ~Add/Remove typography scale: After doing POC with several apps, it becomes clear that the current h1 and h2 are too big and I have never used h5, h6 (as an HTML tag). I have to always do this
<Typography level="h2" fontSize="lg" />
. It makes more sense to havedisplay1, 2
for the headline like in MUI branding.display1
anddisplay2
removeh5
andh6
We don't style them at all out of the box because h4 elements are already so small that they are the same size as the body copy. What are we supposed to do with an h5, make it smaller than the body copy? No thanks.
Renamelevel
prop on the typography component toscale
for consistency with the system: level was initially added in Joy to replace the variant (because Joy's variant is different). Some discussion is in https://www.notion.so/mui-org/MUI-System-890bb3d81cbf45008fd5d2f90f53539d#5de65bde31ec4a84931cd62081d27e04If you think other APIs need to be renamed, feel free to add it to the list. Not every bullets have to be decided in this RFC, we can start working on the first batch and revisit the rest later.
The text was updated successfully, but these errors were encountered: