Skip to content

Slider: make a prop instead of class="displays-percentage-colors" #3694

@Kiarokh

Description

@Kiarokh

New feature motivation

When using a decimal field with a percentage bar visualization, the color scheme is currently hardcoded (low = red, high = green). This doesn’t always reflect the intended meaning: in some cases, a high percentage can be negative, while a low percentage can be positive.

Therefore, configurators in Lime CRM are hacking the slider component by manually setting a {"class": "null" } as a prop on the field, to override class="displays-percentage-colors". But that makes the configuration abstract and hard to understand for the next configurator. Also completely undiscoverable.

Image

This is also how we document it in the docs.
Image

New feature implementation

This should be a prop that adds this class, instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    All Open Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions