-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Color type #852
Comments
@custa1200 You can always add a custom widget to your CMS, like this: https://www.netlifycms.org/docs/extending/#registerwidget. |
I wouldn't mind this as a core widget either. We're probably going to get rid of the concept of core widgets anyway to some extent after 1.0. @custa1200 here's a react component that could handle most of the work: https://casesandberg.github.io/react-color/ I'd envision an input sized box that is colored with the selected color, and with the text color value in the middle. Clicking could just trigger one of the popup styles widgets in the linked demo above. Config options should probably include:
Thoughts? |
Would be nice to have a lookup to a bunch of predefined colours too. Being that I’m trying to use this as a theme creator back end for |
@custa1200 Do you think @erquhart's idea of |
I think that would be a great starting point. My use case would be I’d also like to be able to have a user add a list of theme colours and then be able to choose from that list for other items. |
I mentioned the concept of a third "meta" entry type to complement the collection and singles types we've been discussing. That was for curating a collection of tags for use throughout CMS entries. This would benefit from similar treatment. The idea being that there are low level settings, the stuff in the config, which will eventually be editable for CMS admins through a settings tab, but then there are content level settings that a editors would want access to. They're not really content per se. For now, this widget is a good start, as @custa1200 said. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Are there any plans to add this as a core widget or having a generic |
@dumptyd this is a good candidate for contribution. |
Thanks @erezrokah to point me here. Here is the color-picker I created based on react-color. Here is the live example I would propose to not allow as many color-pickers from react-color, as I do now, because some are not working correctly and it would be some work to fully supportthem all. To keep it simple we could just use the "chrome picker" and keep my custom widget for advanced usecases? |
Here is my proposal for the color widget, suggestions and feedback welcome! I added two options:
There is already an (unmaintained) NPM module called "netlify-cms-widget-color" ... any idea what's the best way to solve that? ask the author to transfer ownership? (All additional styling is done by inline styles, should maybe be changed) |
Do you mind opening a PR? This way it will get more visibility. You can keep it as draft until it's ready.
|
@erezrokah done, anything to do to mark it as a draft? |
Thanks @felixboet, this is a small link to do it: I went ahead and clicked it for you 😄 |
It would be handy to add a color Type to the list of widget that could use the native color pickers as a minimum
The text was updated successfully, but these errors were encountered: