WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

Grouping blocks on non-consecutive multi-selection. #16902

Open senadir opened 5 years ago

senadir commented 5 years ago

related to this PR #16811 follow up to #16895

this issue handle the design selection of grouping multi-selection non-consecutive blocks, there are three possible outcomes:

below are some gifs & prototypes to live test

- Grouping: First Selected grouping:first-selected

- Grouping: Last Selected grouping:last-selected

- Grouping: Highest Selected grouping:highest-selected

mapk commented 5 years ago

Hey @senadir, thanks for thinking through this interaction! I'm a bit confused by wording being used here though. You're proposing questions around how someone might "group" these together. Immediately, I start thinking of these blocks getting appended to a Group block. But I'm not sure that's what you're asking because I don't see a Group block in the gifs.

I think you're offering ways in which these non-consecutive blocks become consecutive. So ultimately it looks like we have two interactions for handling these non-consecutive blocks.

  1. How do we make them become consecutive? (this issue #16902)
  2. How do we move them together? (#16895 )

My experience with this leads me to think of layers within a graphics program like Adobe Photoshop, Sketch or even Figma. In these applications, there's no real way to just make the non-consecutive layers become consecutive. And selecting non-consecutive layers is more about moving these layers somewhere in the tree.

Photoshop photoshop-layers

Sketch sketch-layers

For this reason, I'm not sure a "grouping" feature is needed for bringing non-consecutive blocks inline with each other. Maybe the issue #16895 is enough to handle what needs handling?

Any thoughts? Am I missing something?

If this is in deed about taking non-consecutive blocks and Grouping them into a Group block, well then I'm completely off... and I like Grouping where the highest selected block resides.

senadir commented 5 years ago

@mapk

... I start thinking of these blocks getting appended to a Group block

that's exactly what I'm trying to demonstrate, it's more about when you select a group of non-consecutive elements, group them using a button or a shortcut, where will this new group block be? will it be in the place of the first element selected? the last element selected or the highest element in them.

I'm feeling that first & last element are the more inutive ones since you start with it or finish with it, but I'm not really sure so that's why I created those examples

I've updated the gifs to demonstrate a grouping behavior

as for having two issues open, well it's actually something of problem in me 😅 I'm a person who is deeply interested in micro transactions & subtle changes, I created those two issues the moment I discovered that there is more than one approach to solve them.

please feel free to close the issues if you deem them unnecessary.

mapk commented 5 years ago

Excellent! The issue is necessary, my apologies for not quite following initially.

In this case, I like the grouping to happen at the first element selected. That works well.

ellatrix commented 4 months ago

Not sure I understand this issue because right now, it's not possible to have non-consecutive selection. Should it be closed in favour of #16797?