Open
Description
Which Umbraco version are you using?
16.0.0-rc3
Bug summary
Depending on the Include labels
setting of a Color Picker Property Editor UI ModelsBuilder generates two different types for the value:
// no labels
... => this.Value<string>(_publishedValueFallback, "pageBackgroundColor");
// labels included
... => this.Value<global::Umbraco.Cms.Core.PropertyEditors.ValueConverters.ColorPickerValueConverter.PickedColor>(_publishedValueFallback, "pageBackgroundColor");
Bellissima seems to handle this already.
Specifics
Changing this will be a breaking change. Fixing this in release 16 would be cool.
Steps to reproduce
- Add some items to the "Approved Colors "data type
- Add a property of type "Approved Colors" to a document type
- generate the models with ModelsBuilder
- change the "Include labels" setting of "Approved Colors" data type
- generate the models with ModelsBuilder again
- compare generated results (when using a repository you can see the difference immediately😜)
Expected result / actual result
Property value type should always be PickedColor
.
Currently it is of type string
or PickedColor
.