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

Fixing unknown format issue when using gradient highlighting search page. #20882

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

linuspahl
Copy link
Contributor

@linuspahl linuspahl commented Nov 5, 2024

Description

Motivation and Context

This PR is fixing the unknown format error which can occur for widgets on the search page, when using a gradient highlight.

The error seems to happen since updating chroma.js from 2.4.2 to 2.6.0.

We are using chroma.js to generate the highlight background color and a contrasting text color. Before this PR we were generating a chroma color object for the gradient highlight color. When generating the contrasting text color, chroma threw an error, because the highlighting color has no mode:

https://github.com/gka/chroma.js/blob/v2.6.0/dist/chroma.cjs#L182

The error message unknown format: hex-color-value is a bit misleading.

With this PR we are just generating a hex color for the highlight instead of a color object.

Fixes #20876

@linuspahl linuspahl changed the title Fixing unkown format issue when using gradiant highlighting. Fixing unknown format issue when using gradient highlighting. Nov 5, 2024
@linuspahl linuspahl marked this pull request as ready for review November 5, 2024 19:49
@linuspahl linuspahl changed the title Fixing unknown format issue when using gradient highlighting. Fixing unknown format issue when using gradient highlighting search page. Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuring highlighting on a numerical field crashes affected widgets
1 participant