Skip to content
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 Eye Dropper Color Picker as a datatype #9646

Merged

Conversation

bjarnef
Copy link
Contributor

@bjarnef bjarnef commented Jan 12, 2021

Prerequisites

  • I have added steps to test this contribution in the description below

Description

Now that we have <umb-color-picker> component since Umbraco v8.10.0 #8812 and we also use this for configuration of background and icon color in Block List editor #9056 it would be nice to have a basic color picker property editor.

We already have the "Approved Color" datatype instance using "Color Picker" property editor, which work great most of the time. However for various projects we have had the need using a wider range of colors, where the current color property editor might not always fit the needs.

This PR implement a Eyedropper Color Picker (naming is hard, so we might want to rename this - however "Color Picker" and "colorpicker" alias is already reserved by the current property editor).

Configuration
Limited to just the most basic configuration.

image

Content
image

@bjarnef
Copy link
Contributor Author

bjarnef commented Jan 12, 2021

Not sure if a better name than "Eyedropper" might fit this color picker. Maybe "Compact Color Picker" or "Tiny Color Picker"?
Feel free to add more suggestions 🤓

@bjarnef
Copy link
Contributor Author

bjarnef commented Jan 13, 2021

"Color Palette Picker", "Palette Color Picker", "Spectrum Color Picker",..?

@bjarnef bjarnef changed the title Eyedropper Color Picker Eye Dropper Color Picker Jan 13, 2021
@bjarnef
Copy link
Contributor Author

bjarnef commented Jan 13, 2021

I have changed the alias of the picker to Umbraco.ColorPicker.EyeDropper .. a bit similar to format of Umbraco.Dropdown.Flexible alias.

I also considered the name "Spectrum Color Picker" with alias Umbraco.ColorPicker.Spectrum.

@bjarnef bjarnef marked this pull request as ready for review January 13, 2021 21:16
@bjarnef
Copy link
Contributor Author

bjarnef commented Jan 13, 2021

@nielslyngsoe maybe you have some feedback on this PR? 🙂

@bjarnef
Copy link
Contributor Author

bjarnef commented Jan 14, 2021

Mandatory property:

image

Mandatory property with custom message:

image

It seems the validation styling on the property label isn't consistent when using default vs custom validation message, but we can look at that in another PR.

@nul800sebastiaan
Copy link
Member

We're loving it! Thanks for the work @bjarnef - looking really good and works well! 👍

@nul800sebastiaan nul800sebastiaan changed the title Eye Dropper Color Picker Add Eye Dropper Color Picker as a datatype Feb 21, 2021
@bjarnef bjarnef deleted the v8/feature/eyedropper-colorpicker branch February 21, 2021 09:00
nul800sebastiaan added a commit that referenced this pull request Feb 21, 2021
@bjarnef bjarnef mentioned this pull request Mar 16, 2021
1 task
@vaskinhu
Copy link

Any plans on making the Palette configurable?

@nielslyngsoe
Copy link
Member

@bjarnef
Yeah the styling with the custom message seems wrong. I'm not sure if the red text color serves any purpose as the tooltip already is quite dramatic, so that might just need to go away.

@bjarnef
Copy link
Contributor Author

bjarnef commented Jul 6, 2022

Yeah the styling with the custom message seems wrong. I'm not sure if the red text color serves any purpose as the tooltip already is quite dramatic, so that might just need to go away

@nielslyngsoe I believe the red messages is just the core UI ... I recall these where later changes to a yellow/warning style instead.

I think what @vaskinhu is asking for regarding making the Palette configurable, is that the default palette in the color picker does have this option to add specific colors (instead of the default ones), e.g. red, green, blue, yellow, orange and purple, but not sure we want that in core to keep it simple. However it is always possible to create a custom property editor with more configuration options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants