fix(media): refine media library and asset details UX#1824
Conversation
🦋 Changeset detectedLatest commit: 033b227 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
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 |
Scope checkThis PR changes 1,421 lines across 6 files. Large PRs are harder to review and more likely to be closed without review. If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs. See CONTRIBUTING.md for contribution guidelines. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 033b227 | Jul 04 2026, 11:34 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | 033b227 | Jul 04 2026, 11:33 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 033b227 | Jul 04 2026, 11:34 PM |
There was a problem hiding this comment.
Pull request overview
Refines the admin media library UX by switching view toggles and provider navigation to Kumo Tabs, improving empty/no-results states, and moving asset details into a centered responsive dialog (including provider-aware deletion).
Changes:
- Replace media library view/provider switching controls with Kumo Tabs and refine toolbar + empty/no-results states.
- Convert the asset detail UI from a slide-out panel to a responsive dialog, add dirty-state handling, and route provider deletions through the provider API when supported.
- Update and expand component tests to cover the new dialog behaviors, focus restoration, and provider deletion behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/admin/src/components/MediaLibrary.tsx | Reworks library header/toolbar/empty states, switches view/provider controls to Tabs, and opens a detail dialog. |
| packages/admin/src/components/MediaDetailPanel.tsx | Converts the detail panel into a dialog, adds busy/dirty handling, and supports provider deletion + URL hiding. |
| packages/admin/src/router.tsx | Removes now-unneeded delete plumbing from MediaPage into MediaLibrary. |
| packages/admin/tests/components/MediaLibrary.test.tsx | Updates tests for Tabs roles, new empty state copy, dialog open timing, delete flow, and focus restoration. |
| packages/admin/tests/components/MediaDetailPanel.test.tsx | Updates tests for dialog rendering, read-only provider behavior, provider deletion routing, and dirty/close behavior. |
| .changeset/media-library-refinements.md | Patch changeset describing the media library/detail UX refinements. |
Comments suppressed due to low confidence (1)
packages/admin/src/components/MediaLibrary.tsx:98
- The debounced search effect can send a stale value when switching providers quickly. Because it depends on activeProvider, switching back to the local provider can run the effect while debouncedSearch is still the previous term (even though the input was cleared), briefly applying the wrong server-side search.
React.useEffect(() => {
if (activeProvider === "local" && onLocalSearchChange) {
onLocalSearchChange(debouncedSearch.trim());
}
}, [debouncedSearch, activeProvider, onLocalSearchChange]);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Overlapping PRsThis PR modifies files that are also changed by other open PRs: This may cause merge conflicts or duplicated work. A maintainer will coordinate. |
What does this PR do?
Refines the admin media library and asset details flow: the library uses Kumo tabs for view switching, has clearer empty/no-results states, opens asset details in a centered responsive dialog, and routes provider asset deletion through the provider API when supported.
Closes: N/A
Type of change
Checklist
pnpm typecheckpasses (verified withpnpm --filter @emdash-cms/admin typecheck)pnpm lintpasses (verified withpnpm --silent lint:json | jq '.diagnostics | length'->0)pnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs -- a workflow extracts catalogs on merge tomain.AI-generated code disclosure
Screenshots / test output
pnpm --silent lint:json | jq '.diagnostics | length'->0pnpm --filter @emdash-cms/admin typecheck-> passedpnpm --filter @emdash-cms/admin test -- tests/components/MediaLibrary.test.tsx tests/components/MediaDetailPanel.test.tsx->83test files passed,1041tests passedTry this PR
Open a fresh playground →
A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.
Tracks
pr/media-library-refinements. Updated automatically when the playground redeploys.