Suggestion, Copy and Paste in App Structure/DOM Tree/Code View

I cut corners and Copy and Paste a lot of repeat elements. Would be great if I could do this within the App Structure/DOM Tree. Just right click where/what I want and hit Copy/Paste (in to the structure itself).

Also selecting the full contents between tags and highlight the selection between the tags for example…

Damn I don’t want much do I… Sorry :wink:

6 Likes

I would find this really useful too. At least I think I would (I’m not sure what you mean by ‘repeat’ elements - just elements you want to reuse or repeating elements?). This may be what you’re suggesting anyway, but…

I would find it really useful to be able to select an item in App Structure and have that element (and child elements) copied to the clipboard - to paste somewhere (in the current or a different page). The right-click on an App Structure element is already used - perhaps a little copy icon could be included on the current panel. Or, having a copy option in code view to do the same thing. This could be added to the existing right-click menu.

2 Likes

A selection such as a Card body or Row, or any element that I use more than once.

I thought that’s what you meant. A very good idea.

1 Like

Perfect!

1 Like

I totally agree with you Dave, this would be very useful!

This is interesting. Would be really helpful.
Pasting on other pages would be even better.
Although, right-click would be a conflict with current add component window, which is helpful too.
Ctrl+C & Ctrl+V keyboard shortcuts can be used.

Why would pasting be even better (or useful)? Do you mean pasting direcly into the App Structure panel? I would probably prefer to paste in code view anyway - to be a little more confident that I knew exactly where it was going.

I would have thought pasting was the easy part; just a click and a keystroke. Copying, while not exactly difficult, is the fiddly part - clicking before the parent element, having identified the closing tag, and then shift-clicking or dragging to the end. A quick option for this - just by selecting the relevant app structure item - would be a very useful feature.

As you say, the right-click is taken, but I suggested adding a copy icon somewhere on the existing panel (to keep things simple).

I was referring this when I wrote pasting would be better. Pasting directly in App Structure is what the suggestion is.

Doing it in code view is a pain in my opinion. Code is not formatted well, so as you noted, it takes a bit time to identify closing tag. Although, opening/closing tag indicator added in recent updates is helpful.

Personally, I prefer keyboard shortcuts over buttons. Copy icon can also be added as a 4th icon to the component selector shown in right-click.
image

1 Like

Presumably, the awkardness you describe - selecting in code view - is to do with copying rather than pasting (unless you want to paste in order to replace the selection rather than insert code). That’s why I suggested copying would be more useful.

I agree about shortcuts. I think your suggestion for the location of a copy icon is good, though perhaps it could be position further from the group of arrows (eg on the right), as it’s a different sort of option.

I launched this in Oct’18 but got only 2 votes :tired_face:

You now have three! :slight_smile:

Probably because the discussion swayed towards Navbar only and not the big picture. Now you have 4 votes. :smiley:

I would have thought this was a no brainer… Especially when using downloaded templates or copying between pages and projects…