Skip to content

fix(admin): show loader instead of empty search message while content list loads#815

Merged
ascorbic merged 1 commit intomainfrom
fix/content-list-loading-state
Apr 28, 2026
Merged

fix(admin): show loader instead of empty search message while content list loads#815
ascorbic merged 1 commit intomainfrom
fix/content-list-loading-state

Conversation

@ascorbic
Copy link
Copy Markdown
Collaborator

What does this PR do?

The content list table briefly renders No results for "" while the initial fetch is in flight. The empty-state branch was gated on !isLoading, so loading + empty items fell through to the "no search results" branch with an empty searchQuery. Render a <Loader> row when isLoading && items.length === 0; applied the same fix to the trash tab (which was showing "Trash is empty" while loading).

Closes #

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Do not include messages.po changes except in translation PRs — a workflow extracts catalogs on merge to main.
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: https://github.com/emdash-cms/emdash/discussions/...

AI-generated code disclosure

  • This PR includes AI-generated code

Screenshots / test output

Manual verification: navigate to a content list page; the table now shows a spinner + "Loading..." while the first page is fetched, instead of No results for "".

… list loads

The content list table fell through to the "No results for ''" branch when
items hadn't yet arrived, because the empty-state branch required
!isLoading. Render a loader row when isLoading and items are empty; same
fix for the trash tab.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 28, 2026

🦋 Changeset detected

Latest commit: d9968a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@emdash-cms/admin Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-perf-coordinator d9968a0 Apr 28 2026, 07:00 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache d9968a0 Apr 28 2026, 07:03 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-i18n d9968a0 Apr 28 2026, 07:01 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground d9968a0 Apr 28 2026, 07:01 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
docs d9968a0 Apr 28 2026, 07:01 PM

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 28, 2026

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@815

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@815

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@815

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@815

emdash

npm i https://pkg.pr.new/emdash@815

create-emdash

npm i https://pkg.pr.new/create-emdash@815

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@815

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@815

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@815

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@815

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@815

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@815

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@815

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@815

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@815

commit: d9968a0

@ascorbic ascorbic merged commit ddbf808 into main Apr 28, 2026
33 checks passed
@ascorbic ascorbic deleted the fix/content-list-loading-state branch April 28, 2026 19:25
@emdashbot emdashbot Bot mentioned this pull request Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant