Skip to content

Conversation

@v-zhuravlev
Copy link
Contributor

@v-zhuravlev v-zhuravlev commented Oct 24, 2025

Making easier to manage those choices and override those in the future in one place.

In other words, all things like colors or line thickness are placed in in folder, and then referenced by commonlib panels (or observ-libs that uses common-lib as a core). So if it decided to change base colors used it just one place where to change it.

Refs
https://www.uxpin.com/studio/blog/what-are-design-tokens/

Meantime, this is not a breaking change, everything should work as before.

Making eaier to manage those choices and override those in the future in one place.
@v-zhuravlev v-zhuravlev requested a review from a team as a code owner October 24, 2025 06:45
Copy link
Member

@Dasomeone Dasomeone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fantastic effort @v-zhuravlev! Works great too, tested with the kafka observ-lib locally, and worked just fine and added additional palette info to a couple panels.

One comment on consistent naming on colours, what gets aliases and what doesn't, but overall hugely in favour of this.

+ timeSeries.standardOptions.color.withMode('fixed')
+ timeSeries.standardOptions.color.withFixedColor('light-purple'),
+ timeSeries.standardOptions.color.withMode(tokens.base.colors.mode.single)
+ timeSeries.standardOptions.color.withFixedColor(tokens.base.colors.palette['light-purple']),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this particular colour has an alias for rate but nor for topk_percentage, perhaps we should settle on a consistent approach here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdyt, what should be done here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in this particular case it's fine to just create a second alias for like default_topk or similar, and have that be the same light-purple? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, it was a alias there already - 'threshold'! changing it to this style, as here it is applied not to topk values themselves, but to dotted threshols line that represents MEAN of values.

Copy link
Contributor Author

@v-zhuravlev v-zhuravlev Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dasomeone , please let me know if there is something else that should be done , thanks!

@v-zhuravlev v-zhuravlev requested a review from Dasomeone December 9, 2025 12:00
@Dasomeone Dasomeone enabled auto-merge (squash) December 18, 2025 14:47
@Dasomeone Dasomeone merged commit fa9900a into grafana:master Dec 18, 2025
10 checks passed
@v-zhuravlev v-zhuravlev deleted the tokens branch December 18, 2025 15:13
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.

2 participants