Skip to content

feat(media) Add media drag uploads and picker metadata editing#1366

Open
masonjames wants to merge 1 commit into
emdash-cms:mainfrom
masonjames:codex/media-dnd-picker-metadata
Open

feat(media) Add media drag uploads and picker metadata editing#1366
masonjames wants to merge 1 commit into
emdash-cms:mainfrom
masonjames:codex/media-dnd-picker-metadata

Conversation

@masonjames
Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the next media workflow improvements from discussion #990:

  • Adds drag-and-drop batch uploads to the Media Library and Media Picker.
  • Reuses the existing upload paths with shared batch progress and error handling.
  • Adds active/reject drop states, upload progress, success/error messages, and invalid-file rejection.
  • Keeps picker uploads selected after successful upload, including provider uploads.
  • Adds inline alt text and caption editing in the Media Picker using the existing updateMedia behavior.
  • Adds missing-alt, alt-set, and caption-set indicators plus quick edit affordances.

Related discussion: #990

Closes: n/a (discussion-driven feature)

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: Make media handling a first-class editing workflow #990

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: GPT-5 Codex, RepoPrompt workflow tools

Screenshots / test output

Manual QA completed locally before PR creation; optional RTL check was not rerun manually. The implementation was also smoke-checked in Arabic/RTL during development.

Automated checks run locally:

  • pnpm format
  • pnpm lint:json | jq '.diagnostics | length' -> 0
  • pnpm typecheck -> passed
  • pnpm --filter @emdash-cms/admin test tests/components/MediaLibrary.test.tsx tests/components/MediaPickerModal.test.tsx --run -> 64 passed
  • pnpm --filter @emdash-cms/admin build -> passed

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 5, 2026

🦋 Changeset detected

Latest commit: b02fa2f

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

This PR includes changesets to release 14 packages
Name Type
@emdash-cms/admin Minor
emdash Minor
@emdash-cms/cloudflare Minor
@emdash-cms/sandbox-workerd Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/auth Minor
@emdash-cms/blocks Minor
@emdash-cms/gutenberg-to-portable-text Minor
@emdash-cms/x402 Minor
create-emdash Minor
@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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Scope check

This PR changes 2,259 lines across 8 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.

@masonjames masonjames changed the title [codex] Add media drag uploads and picker metadata editing feat(Media) Add media drag uploads and picker metadata editing Jun 5, 2026
@masonjames masonjames changed the title feat(Media) Add media drag uploads and picker metadata editing feat(media) Add media drag uploads and picker metadata editing Jun 5, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 5, 2026

Open in StackBlitz

@emdash-cms/admin

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

@emdash-cms/auth

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

@emdash-cms/auth-atproto

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

@emdash-cms/blocks

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

@emdash-cms/cloudflare

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

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

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

emdash

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

create-emdash

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

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

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

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@1366

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@1366

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@1366

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@1366

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@1366

@emdash-cms/x402

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

@emdash-cms/plugin-ai-moderation

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

@emdash-cms/plugin-atproto

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

@emdash-cms/plugin-audit-log

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

@emdash-cms/plugin-color

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

@emdash-cms/plugin-embeds

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

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@1366

@emdash-cms/plugin-forms

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

@emdash-cms/plugin-webhook-notifier

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

commit: b02fa2f

@masonjames masonjames marked this pull request as ready for review June 5, 2026 19:48
@github-actions github-actions Bot added the review/needs-review No maintainer or bot review yet label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/admin review/needs-review No maintainer or bot review yet size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant