Skip to content

Conversation

@edwardgou-sentry
Copy link
Contributor

@edwardgou-sentry edwardgou-sentry commented Dec 22, 2025

Adds preferredPolarity as an attribute to ThresholdsConfig in the frontend, and adds support to render Big Number widget thresholds using reverse polarity.

  • Does NOT add ui to enable choosing positive or negative polarity in the widget builder. (Can be a separate pr)
  • Backend currently does not store preferredPolarity in the serializer for ThresholdsConfig. (Also separate pr)

To be used by web vital performance score big number widgets
image

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 22, 2025
@edwardgou-sentry edwardgou-sentry marked this pull request as ready for review December 23, 2025 00:59
@edwardgou-sentry edwardgou-sentry requested a review from a team as a code owner December 23, 2025 00:59
Comment on lines +18 to +19
const NEGATIVE_POLARITY_COLOR_ORDER = ['green400', 'yellow400', 'red400'] as const;
const POSITIVE_POLARITY_COLOR_ORDER = ['red400', 'yellow400', 'green400'] as const;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a big deal, but you could use lodash .reverse() to reverse the negative order to get the positive order

@edwardgou-sentry edwardgou-sentry merged commit 79968ae into master Dec 23, 2025
55 checks passed
@edwardgou-sentry edwardgou-sentry deleted the egou/feat/big-number-widget-positive-polarity-render-support branch December 23, 2025 16:59
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants