Skip to content

fix: remove suspense boundaries from app plugin templates#2778

Draft
joshhunt wants to merge 3 commits into
mainfrom
jh/no-suspense-app-boundary
Draft

fix: remove suspense boundaries from app plugin templates#2778
joshhunt wants to merge 3 commits into
mainfrom
jh/no-suspense-app-boundary

Conversation

@joshhunt

@joshhunt joshhunt commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

When Grafana loads app plugins, it already wraps them in a suspense boundary at the route level (see GrafanaRoute.tsx). This ensures that all pages across Grafana - core or from plugins - share the same initial loading state.

The App templates teaches plugin developers to wrap their app in a Suspense boundary with a LoadingPlaceholder, which is problematic for two reasons:

  • LoadingPlaceholder is not a suitable loading placeholder for a whole app
    • Instead, in @grafana/ui 13.2 we'll release PageLoader that is designed to be displayed full screen
  • App plugins including their own suspense boundary at the top of the app defeats the Suspense boundary the Grafana page is wrapped in, meaning they don't get the unified loading UI.

Special notes for your reviewer:

  • Validate all places an App component is rendered in Grafana is wrapped in <Suspense />
  • Validate all places an AppConfig component is rendered in Grafana is wrapped in <Suspense />
  • Decide what to do for all other plugin component entry points. Are they already wrapped in suspense in Grafana core? It would be great if we could tell plugin devs "you never need a top-level suspense boundary".

import { lazy } from 'react';
import { AppPlugin } from '@grafana/data';

const LazyApp = lazy(() => import('./components/App/App'));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@grafana-catalog-project-bot grafana-catalog-project-bot Bot moved this from 📬 Triage to 🧑‍💻 In development in Grafana Catalog Team Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🧑‍💻 In development
Status: 🔍 In review

Development

Successfully merging this pull request may close these issues.

2 participants