Skip to content

Introduce a DB color type

What does this MR do and why?

Introduces a color type for values that represent color strings, and an ActiveModel type to allow for marshalling with the DB.

Why?

Representing colors as strings is simple, but really colors are more like dates and times - values we can represent with a string, but that have more complex behavior. Having a real domain object to represent them can simplify color-handling code, and make it reusable.

At present this relates to the light? predicate, but other features can be added later.

The benefit of this MR is to enable color processing code to be separated cleanly from the LabelsHelper.

How to set up and validate locally

This should not cause any user-visible changes

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Alex Kalderimis

Merge request reports

Loading