Skip to content
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

Select Many Blocks Via Dragging #41684

Open
adamziel opened this issue Jun 13, 2022 · 6 comments
Open

Select Many Blocks Via Dragging #41684

adamziel opened this issue Jun 13, 2022 · 6 comments
Labels
[Feature] Block Multi Selection The ability to select and manipulate multiple blocks General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Needs design efforts. [Package] Edit Post /packages/edit-post [Type] Enhancement A suggestion for improvement.

Comments

@adamziel
Copy link
Contributor

Selecting multiple blocks by drag&drop seems like a natural interaction to have:

Multiselection.example.mp4

The idea was initially explored in a quick&dirty way in #35117. The PR is closed now in favor of this issue. It is worth noting that @jasmussen proposed with a number of great improvements there:

First off, the multi-select style which paints a browser selection across multiple blocks is misleading and doesn't look very good. We likely need a new design for multi selection. So instead of this:

Screenshot 2021-09-28 at 08 34 32

it could be this:

new multiselect

That might work better with the dragging motion as well, as that makes it even more obvious you are selecting blocks, not text:

new multiselect side

Secondly, deselecting blocks at the moment is a bit fiddly. Simply addressing #5803 would be a good start.

Thirdly, it opens up the conversation about non consecutive block selection (#16797) — what happens when you hold shift and select after you've made an initial selection?

Finally, and this is something @jameskoster has talked about for a while: it could make sense to let select mode be default. We might need to make it easier to stay in edit mode for longer — but the key benefit would be that we could enhance the Escape key behavior: making the first press of Escape deselect the block.

While these are all separate issues, they do speak of some challenges we have around selection at the moment, which might be good to look at in case we add more complexity with this one.

cc @jasmussen @tellthemachines @talldan @noisysocks @ellatrix @talldan @getdave @kevin940726 @javierarce @draganescu

@adamziel adamziel added General Interface Parts of the UI which don't fall neatly under other labels. [Package] Edit Post /packages/edit-post labels Jun 13, 2022
@adamziel adamziel changed the title Add multiselection by dragging Select Many Blocks Through Dragging Jun 13, 2022
@adamziel adamziel changed the title Select Many Blocks Through Dragging Select Many Blocks Via Dragging Jun 13, 2022
@jameskoster
Copy link
Contributor

It's also important to figure out the interaction with containers. Oftentimes in design software, the container must be fully inside the selection box for it to be included, otherwise its children are selected.

@jameskoster jameskoster added the Needs Design Needs design efforts. label Jun 13, 2022
@mtias
Copy link
Member

mtias commented Jun 25, 2022

It'd be good to revisit this. I'd consider trying it in select mode only at first.

@noisysocks
Copy link
Member

Definitely think would make select mode a lot more useful. Any Craft fans here? It has a pretty nice implementation of this. It feels very natural to press Esc to enter visual mode, make a selection, do something (transform, delete, indent, group), then click twice to go back to edit mode.

Kapture.2022-06-29.at.12.05.49.mp4

Admittedly our needs are a lot more complex though as we support nested blocks as @jameskoster says.

@mrfoxtalbot mrfoxtalbot added the [Type] Enhancement A suggestion for improvement. label Mar 27, 2023
@mrfoxtalbot
Copy link

Hey @adamziel. I run into this issue while looking for something different I believe this has already been implemented, right?. I recorded a video of how it is now possible to select multiple blocks just by clicking and dragging:

Screen.Capture.on.2023-03-27.at.09-14-52.mp4

Would this make sense? Were you referring to this?

Interestingly enough, @mtias suggested implementing this in "select" mode first but we went the opposite route.

@adamziel
Copy link
Contributor Author

@mrfoxtalbot kind of, it's not the same visual rectangular selection and it wouldn't do that well in a visual mode where editing is disabled

@ellatrix
Copy link
Member

Related: #23290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Multi Selection The ability to select and manipulate multiple blocks General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Needs design efforts. [Package] Edit Post /packages/edit-post [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

6 participants