-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[Joy] Add palette customizer #35741
[Joy] Add palette customizer #35741
Conversation
Netlify deploy previewBundle size report |
It's quite interesting! I think that the main problems this tool could solve for the community is: a. having a quick customization tool for YOLO projects (e.g. indie developers) or developers working on internal tools (where they can't involve a designer, and still need the thing to feel on brand). Feedback on what I can identify:
I have found an issue with the z-index of the select which leads me to a rabbit hole 🐇:
|
Absolutely, yes. This tool is for developers, not designers. You summarized it very well.
I see, will make it bold and may be using a modal to show more palettes. Also, will add a reset button.
Adding event tracking on the "show me the code" and "Open sandbox" should be enough to see how many people are using it.
To be clear, let's separate the advanced version of this PR. I created a Notion page to brainstorm ideas.
That'd be nice too (maybe in a separate PR). I can see its use case where I have a single branding color and I want to generate a palette for it.
Agreed
Sounds good. |
If we want to tackle typography at one point, one benchmark for it https://hihayk.github.io/shaper/ |
@oliviertassinari Here is the update on the browsing palette. Is this better than the previous version? Screen.Recording.2566-01-27.at.11.19.32.mov |
@siriwatknp It looks awesome 🔥 |
Whoops ⎯ sorry about that ☝️ accidental misclick. |
… into joy/theme-builder
@danilo-leal I think it is too complicated to show "using amber from Tailwind CSS ⎯ change here". The logic is I have to iterate all of the predefined colors (from tailwind and material design) and check if the custom palette matches any of those or not. If we have more palettes, when token changes we have to recalculate. This might not be performant. |
I have extracted some utilities with tests. I think the code will be more organized when we add more things to the theme builder. I don't think we need to extract everything at this point because all of the components are used on this page. |
@siriwatknp That's ok! I think it'd be good if we had something reinforcing you were using a pre-made palette but I don't think it's hugely necessary. One thing that I thought about though: I know the light / dark toggles within the ThemeBuilder component are independent of the global docs one but shouldn't we make it follow the docs regardless? That is, maintaining the capacity to override the docs but if I turn the whole docs to dark, maybe the Builder should go dark too... or no? Felt like that was something intuitive. |
Nice catch! it is fixed. |
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.
Aside from this tiny piece of copy fix, I feel like this is looking great already for release 🎉
Just saw this one, looks super duper good. Well done 🎉 |
Preview: https://deploy-preview-35741--material-ui.netlify.app/joy-ui/customization/theme-builder/
Motivation
I need a tool that I can tweak the colors:
and at the end, copy the code and the generated types (it isn't very pleasant to always look up the interfaces (TypeScript) to augment the theme).
or start building a prototype/reproduction in the sandbox.
Goal
Having a simple and friendly tool to get started with custom colors (maybe the name should not be "Theme builder" because it sounds complicated).
Target users