[PR #1088] [MERGED] Support drag-and-drop image uploads #4915

Closed
opened 2026-10-22 04:11:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1088
Author: @Xelvanis
Created: 5/22/2026
Status: ✅ Merged
Merged: 5/22/2026
Merged by: @Xelvanis

Base: staging ← Head: feature/issue-1005-drag-drop-image-uploads


📝 Commits (2)

  • 9e9f18a Extract shared ImageUploadDropzone with drag-and-drop
  • c8d088d Add drag-and-drop background imports

📊 Changes

4 files changed (+185 additions, -68 deletions)

View changed files

📝 packages/client/src/components/characters/CharacterEditor.tsx (+12 -20)
📝 packages/client/src/components/chat/ChatGallery.tsx (+18 -34)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+11 -14)
➕ packages/client/src/components/ui/ImageUploadDropzone.tsx (+144 -0)

📄 Description

Linked issue

Closes #1005

Why this change

  • Users can already click gallery/background import buttons, but drag-and-drop image files onto those image upload areas did nothing. This makes the upload affordance match what users expect from image pickers.

What changed

  • Added a shared image upload dropzone component that preserves click-to-browse behavior while accepting dropped image files.
  • Reused the dropzone in chat gallery uploads and character gallery uploads.
  • Reused the same dropzone for background image imports so that importer also accepts dropped images.
  • Filters dropped files to supported image types before using the existing upload/import paths.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Ran pnpm --filter @marinara-engine/client lint.
  • Ran pnpm build:client.
  • Opened the local app and verified the chat Gallery upload control renders with the new dropzone behavior.
  • Verified a simulated file drag changes the chat Gallery label to Drop images to upload, then resets after drag leave.
  • Verified the character Gallery upload control renders with the new dropzone behavior.
  • Verified a simulated file drag changes the character Gallery label to Drop character images to upload, then resets after drag leave.
  • Verified the Settings > Appearance background importer renders with the new dropzone behavior.
  • Verified a simulated file drag changes the background importer label to Drop backgrounds to import, then resets after drag leave.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1088 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/22/2026 **Status:** ✅ Merged **Merged:** 5/22/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `staging` ← **Head:** `feature/issue-1005-drag-drop-image-uploads` --- ### 📝 Commits (2) - [`9e9f18a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9e9f18a206ff6abe606b897f9559459ed66d3bdb) Extract shared ImageUploadDropzone with drag-and-drop - [`c8d088d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c8d088da144e14c56040a8c01e40ae42717ed809) Add drag-and-drop background imports ### 📊 Changes **4 files changed** (+185 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+12 -20) 📝 `packages/client/src/components/chat/ChatGallery.tsx` (+18 -34) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+11 -14) ➕ `packages/client/src/components/ui/ImageUploadDropzone.tsx` (+144 -0) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #1005 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Users can already click gallery/background import buttons, but drag-and-drop image files onto those image upload areas did nothing. This makes the upload affordance match what users expect from image pickers. ## What changed <!-- List the key changes in this PR --> - Added a shared image upload dropzone component that preserves click-to-browse behavior while accepting dropped image files. - Reused the dropzone in chat gallery uploads and character gallery uploads. - Reused the same dropzone for background image imports so that importer also accepts dropped images. - Filters dropped files to supported image types before using the existing upload/import paths. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Ran `pnpm --filter @marinara-engine/client lint`. - Ran `pnpm build:client`. - Opened the local app and verified the chat Gallery upload control renders with the new dropzone behavior. - Verified a simulated file drag changes the chat Gallery label to `Drop images to upload`, then resets after drag leave. - Verified the character Gallery upload control renders with the new dropzone behavior. - Verified a simulated file drag changes the character Gallery label to `Drop character images to upload`, then resets after drag leave. - Verified the Settings > Appearance background importer renders with the new dropzone behavior. - Verified a simulated file drag changes the background importer label to `Drop backgrounds to import`, then resets after drag leave. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <!-- Add before/after screenshots or recordings for UI changes --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:41 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4915
No description provided.