Skip to content

fix(dashboards): Replace ugly red dashboard widget error states#111140

Merged
gggritso merged 8 commits intomasterfrom
georgegritsouk/dain-1375-replace-red-banner-widget-error-state
Mar 23, 2026
Merged

fix(dashboards): Replace ugly red dashboard widget error states#111140
gggritso merged 8 commits intomasterfrom
georgegritsouk/dain-1375-replace-red-banner-widget-error-state

Conversation

@gggritso
Copy link
Member

Closes DAIN-1375. Current dashboard widgets have a very horrible red banner for error states, and an even more horrible error boundary:

e.g.,
Screenshot 2026-03-19 at 3 34 43 PM
Screenshot 2026-03-19 at 3 04 55 PM

This PR replaces both of them with Widget.WidgetError which is the standard way to handle this.

e.g.,
Screenshot 2026-03-19 at 3 40 22 PM

I had to alias Widget to TWidget to allow importing the Widget component in a few places, but overall, this PR just replaces a bunch of custom error handling done through render props with a simple conditional that uses WidgetError to render errors.

@linear-code
Copy link

linear-code bot commented Mar 19, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 19, 2026
@gggritso gggritso marked this pull request as ready for review March 20, 2026 01:55
@gggritso gggritso requested a review from a team as a code owner March 20, 2026 01:55
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@gggritso
Copy link
Member Author

@edwardgou-sentry heads-up, I had to change the dashboard error reporting since I ditched the error callback, but I think the render path is the same, so the error reporting will work like it did before. Let me know if not, though!

Copy link
Contributor

@DominikB2014 DominikB2014 left a comment

Choose a reason for hiding this comment

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

🧹

@gggritso gggritso merged commit a9b7f8c into master Mar 23, 2026
69 checks passed
@gggritso gggritso deleted the georgegritsouk/dain-1375-replace-red-banner-widget-error-state branch March 23, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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