SIGN IN SIGN UP
payloadcms / payload UNCLAIMED

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.

0 0 16 TypeScript

refactor(ui): live preview iframe loader (#16004)

Continuation of https://github.com/payloadcms/payload/pull/15999.

Without optimistically loading the live preview window, the initial
loading state is left unhandled when toggling into live preview for the
first time. This causes users to see blank content until the iframe has
loaded, without indication that something is happening.

Now, we display a loading indicator while the iframe request is in
flight, that notably:
1. Only shows if the load takes longer than x ms.
2. If shown, is forced to remain in place for _at least_ x ms to avoid
flickering, even if the request finishes before then.

Before:


https://github.com/user-attachments/assets/70852e80-ac0e-4b96-b59e-8817c65629a6

After:


https://github.com/user-attachments/assets/5fda30d9-8c87-42bc-ba20-a8f7ae8f1245

Related:
- The `ShimmerEffect` component now accepts arbitrary HTML attributes
and supports a new `transparent` prop

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1213727956884086
J
Jake Fletcher committed
167a01eb0ca69894bfc44e2f8b605148ab646922
Parent: e90fb96
Committed by GitHub <noreply@github.com> on 3/20/2026, 10:16:39 PM