Skip to content

fix(dashboard): provide plugin context to widgets - #472

Draft
DavidBabinec wants to merge 1 commit into
mainfrom
fix/dashboard-widget-plugin-context
Draft

fix(dashboard): provide plugin context to widgets#472
DavidBabinec wants to merge 1 commit into
mainfrom
fix/dashboard-widget-plugin-context

Conversation

@DavidBabinec

@DavidBabinec DavidBabinec commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #379

Summary

  • Preserve plugin version and granted permissions when dashboard widgets register.
  • Mount grid, Customize mode, and Block Library renderers through one shared plugin context provider.
  • Reuse that provider for panels, app pages, and canvas overlays, and document the widget hook contract.

Impact

Plugin dashboard widgets can now use plugin identity, settings, scoped routes, commands, and permission-gated host hooks from every dashboard render location.

Verification

  • Broken-state repro: widget context rendered as ||||.
  • Browser retest: context worked in the library, Customize mode, normal view, and scoped route call.
  • Source-removal control: regression test failed with CONTROL_EXIT=1.
  • React Doctor: no issues; build and lint exited 0.
  • bun test: 6,728 passed, 0 failed, exit 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Plugin dashboard widgets render without a PluginContext, so usePluginRoutes throws inside them

1 participant