Skip to content

ui: PaneLoader for center-of-page loading + finish radar-icon swap#549

Merged
nadaverell merged 1 commit intomainfrom
feat/pane-loader
Apr 27, 2026
Merged

ui: PaneLoader for center-of-page loading + finish radar-icon swap#549
nadaverell merged 1 commit intomainfrom
feat/pane-loader

Conversation

@nadaverell
Copy link
Copy Markdown
Contributor

@nadaverell nadaverell commented Apr 27, 2026

Summary

Builds on #548 (which introduced the animated radar SVG and swapped the first batch of full-screen Loader2 sites). This PR extracts a reusable PaneLoader component and finishes the sweep so every in-pane / modal-body / wizard-step loading state now uses the same icon + label shape.

PaneLoader lives at packages/k8s-ui/components/ui/PaneLoader.tsx and is exported from @skyhook-io/k8s-ui. Call sites collapse from a 5-line <div>… <img/>… <span>…</span></div> block to one line, e.g. <PaneLoader label="Loading topology…" className="flex-1" />.

What's swapped (16 sites)

  • k8s-ui: ResourcesView, TopologyGraph (Loading topology…), TimelineList, WorkloadView (3 sites).
  • radar/web: HomeView, AuditView, CostView, HelmView, ChartBrowser, HelmReleaseDrawer, InstallWizard chart-loading, ManifestViewer, ManifestDiffViewer, ValuesViewer, TimelineSwimlanes, TrafficView (Connecting to traffic source… / Loading traffic data…), TrafficWizard detecting, PodFilesystemModal.

What stays bespoke

Each kept the raw radarLoadingIcon import for a reason that doesn't fit PaneLoader's simple icon+label shape:

  • App.tsx (3 sites: AuthBarrier OIDC redirect, "Connecting to cluster", "Switching context") — primary heading + sub-context + optional progress message.
  • TrafficWizard checking state — icon + h2 + sublabel + action buttons.
  • ImageFilesystemModal — dynamic label that toggles between two strings plus a conditional sub-line.

Side cleanups

  • Ellipsis standardized to (Unicode) across swapped labels.
  • Dropped now-unused Loader2 imports where no inline spinner remained.
  • Bumped @skyhook-io/radar-app 0.1.7 → 0.1.8 since the visible loading states changed shape.

Future tweaks to the loader visual now touch one file. Net diff: -119 +73 (~70 lines of repeated structure removed).


Note

Low Risk
Low risk UI refactor that mostly consolidates loading spinners into a shared component; main risk is minor layout/styling regressions in affected screens and modals.

Overview
Adds a shared PaneLoader component to k8s-ui (exported via components/ui/index.ts) to standardize center-of-pane loading states using the animated radar icon + label.

Replaces numerous bespoke loading placeholders in k8s-ui views (resources, timeline, topology, workload) and web screens/modals (home, audit, cost, helm flows, timeline, traffic, filesystem) with PaneLoader, and bumps @skyhook-io/radar-app version 0.1.70.1.8.

Reviewed by Cursor Bugbot for commit ba3a2b2. Bugbot is set up for automated code reviews on this repo. Configure here.

Extract PaneLoader (k8s-ui/components/ui/PaneLoader.tsx) wrapping the
animated radar icon + label in the column-stacked layout we standardized
on, exposed via the @skyhook-io/k8s-ui barrel. 16 in-pane Loader2 sites
across radar OSS now use it: topology, both timeline views (swimlanes +
list), helm (HelmView, ChartBrowser, HelmReleaseDrawer, InstallWizard
chart-loading, ManifestViewer, ManifestDiffViewer, ValuesViewer), traffic
(TrafficView connecting/loading + TrafficWizard detecting), audit, cost,
home, resource pane, workload (3 sites), pod filesystem modal.

The remaining bespoke holdouts (App.tsx connecting/switching/oidc,
TrafficWizard checking, ImageFilesystemModal) keep using the raw
radarLoadingIcon import — each has multi-line content (heading +
sub-context + actions or a dynamic sub-line) that doesn't fit
PaneLoader's icon+label shape.

Side cleanups:
- Standardize ellipsis to … (Unicode) across swapped labels.
- Drop now-unused Loader2 imports where no inline spinner remains.
- Bump @skyhook-io/radar-app 0.1.7 → 0.1.8 since the visible loading
  states changed shape.
@nadaverell nadaverell requested a review from hisco as a code owner April 27, 2026 21:24
@nadaverell nadaverell merged commit f9c50fb into main Apr 27, 2026
8 checks passed
@nadaverell nadaverell deleted the feat/pane-loader branch April 27, 2026 21:33
nadaverell added a commit that referenced this pull request Apr 27, 2026
…l source (#550)

The radar-app-v0.1.8 publish failed because the workflow runs
`npm version 0.1.8 --no-git-tag-version` against source already at
0.1.8 (#549 bumped it before tagging), and npm errors with "Version
not changed". Two fixes:

- Add --allow-same-version so source-equal-to-tag isn't fatal. Future
  contributors can bump source freely without breaking the publish.
- Bump source to 0.1.9 to skip the snared 0.1.8 tag and publish a clean
  version. The 0.1.8 tag stays as a no-op record.
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.

1 participant