fix(dashboards): preserve display type when switching display types#109208
fix(dashboards): preserve display type when switching display types#109208DominikB2014 merged 2 commits intomasterfrom
Conversation
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| setThresholds(undefined, options); | ||
| if (!doesDisplayTypeSupportThresholds(action.payload)) { | ||
| setThresholds(undefined, options); | ||
| } |
There was a problem hiding this comment.
Thresholds preserved while aggregate resets
Medium Severity
On SET_DISPLAY_TYPE, thresholds now persist for threshold-capable display types, but selectedAggregate still gets cleared unconditionally. This can leave thresholds values out of sync with the widget’s metric/field (and its unit/type), causing the thresholds UI and saved payload to represent an invalid or misleading configuration after a display type switch.
There was a problem hiding this comment.
This is fair, i guess it's better to reset the threshold if the aggregates change, but the user will also have a clear idea what's going on in the widget preview.
…109208) Now that we have more display types with thresholds, we should preserve the thresholds section unless the display type doesn't support it.
…109208) Now that we have more display types with thresholds, we should preserve the thresholds section unless the display type doesn't support it.


Now that we have more display types with thresholds, we should preserve the thresholds section unless the display type doesn't support it.