Fix breaking changes from the color function API - #111
Draft
rokotyan wants to merge 2 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
f5#856
This PR addresses two breaking changes introduced by the recent custom color function work, before they ship in a release.
Rename
colortocolorFunctionThe new custom color function config property on containers and
BulletLegendwas namedcolor, which is both ambiguous (it holds a function, not a color value) and collides with the widely usedcoloraccessor naming on components. It is nowcolorFunction:Applied to
ContainerConfigInterface(so bothSingleContainerandXYContainer),BulletLegendConfigInterface, and the Angular wrappers — which also now actually expose the input onVisSingleContainerComponentandVisXYContainerComponent. Dev examples and website docs (Single_Container,XY_Container, theming guide) are updated to match.Backward compatibility for
getColorThe
getColorutility's fourth positional argument used to bedontFallbackToCssVar: booleanand was repurposed askey: string, silently breaking existing callers.getColornow acceptsstring | booleanthere: a string is treated as a color key, whiletrueis interpreted as the legacydontFallbackToCssVarflag (unless explicitly set viaoptions). Marked with TODOs to drop the boolean form in Unovis 2.0.