Skip to content

feat: add ability to swap kpi theme per measures#9281

Open
royendo wants to merge 2 commits intomainfrom
royendo/swap-kpi-theme-colors
Open

feat: add ability to swap kpi theme per measures#9281
royendo wants to merge 2 commits intomainfrom
royendo/swap-kpi-theme-colors

Conversation

@royendo
Copy link
Copy Markdown
Contributor

@royendo royendo commented Apr 22, 2026

based on discussion: https://linear.app/rilldata/issue/APP-808/make-positive-numbers-green-in-dashboards#comment-cb9e154d
https://rilldata.slack.com/archives/C0ASRK17C59/p1776814974047379

Screenshot 2026-04-22 at 12 46 00 Screenshot 2026-04-22 at 12 45 49 `inverse_theme` its a naive implementation and would require all components to be swapped:

Missing components

  • hover over KPI swap

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

royendo and others added 2 commits April 22, 2026 11:12
Introduces a per-measure `inverse_theme` option that swaps the
`kpi-positive` and `kpi-negative` theme colors for measures where
a decrease is the favourable outcome (e.g. bounce rate, error rate).
Wires the flag through the canvas KPI, big-number, leaderboard, and
pivot delta surfaces, and adds a toggle to the visual metrics editor.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The previous commit regenerated Go + OpenAPI bindings but missed the
protobuf-es TS output, so `GetResource`'s `toJson()` silently dropped
the new field and the frontend never saw `inverseTheme: true`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@royendo royendo requested a review from ericokuma April 22, 2026 16:48
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.

1 participant