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

Urgently need to be able to duplicate blocks #4056

Open
kenmanheimer opened this issue Dec 6, 2022 · 6 comments
Open

Urgently need to be able to duplicate blocks #4056

kenmanheimer opened this issue Dec 6, 2022 · 6 comments

Comments

@kenmanheimer
Copy link

Is your feature request related to a problem? Please describe.
Currently the only way to duplicate a block is to copy the text of the parts of the block into a new block. This is not workable for composite blocks with arbitrarily elaborate structures like columns blocks, tables, accordion blocks, and combinations of these kinds of things!

Describe the solution you'd like

  1. Every block type should include a method to copy or cut the block as a unit.
    • This operation in container types can pass it recursively to contained blocks.
  2. Every block menu should include a copy, cut, and a paste option
  • The copied contents should be externalized so it can be carried in the browser / OS cut buffer, and reinternalized to structures when pasted to a block or handled appropriately by the paste mechanisms of external editor facilities.

In any case, some way to duplicate any block is urgenly needed.

@tiberiuichim
Copy link
Contributor

@kenmanheimer I'm not sure you know, but Volto supports multi-block copy/paste. Hold the Shift key and click on a block below (might take multiple tries).

Some of the layout addons (ex: volto-columns-block) integrate with this mechanism (so you can copy multiple blocks from inside exactly one column). Not all layout addons support this, it has to be manually implemented by each addon.

@kenmanheimer
Copy link
Author

@kenmanheimer I'm not sure you know, but Volto supports multi-block copy/paste. Hold the Shift key and click on a block below (might take multiple tries).

I had no idea that this is available, and it's great to know!

I am trying it, but not getting it to work. I will continue trying, maybe I'm including something that doesn't have the provision or not doing it quite right, and maybe the provision will get easier to use as it gets shaken out. Anyway, I'm glad that it's being provided, and can get better.

Some of the layout addons (ex: volto-columns-block) integrate with this mechanism (so you can copy multiple blocks from inside exactly one column). Not all layout addons support this, it has to be manually implemented by each addon.

It sound like an important requirement for inclusion in the core, or in some kind of canonical collections...

@kenmanheimer
Copy link
Author

One more thought. I seem to have stumbled over a bunch of functionality that could use better visibility. (One thing that springs to mind is the ability to divide list blocks by dedenting a list item to zero.) I think there's a real challenge and opportunity for the Volto project to gather and organize instructions, including as part of the block dialogs when using the functionality.

@tiberiuichim
Copy link
Contributor

@kenmanheimer Here's a video where I demonstrated this feature: https://www.youtube.com/watch?v=wojij3xU_h0

@tiberiuichim
Copy link
Contributor

There's an ongoing initiative lead by @stevepiercy to document things like this. See #3827

@kenmanheimer
Copy link
Author

@kenmanheimer Here's a video where I demonstrated this feature: https://www.youtube.com/watch?v=wojij3xU_h0

Fantastic. Exactly what I was seeking!

I have some things to note:

  • It took me a while to notice the copy/cut/delete icons that show when stuff is selected. That's crucial, needs to be prominently stated particularly because the very commonly used keyboard gestures, Ctrl-C / Ctrl-X / Del, don't work here.
  • (It would be nice if Ctrl-C/-X/Del were made to work, if browsers provide affordance for it.)
  • I noticed that Ctrl-Left-Mouse toggles selection of the clicked element. This is very in keeping with conventional practices, along with Shift-Left-Mouse extending the selection.

I would be happy to note these details somewhere. I looked at the conversation in #3827 and it seems like that is developing, so I'm going to drop the collection of details I have in a comment in that thread, hopefully not misusing the thread in the process...

Thanks, @tiberiuichim!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants