Should we add an icon to duplicate a block?
Hi @paaljoachim. Can you give 2-3 real life examples for what you would need this button ?
And some groove estimate how often you would use this, say per some time span.
On the first sounds very interesting, but I have a blocade now, cannot remember for what I would use it.
A very good question.
Brain storming here... and the more I think of it the more it is falling to pieces. Glad you destroyed my card house of illusion...:)
First off my assumption is that I am able to add a lot of text into a block and style in in various ways. I create a style that I want to use over and over again. I duplicate the block and insert new text.
The reality of this is.... I paste the following text from http://www.lipsum.com/ into a paragraph block:
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.
The above text is split into a heading block and two paragraph blocks. Making duplication not needed for text.
Ok next lets look at the gallery block. I add five images and see a nice looking gallery block with the images in it. Do I need to duplicate this block. Nope not needed. It was easy enough to just create a gallery.
Image. Do I really need to duplicate a image block. Nope not needed.
The bottom line is...
If there is complexity in styling or working with a block then a duplicate block could perhaps be added to reuse the styling of the block. If the complexity level is very low then a duplicate block would not be needed.
I can remember few cases where I could use it.
You did not need to close this. As I said few time Titles of many issues could be ranemed to "Give us Role based button".
They treat develoepr, admin who spend 3 days inside Gutenberg the same way as Users who spend 3 years with it.
I know by tradition core team is good to give filters, actions, snippets here of there for everything. Problem is Gutenberg is another beast and so comprehensive, it could be to much snippets to keep track, collect and not to get lost.
These are good examples Stagger Lee!
I was a bit too trigger happy.... I reopened it again..:)
I think one of the reasons why I involve myself with WP core stuff is that my focus is looking at WP as a user. (I create tutorials and work as an instructor/teacher. As well as do some technical and design stuff. )
Even you missed this with Lorem Ipsum. Perfect for filling websites with dummy content when developing. Duplicate Lorem Ipsum blocks.
Personally, for me that would be a case where I just want Ctrl/Cmd + A to work seamlessly so I can copy dozens of blocks at once.
Yes you are right, I forgot that. Somehow I imagine Gutenberg as completely different than TinyMce and expect copying like this would not work.
I would -1 adding an actual functionality to do this and have copying work. In saying that, it doesn't work right now. I would caution though adding a 'copy block' option at this point. I would be keen to see feedback from tests. As a such I am going to mark this as a question to get input, over an actual enhancement.
I think we can accommodate this one now that we have a dedicated menu for block actions. cc @jasmussen
The UI Mat铆as refers to is new, and I do feel it can accommodate this action:

We can even use it for multi select actions:

Most helpful comment
The UI Mat铆as refers to is new, and I do feel it can accommodate this action:
We can even use it for multi select actions: