Skip to content

UI: Drop the loading spinner for base React plugins - #74762

Merged
bbovenzi merged 1 commit into
apache:mainfrom
jlaneve:react-plugin-base-fallback
Oct 15, 2026
Merged

bbovenzi merged 1 commit into
apache:mainfrom
jlaneve:react-plugin-base-fallback

Conversation

@jlaneve

@jlaneve jlaneve commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

A React plugin with destination: "base" renders above the content of every page, and while its bundle loads, ReactPlugin's Suspense fallback puts a bare spinner in the top left corner. The page itself has already rendered by then, so every full page load shows a stray spinner above it until the plugin's bundle arrives. On a slow connection that can take seconds. Base plugins now render nothing until they are ready. Every other destination keeps the spinner, because there the plugin fills a page or tab that would otherwise be empty.

Call-stack diff

  BaseLayout
  └─ ReactPlugin({ reactApp })              # one per destination "base" app
     ├─ globalThis[reactApp.name] set?      # unchanged: render it directly
     └─ <Suspense fallback>
-       ├─ <Spinner />                      # every destination
+       ├─ null                             # destination "base"
+       ├─ <Spinner />                      # every other destination
        └─ LazyPlugin -> loadPlugin(reactApp)
  • Open question. The page still moves down when a base plugin finishes loading. Two ideas that don't change the plugin API: remember each base plugin's last measured height in localStorage and reserve it while the bundle loads, or have the server add a modulepreload link for base bundles to index.html so they download alongside the UI. Happy to follow up with either if it sounds right.
  • How I checked it. I applied the same one-line change to the 3.3.1 UI and served it from an Astro Runtime 3.3.1 image with a base plugin installed. I held the plugin's bundle so the loading state stayed on screen. Before the change the page showed one spinner; after it, none. With the bundle allowed through, the plugin rendered as before. The two new tests in ReactPlugin.test.tsx cover both fallbacks. The base case fails if its fallback goes back to <Spinner />.

Before and after, with the base plugin's bundle still loading (Airflow 3.3.1):

Before: a spinner sits in the top left above the page.

Before: a stray spinner in the top left corner above the Dags page

After: nothing shows until the plugin is ready.

After: the Dags page with no spinner above it


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code (Claude Opus 5.5) following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Oct 14, 2026

@bbovenzi bbovenzi 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.

Let's just fix the react tests and lgtm

@bbovenzi

Copy link
Copy Markdown
Contributor

For your questions the latter sounds interested if its possible. Of course not every "base" plugin attaches to the top of the page so "remembering" the offset seems too specific and doesn't solve other possible loading issues

A plugin with destination "base" renders above the content of every
page. While its bundle loads, ReactPlugin's Suspense fallback put a bare
spinner in the top left corner, so every full page load showed a stray
spinner until the bundle arrived. Base plugins now render nothing until
they are ready. Plugins on other destinations keep the spinner, since
they fill a page or tab that would otherwise be empty.
@jlaneve
jlaneve force-pushed the react-plugin-base-fallback branch from cc76607 to af4f70f Compare October 15, 2026 01:07
@jlaneve
jlaneve marked this pull request as ready for review October 15, 2026 01:42
@bbovenzi bbovenzi added the backport-to-v3-4-test Backport to v3-4-test label Oct 15, 2026
@bbovenzi bbovenzi added this to the Airflow 3.4.0 milestone Oct 15, 2026
@bbovenzi
bbovenzi merged commit 6cf8332 into apache:main Oct 15, 2026
169 of 174 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-4-test PR Link

vatsrahul1001 pushed a commit that referenced this pull request Oct 18, 2026
…) (#74964)

A plugin with destination "base" renders above the content of every
page. While its bundle loads, ReactPlugin's Suspense fallback put a bare
spinner in the top left corner, so every full page load showed a stray
spinner until the bundle arrived. Base plugins now render nothing until
they are ready. Plugins on other destinations keep the spinner, since
they fill a page or tab that would otherwise be empty.
(cherry picked from commit 6cf8332)

Co-authored-by: Julian LaNeve <lanevejulian@gmail.com>
vatsrahul1001 pushed a commit that referenced this pull request Oct 20, 2026
…) (#74964)

A plugin with destination "base" renders above the content of every
page. While its bundle loads, ReactPlugin's Suspense fallback put a bare
spinner in the top left corner, so every full page load showed a stray
spinner until the bundle arrived. Base plugins now render nothing until
they are ready. Plugins on other destinations keep the spinner, since
they fill a page or tab that would otherwise be empty.
(cherry picked from commit 6cf8332)

Co-authored-by: Julian LaNeve <lanevejulian@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-4-test Backport to v3-4-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants