-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow media upload using drag and drop #1563
Comments
We could make this work really well without ever using the media modal. Drag a single item into the editor, to upload and insert an image block. Drag multiple items into the editor, to upload and insert them all as a gallery block. The "drop zone" could be the same blue line we use to indicate where a block is inserted with the inserter: |
That sounds interesting. I know people who don't mean to insert a gallery when uploading multiple images though, so this would be helpful to have user tests for. |
Will need editor-wide drop behavior (#1563), but current proposal is insertion point. With existing DropZone implementation, easier to refactor as implementing on image block
Will need editor-wide drop behavior (#1563), but current proposal is insertion point. With existing DropZone implementation, easier to refactor as implementing on image block
The image block now supports drag and drop, the gallery block does not. I had opened #2130 to address that but we can use this issue. Do we want to combine Image & Gallery block as @jasmussen suggested, having it determined by how many images a person selects? |
We'll always want both an image block, and a gallery block, simply so it's easy to insert them. However one could be an alias for the other, if they can truly share the same UI. I know currently, the media modal is different for galleries vs. images. CC: @karmatosed as I suspect you'll have some insights here. The ideal flow for a "unifiedy gallery/image" block (with just aliases), I imagine, would be this:
Does that make sense? |
I think it makes sense, but I think we can get it well defined before start making code changes, the two blocks share a lot of the same code so shouldn't be too big of a deal, but a few minor differences that would need clearing up I'm not quite sure about the placeholder, would that be there without needed to insert a block - would there always be a drop zone between blocks if an image is dragged into editor? Other Questions:
|
I think we should look at this as two separate tasks. First task, highest priority, is bringing the upload button to the gallery. We should get this done as part of the milestones in this week or the next. Second task, low priority, could be exploring the merger of the two blocks, and drag and drop improvements. This is really slick polish, but not critical for V1. |
Agreed and (1) is already in progress at #2294 |
I think we can close this as we have a working example in images and galleries, as well as in progress work for general drag and drop of media. |
In the current editor, you can simply drop some media files on it and the media modal opens to upload them.
That's currently not possible with Gutenberg.
The text was updated successfully, but these errors were encountered: