Skip to content

feat(chat): stage images dropped on the composer - #1032

Merged
bmc08gt merged 1 commit into
mainfrom
feat/composer-drop-images
Oct 10, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
feat/composer-drop-images

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Dragging an image onto the conversation bottom bar now stages it as a photo chip, the same as picking it from the library. This is mainly for the floating screenshot thumbnail: take a screenshot, drag the thumbnail onto the composer, and it's attached.

The bar takes the drop with .onDrop(of: [.image]), covering the text field, the chip strip and the margins. ChatPhotoStaging.loadImage(_ NSItemProvider) loads the image data and runs it through the existing decode, so a full-size screenshot gets the same downsampling as a picked photo. stageDropped reuses stage, so drop order and the full-composer stop match the picker.

A drop is refused with a forbidden proposal when the chat doesn't accept media or a message is being edited, and stageDroppedImages checks acceptsMedia again before staging.

The text field is a SwiftUI TextField, and its inner text view passes image-only drags up to the bar. Pasting an image into the field isn't handled here.

Android counterpart: code-payments/code-android-app#1746

Dropping an image on the bottom bar (the system screenshot thumbnail, or an
image from another app in split view) stages it as a photo chip through the
same load, decode and cap path as a picked photo. A chat that takes no photos
answers the drag with a forbidden proposal.
@bmc08gt bmc08gt self-assigned this Oct 9, 2026
@bmc08gt
bmc08gt merged commit 149cca8 into main Oct 10, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant