An update to the Configurable Color Picker

A few people reached out to me recently to request that I make the Configurable Color Picker support defining and using more than one palette (per site). So, with that in mind, I want to unveil:

Unveiling the Configurable Color Picker v2


Yeah, that's right...there is now a Configurable Color Picker v2 (and it's already available on the Episerver Nuget Feed).

What's new?

The big change is that you can now name a palette in the configuration:

<?xml version="1.0" encoding="utf-8"?>
<colorPalettes>
  <colorPalette>
    <name>Simple</name>
    <colors>
      <color id="1">
        <value>#ff00ff</value>
        <name>Magenta</name>
      </color>
      <color id="2">
        <value>#ffff00</value>
        <name>Yellow</name>
      </color>
    </colors>
  </colorPalette>
</colorPalettes>

and then request that palette for a property:

[ColorPicker("Simple")]
public virtual IColor Color { get; set; }

It's really that simple!

Are there any breaking changes?

Yes, unfortunately. But nothing major (and no functionality was removed), they mainly consist of slight adjustments to the XML structure. The usage also got a lot simpler and now you only need to decorate the property with a single attribute. You can see all the breaking changes here.

Documentation?

The most tedious part of the whole updating the documentation, so if that's your thing please have a read.

What's next?

I don't know! 🤷 Feel free to reach out if you have any suggestions and I may get around to them (no promises)!

Comments

There are zero comments 😢