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

Explore: Multiselection by dragging #35117

Closed
wants to merge 1 commit into from
Closed

Conversation

adamziel
Copy link
Contributor

Just a fun idea I had after trying out a few note-taking apps. Selecting multiple blocks by drag&drop seems like a natural interaction to have:

Multiselection.example.mp4

To try it yourself, apply this PR and go to Gutenberg demo editor.

The code is not quite mergeable, that's more of an exploration to start a discussion. I wonder what y'all think.

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

@adamziel adamziel added General Interface Parts of the UI which don't fall neatly under other labels. [Package] Edit Post /packages/edit-post labels Sep 24, 2021
@adamziel adamziel changed the title Try: Multiselection by dragging Explore: Multiselection by dragging Sep 24, 2021
@javierarce
Copy link
Contributor

I wonder what y'all think.

I think that this is… very cool!

The idea would be to invoke this tool from the Select mode, right?

@kevin940726
Copy link
Member

I think this is pretty cool! 🌟

Though I don't think this should be enabled by default, this should only be enabled in navigation mode or something like that.

@jasmussen
Copy link
Contributor

This is fun, looks great! Making it still simpler to select blocks feels good. Whether it needs to be select mode only or can exist in both I think remains to be seen. But it does remind me that we have some general issues with block selection, that could be good to look at either in conjunction with this, or after.

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.

@draganescu
Copy link
Contributor

I tried to revisit this but it doesn't seem to build anymore (ran ye old npm install to no success). Nevertheless, could we instead turn it into an issue (including @jasmussen 's suggestions)?

@adamziel
Copy link
Contributor Author

Good idea @draganescu! Let's close this one and continue in #41684

@adamziel adamziel closed this Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Package] Edit Post /packages/edit-post
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants