Files
fusion/packages/dashboard/app/plugins/PluginDashboardViewHost.tsx
Fusion 9e52028102 feat(FN-3079): add plugin dashboard views and dependency graph plugin
- Add plugin dashboard view registration and hosting across core, dashboard routes, and plugin SDK exports
- Integrate plugin-provided views into app navigation, mobile/header UI, and view state hooks with coverage
- Add fusion-plugin-dependency-graph example plugin with persisted storage, dashboard view UI, and manifest wiring
- Update plugin authoring and architecture docs for dashboard view extension points
- Add a changeset for @runfusion/fusion covering plugin dashboard view support

Fusion-Task-Id: FN-3079
2026-05-01 23:32:35 -07:00

21 lines
689 B
TypeScript

import { resolvePluginDashboardView, MissingPluginDashboardView, parsePluginTaskViewId } from "./pluginViewRegistry";
import type { PluginDashboardHostContext, PluginTaskView } from "./pluginViewRegistry";
export function PluginDashboardViewHost({
taskView,
context,
}: {
taskView: PluginTaskView;
context: PluginDashboardHostContext;
}) {
const parsed = parsePluginTaskViewId(taskView);
if (!parsed) return null;
const ViewComponent = resolvePluginDashboardView(parsed.pluginId, parsed.viewId);
if (!ViewComponent) {
return <>{MissingPluginDashboardView({ pluginId: parsed.pluginId, viewId: parsed.viewId })}</>;
}
return <ViewComponent context={context} />;
}