-
-
Notifications
You must be signed in to change notification settings - Fork 561
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
Add theme editor to styling guide #470
Conversation
🦋 Changeset detectedLatest commit: 131bfe3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
size-limit report 📦
|
Mostly cloned the PR, played with it a bit and did not really checked the code that much yet but first, this is amazing 🤩 Super easy to use, does a great job, not super complicated like some other palette editors. Personally I really like it. Some personal feedback (and I am no UI specialist so take it with a grain of salt):
Super impressive work, I am really looking forward to see this merged and used 🎉 |
Thanks for the helpful comments @HiDeoo!
Played with this and decided even just a step of
Unfortunately not — the way Shiki (and by extension the
Added all of these kind of! I had tried to add a reset button a few days ago but was never happy with it. Solved it by adding set of presets including one for “Default” as a reset. The preset buttons include one to generate a random theme.
Perhaps not. In particular “chroma” which is more often known as saturation to a lot of people. I tried at one point to describe this a bit in the intro, but then felt like maybe it’s enough to let people try a slider and learn what it does? I tried it on someone earlier today and they asked “What’s chroma?” (I did not answer in true user-testing style 😁) and then they tried the slider and were like “Oh, OK, I see.”
Yeah! And in fact it wasn’t possible to build an algorithm that can generate our default theme perfectly because the hand-picked shades vary in hue slightly. But I chatted with @doodlemarks and he suggested we actually switch our default theme to the auto-generated default for consistency. I don’t think I’ll do it in this PR, but we could eventually even have a pipeline to actually auto-generate the default colour variables using the algorithm instead of relying on manually keeping them in sync. |
Wow, just played with the new version, it was already awesome, but now it's even better!
Yeah, that makes sense, this is what you get from me writing comments way too early in the morning 🤣
I think the solution you came up with is great. And these presets are so cool.
Super interesting to hear this test feedback. And yeah, when you see sliders, you just want to play with them, so I think most people will figure it out like that.
This makes total sense and yeah, I think it's wise to do this in a separate PR. Personally, I cannot cannot think of anything else feature and UI wise I would like to see in this editor imo. |
This is wild request but will it be possible to persist the theme across pages? or is this a bad idea 😆 |
@kevinzunigacuellar, it might be wild indeed, but I did this on one of the previous versions of my site and wasn't actually that hard! I just set the CSS vars using JS on the rootElement. I think the question here is more; Do we want to do that, since we'll be shipping it, maintaining it, and might in the long run not be "worth it" for users. (although I admit it would be really cool) |
Good question @kevinzunigacuellar! As @ElianCodes said, it wouldn’t be technically too difficult to do — save the theme in local storage and then restore it on each navigation. I did briefly consider this while building, but I’m not 100% convinced it’s a good idea. It could be confusing, especially if you got stuck on some weird theme and now need to understand to get back to this page to reset that. Maybe it the widget persisted in a pop-up across pages or something so it’s always available it could make sense? But there’d definitely be a bunch of UX stuff to think about to make it nice. |
What kind of changes does this PR include?
Description
starlight-color-picker-sm.mp4
N.B. Slightly work in progress — should be merged after #337 and the JS this spits out of course breaks our size limit checks. Will need to look at filtering out these component files from those. But opening early to get feedback and so that people can play with this!