Skip to content

fix: remove suspense boundaries from app plugin templates - #2778

Merged
joshhunt merged 7 commits into
mainfrom
jh/no-suspense-app-boundary
Jul 31, 2026
Merged

fix: remove suspense boundaries from app plugin templates#2778
joshhunt merged 7 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
@joshhunt
joshhunt force-pushed the jh/no-suspense-app-boundary branch from 1e7117a to 82c5c16 Compare July 29, 2026 17:39
@joshhunt
joshhunt force-pushed the jh/no-suspense-app-boundary branch from 82c5c16 to 19b5665 Compare July 30, 2026 09:27
@joshhunt
joshhunt marked this pull request as ready for review July 30, 2026 10:42
@joshhunt
joshhunt requested a review from a team as a code owner July 30, 2026 10:42
@joshhunt
joshhunt requested review from hugohaggmark and jackw and removed request for a team July 30, 2026 10:42
@joshhunt
joshhunt requested a review from a team as a code owner July 30, 2026 11:21
ashharrison90
ashharrison90 previously approved these changes Jul 31, 2026

@ashharrison90 ashharrison90 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm 👍

@github-project-automation github-project-automation Bot moved this from 🧑‍💻 In development to 🔬 In review in Grafana Catalog Team Jul 31, 2026
jackw
jackw previously approved these changes Jul 31, 2026

@jackw jackw left a comment

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.

LGTM 🚀

jsonschema2mk 2.2.0 rewrote its handlebars templates and removed the
mdlevel helper that our custom partials rely on, breaking the
metadata.md generation with 'Missing helper: mdlevel'.
@joshhunt
joshhunt dismissed stale reviews from jackw and ashharrison90 via 0972f5f July 31, 2026 12:11

@ashharrison90 ashharrison90 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm 👍

@joshhunt
joshhunt merged commit dd1293a into main Jul 31, 2026
33 checks passed
@joshhunt
joshhunt deleted the jh/no-suspense-app-boundary branch July 31, 2026 12:30
@github-project-automation github-project-automation Bot moved this from 🔍 In review to 🚀 Done in Grafana Frontend Platform Jul 31, 2026
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Shipped
Status: 🚀 Done

Development

Successfully merging this pull request may close these issues.

4 participants