How to keep prototype connection when using "paste to replace"

The new “paste to replace” feature is great, but when I replace an element that has a prototype connection, the newly swapped in item that I pasted does not have the connection anymore. Is there any way around that issue?

(FYI, a month ago I put the idea of “maintain prototype connection when using paste to replace” into the Feedback section, but nobody thought it was important, which I found odd).

1 Like

Well it’s tricky right? While this might work with closely matching components and prototype actions on the parent frame, it’s pretty hard to envision the behaviour for elements within the frame — what should happen if the previous component had “OK” and “Cancel” buttons, each with prototype links, but the component you “paste to replace” has only one, or neither of those buttons?

The obvious answer is “well, those prototype actions are thrown away”, and I can see the argument that at least keeping the parent links would be less disruptive, is it definitely the best solution…?

e.g. what if instead of “paste to replace” you pasted the new component alongside, then you could copy/paste interactions from the old to new component, then finally remove the old one as it’s no longer needed.

Might that work…?

Yeah, good point about the stuff inside. I was mostly just thinking of replacing single elements. I guess I’ll just do workarounds and manual labor as needed.

FYI @Matthew_Schwartz you can copy-paste prototype interactions if you weren’t aware: Is it possible to copy paste prototype interaction? - #5 by Hannu_Aarniala

I know that this isn’t exactly what you were looking for but hopefully will decrease some of that manual labour. Especially with tooltips that have popovers / overlays, I found that this does save time as the copy-paste remembers the manual placing of the overlay, even when copied/pasted to another frame (as long as the that frame’s size doesn’t change in relation to the original that had the interaction).

It seems that it doesn’t use the parent frames coordinates to map this, but the overlay’s position related to the frame where the interaction is, which is nice.

1 Like

Thanks, I will check it out

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.