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
U4-11588 - Adjustments of color picker #2864
Conversation
Hi Bjarne, Any reason use don't reuse the same component which was made for the icon picker? |
@madsrasmussen the style of the color picker already looks a bit like the The For now a have just updated a bit of the current styling, so it works a bit better with longer labels and I use same markup and styles in both "modes". But maybe the |
That was exactly my thought. We could add an option to the umb-color-swatches component to show the labels. It might also make sense to have an option to render the squares in different sizes. |
It could have a property like For the size, it is also the the thought I had about the |
It would also be great the re-use this component for color picker prevalues editor (which I think has been missing) #1503 |
@madsrasmussen can we merge this first and look at replace this with the I would also like to use this component for a color picker prevalue editor, which e.g. can be used on grid config. |
@madsrasmussen I wonder how it will look with multiple lines/rows of colors and if they keep its closure. Maybe it could also be something like this? or something like this: |
@bjarnef Just to get back on this one, we've just discussed this and it would be great if you would like to finish it using your directive with some extra height/width options and basically like the example Mads posted. The color palettes one is a bit too high for our liking but if we can vary the width and height in the directive we could just play with it to see what makes sense. Does that help move this forward? Good stuff, keep up the great work!! ⭐️ |
I have adjusted the code, so it now re-use the The component use the Umbraco-CMS/src/Umbraco.Web.UI.Client/src/views/common/overlays/iconpicker/iconpicker.controller.js Lines 14 to 34 in 0eddf6b
I am nore sure how to handle this to use either to class style or the inline background color applied from Should the Furhermore the object in the array here Umbraco-CMS/src/Umbraco.Web.UI.Client/src/views/common/overlays/iconpicker/iconpicker.controller.js Lines 14 to 34 in 0eddf6b
label insted of name .I guess the easiest would be to changethis property name to label ? Umbraco-CMS/src/Umbraco.Web.UI.Client/src/views/common/overlays/iconpicker/iconpicker.controller.js Line 15 in 0eddf6b
Also note that I have added |
Thanks again @bjarnef - it looks super cool!!
Yes, it would be awesome if you could fallback to the class style if the |
@nul800sebastiaan yes, I can have a look at this when a have some time :) |
@nul800sebastiaan can you review this again? :) It could fallback to the class style if the hex-bg-color is an invalid hex, but I guess people in theory could name the class name e.g. "ff0000" which is a valid hex code and it then add the background color, so I think it is okay, to set (true/false) whether the colors are defined via hex codes or class names. Also if you are using the class names it doesn't need to observe, test for valid hex codes, etc. At the moment the e.g. However these formats doesn't seem to work, which fallback to white (which seems to be the border color unless a It could maybe later use tinyColor for this, e.g. so the prevalues sended to the color picker (which probably should use this one with color swatchers) works with defining colors with their color names, rgb(a) or hex code as in this PR #1503 Not sure if you have other suggestions for the directive properties But for now I think this one is ready. |
I think it's fine for now that it doesn't work with rgb or named colors, at least it does what we need to do at the moment. It looks beautiful! Yep, I think keeping it short and singular is absolutely fine. Great work, as usual, thanks so much @bjarnef ! ⭐️ |
Ah, you forgot to rename the name property in the iconpicker, fixed here: 3c73f6a |
Prerequisites
Description
This fixed a bit styling of the color picker prevalues, so longer labels doesn't push the remove button.
Before
After
Before
After