-
Notifications
You must be signed in to change notification settings - Fork 385
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 selecting of one or more elements upon command-click, select #2787
Comments
So.... In Gutenberg multi-selection is really designed for selecting a range of blocks from start to end, not a loose list of blocks that could be all over the place. Examples in the code: This is what you currently get when selecting two blocks in a row in Gutenberg: As you can see, one can easily (un)group or remove a list of selected blocks. There's also a selection indicator in the sidebar. These features directly rely on these selectors, e.g. Ideally we would make a contribution to Gutenberg to change the way multi-selection works internally, to allow multi-selection without having to specify a range. Next, we could add a change that allows multi-selecting blocks by using Cmd+Click. (In the same PR or a new one) That means the change would make it into an upcoming version of the Gutenberg plugin, and then into WordPress 5.3. Alternatively we could try to roll our own, which would mean we need to override a bunch of components. Not sure how feasible it is, but given the additional maintenance burden, I don't think we can get around contributing this directly upstream. |
Upstream issue created: WordPress/gutenberg#16797 ^ cc @miina |
Upstream PR work in progress: WordPress/gutenberg#16811 |
The above PR seems to work well in inner blocks in the regular block editor (e.g. within a column block), but not for our custom blocks on a story page 😕 |
I can debug a little bit to see if there's a fixable reason why. |
OK, so looks like there is a conflict with Just removing Especially with Text block for some reason, some other blocks are still kind of draggable. Tried briefly adding |
Made some good progress again upstream today: WordPress/gutenberg#16811 |
Looks like it has to wait until WordPress/gutenberg#16835 is merged |
As a user I want to be able to select more than on block at a time.
AC1: Upon holding the command key down, and selecting individual blocks a user will be able to select one or more blocks.
AC2: Blocks will remain selected, until user clicks without holding command
The text was updated successfully, but these errors were encountered: