fix(dashboards): Treat TOP_N display type as AREA#109876
Draft
DominikB2014 wants to merge 2 commits intomasterfrom
Draft
fix(dashboards): Treat TOP_N display type as AREA#109876DominikB2014 wants to merge 2 commits intomasterfrom
DominikB2014 wants to merge 2 commits intomasterfrom
Conversation
TOP_N is an outdated display type that some users still have saved. It uses a different rendering path that doesn't abbreviate y-axis values, causing large numbers to display unformatted. Map TOP_N to AREA in both the widget builder (so re-saving gradually migrates widgets) and the widget card (so existing TOP_N widgets render correctly). Fixes DAIN-1267 Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
@cursor review |
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.
TOP_Nis an outdated display type that some users still have saved in theirdashboards (e.g. from the General Template). It uses a legacy rendering path
that doesn't abbreviate y-axis values, causing large numbers like
150000000to display unformatted.
Tested with https://sentry.sentry.io/dashboard/128570/

Before
After

This PR maps
TOP_N→AREAin two places:Widget builder:
deserializeDisplayTypenow convertsTOP_NtoAREA,so when users open an old TOP_N widget, the type selector shows "Area". When
they re-save, the widget is persisted as AREA — gradually migrating users off
the deprecated type.
Widget card: Instead of the old TOP_N-specific query manipulation (trimming
aggregates, setting a results limit), it simply converts the display type to
AREA so the widget renders through the standard area chart path with proper
formatting.
Fixes DAIN-1267