Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
#3211 - Add colorpicker prevalue editor #3212
This add a colorpicker prevalue editor, which is useful for grid settings/styles and also in prevalues for other property editors.
An example json of the grid editor config in settings:
We could use tinycolor to ensure color values (rgba(a), hex, hsl, hex) are converted to hex codes. Tinycolor has previous been used, but not sure if it has been removed from the project:
As a minimum I think we should support both 3 digit and 6 digit hex codes.
@nul800sebastiaan I have worked a bit more on this and made it work with labels as well and only add items with valid 3 digit or 6 digit hex codes.
@nul800sebastiaan maybe you can have another look at this?
We could une tinycolor, which has been included in core, but not sure if it is still used.
There is also a smaller library like this:
If it should include a dependency to another library, it would be great, if it was something which could be useful in other parts of the backoffice.
I wonder it some developers might want to use the colorpicker prevalue editor for a custom property editor. Is there a specific format for data to the prevalues in package.manifest? e.g. previous when using radiobuttonlist in custom property editors, it didn't support assigning the values for the radiobuttons, but I think think is supported now?
Works great @bjarnef !
I am not sure when we added TinyColor to core, interesting!
Let's not add TinyColor for now, seems like a bit of overkill. We should also check what it is used for now and consider if it is actually all that useful.
I am not sure about prevalue editors and what is supported, I'd be happy to get input from you if you want to investigate. :-)
Oct 23, 2018
referenced this pull request
Oct 23, 2018
@nul800sebastiaan oh, I should have removed the debugging stuff