Copy set of data attributes from one block to the other

Using e.g. the sal solution for scroll animation (fade etc.), one has to add a couple of attribute pairs within the extra section of a block (in the above case 3 to 4 pairs). It would be great if one can copy and paste the whole sets, or, to have them stored globally and just select and insert them.

1 Like

This would be tremendous add to functionality.

Interesting, wonder what the UI for this would look like, or if it would make sense to add to the current Copy/Paste “styles” feature.

not sure yet, as I am not a developer. I guess, probably 2 options, first is to introduce global styles for attribute sets (with the same logic as for your blocks in maintaining changes on a global level), second is to have some copy paste feature, e.g. go to an existing block to the attribute settings and have a copy button, and an insert button to put them to another block.

Would elements with the same attributes not also have the same markup ? e.g a Button - if thats the case would it not make sense to save a block with the attributes as a Local Template and then import when required?

Just thinking aloud

I’ve seen data attributes being used for animations and in that case you may want to apply the same animation to different blocks.

If you were using them for two different things e.g. animations and accessibility then it might get tricky, but being able to delete ones you don’t need might be quicker than adding the ones you do.

Applying them to a Local Template would be a good idea too, but you would need to know everything that goes into it before building out any pages because updating the template does not update the blocks that have already been placed.

to address that point, it might be necessary to introduce groups of attributes, so that each of them could be addressed separately, and put as global at the block itself

@Tom i recall us discussing adding Data Attributes to the Asset Library.
Could be a benefit for quickly adding them to a Block.