Copy and Paste Components

  • 10
  • Idea
  • Updated 2 years ago
  • Implemented
This basically stems from me being in a hurry. I want to be able to cut/copy and paste components, field editor sections, and maybe even fields from the page composer without going into XML (using command c, x, & v).
Photo of Anna Wiersema

Anna Wiersema, Official Rep

  • 10,920 Points 10k badge 2x thumb

Posted 4 years ago

  • 10
Photo of Zach McElrath

Zach McElrath, Employee

  • 54,246 Points 50k badge 2x thumb
I can't imagine that anyone else has ever wanted to do this :)
Photo of Pat Vachon

Pat Vachon, Champion

  • 45,236 Points 20k badge 2x thumb
No. I don't like this idea whatsoever.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,968 Points 20k badge 2x thumb
Pat,  you just don't like the fact that this post is getting more traction than the other times you have asked for this feature... (Grin)
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,026 Points 5k badge 2x thumb
Me thinks this is a hint for things to come.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,436 Points 10k badge 2x thumb
Taking this is a step further, it would be ideal if you could design a component using the builder and then include that component in other pages.  This has been discussed at times in the community (e.g. Library of components) but really seems to be something that continues to get more and more traction.  Having the same XML in multiple places is ripe for maintenance, support, etc. issues.

It would work similar to a Page Include but get pulled in to the containing page synchronously as the page is built instead of asynchronously.  Essentially it's a custom component but using the builder instead of code.  Models would have to exist on the containing page but you could define the same model (by name) on the "Page Component" page so you could use declarative functionality while building the page.  The component then inherits the models from the containing page instead of the models from the page component itself.  Could even do a "santity" check to make sure the containing page has all the models matched by name that were defined on the page component page.

Some high-level thoughts:

1) Add a new type of "page" called Page Component - so you would have Desktop pages, mobile pages and Page Components offered on the "Create new"
2) Add a new component called "Page Component Include" to the toolbox that lets you pick the page component you want "included" (same concept as Page Include)
3) At runtime, the XML from the Page Component is slipstreamed in to the containing page where the "Page Component Include" is defined just like if the actual XML was there the entire time.  Note that this would not need to include all the stock skuid runtime js, component factory, etc.  
(Edited)
Photo of Anna Wiersema

Anna Wiersema, Official Rep

  • 10,920 Points 10k badge 2x thumb
Mind. Blown.  There have been *so many times* where I wanted to reproduce components across tables, specifically really complicated and beautiful tables that it's just a little annoying to reproduce and make sure the model/fields/etc get updated correctly.
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 12,352 Points 10k badge 2x thumb
Official Response
We really appreciate your suggestion about allowing for easy cutting/copying/pasting/cloning of components. It has been implemented and is now available in the Millau release, now available from the Skuid Releases page at http://www.skuid.com/skuidreleases. As a reminder, Salesforce does not allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade. Thanks again for helping Skuid become an even better product! 

Here is our documentation about this new and long-awaited feature! https://docs.skuid.com/v11.0.0/en/skuid/components/#cut-copy-paste-and-clone-components