Related #317 and #740
Tasks tracking:
Just played with Gutenberg and realized it would be one killer new addition.
If it is demanding to do from coding viewpoint just say it. You all have much to do right now, we know.
Glad to see this is included in Phase 2 Scope & Features. It goes without saying the re-ordering functionality should be accessible and offer an alternative mechanism to drag and drop.
I can drag and drop images in a gutenberg gallery, but they don't always appear in the order I dragged them to. This seems buggy to me. Does anyone else have that experience?
I'll start working on this.
https://github.com/WordPress/gutenberg/pull/14768 adds the basic mechanics for moving the selected image forward/backward - also visual controls. I consider that the first step for this task.
Added a task list in the issue description to track ongoing work and the status of this.
https://github.com/WordPress/gutenberg/pull/15222 adds drag&drop mechanics.
Second attempt to fix gallery tab order can be reviewed at https://github.com/WordPress/gutenberg/pull/15540
I've been thinking it would make more sense to rewrite the Gallery block so that it is a container block (using <InnerBlocks>
) that contains one or more Image blocks.
Doing this would mean that we get drag and drop for free, and that the UI for moving images within a gallery would match the UI for moving blocks within a Group block, or Column blocks within a Columns block, or Navigation Menu Item blocks within a Navigation Menu block.
Related: https://github.com/WordPress/gutenberg/issues/16974
@noisysocks I might be able to try that out soon. thanks for the tip
@mkaz it looks like most everything is crossed off in the issue description. Can we close this?
It actually was me that created that list when I took over the issue from Marcus :)
I'm fine closing this. However, my question would be if we want to track somewhere adding Drag&Drop support for the image gallery?
I think adding drag and drop to the Gallery block as it currently exists is a wasted effort. Better to have Gallery use <InnerBlocks />
and get it for "free". We could open an issue which tracks this 馃檪
Most helpful comment
I'll start working on this.