Premium Analytics: Add dashboard widget error handling#49657
Draft
nerrad wants to merge 12 commits into
Draft
Conversation
Contributor
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
nerrad
commented
Jun 16, 2026
|
|
||
| const ERROR_TYPES: Exclude< GlobalErrorType, null >[] = [ 'network', 'auth', 'server' ]; | ||
|
|
||
| const panelStyle: CSSProperties = { |
Contributor
Author
There was a problem hiding this comment.
Odd that the story requires this much CSS 🤔
fe8b52f to
da9047c
Compare
Private, source-consumed copy of @wordpress/grid until core publishes it.
Private, source-consumed copy of @wordpress/widget-primitives until core publishes it.
Private, source-consumed dashboard engine; depends on jetpack-widget-primitives and jetpack-grid.
Renders the WidgetDashboard engine via wp-build, bundling the grid/primitives/dashboard packages.
useWidgetTypes drives discovery via /wp/v2/widget-modules; hello-world builds as a lazy-loaded script module.
Hook the page boot-dependencies filter so widget modules reach the import map; move the endpoint to the jetpack/v4 namespace.
@wordpress/grid and widget-primitives references in widget-dashboard JSDoc/comments/README, per the faithful-source sync policy.
5bb6dd9 to
7ff7f71
Compare
da9047c to
31f0b7f
Compare
31f0b7f to
da58724
Compare
da58724 to
d59f402
Compare
7ff7f71 to
22e10a7
Compare
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.
Why?
Recoverable widget data errors need a host-owned UI path instead of each widget inventing its own notice treatment. The dashboard already owns widget chrome, loading, and thrown-error boundaries, so it should also own the recoverable data-error surface exposed by widgets.
This likely belongs upstream in the dashboard/widget primitives work long term. This draft uses the Premium Analytics dashboard as a practical place to validate the contract and UI behavior with real widget data states before proposing the path upstream.
Proposed changes
useWidgetError()aligned with the dashboard chrome behavior.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
nvm use 24.15.0.pnpm --filter @automattic/jetpack-storybook storybook:build.Packages/Premium Analytics/Data/Providers/GlobalErrorProvider.Packages/Premium Analytics/Widgets Toolkit/DashboardWidgetError.