New: Export to module updates

Hey all,

Excited to revamp a feature for modules: Export to module! This feature allows you to select components on the canvas and “refactor” them into a module.

This feature has been around for a while, but we’ve made some key changes to it:

  • We now support exporting a single component to a module. This means you can export a single container (and all its children) to a module, for example.

|339x399.9947747891665

  • When making the export, we now identify and include all the related logic (queries + variables + JS code + transformers) in the exported module. No more copying logic!

  • Finally, we will now automatically replace the selection with the newly created module. No need to import the module after you export the selection!

How to access this feature

This feature is accessible through the context menu of a single component or a multiselection by selecting Export to module:

You can also access it in the inspector header when you multiselect components:

How to access newly created module

Just like all modules, to access the module editor, you can do so through the module component’s context menu by selecting Edit module:

This feature will begin rolling out on cloud 3.194.0. If you don't see it yet, you'll have it soon! It will be included on an upcoming edge release and the Q2 stable release.

As always, let us know if you have any questions / feedback!

Best,

Darya

12 Likes

This is awesome. #1 thing on my wishlist

I would rethink the color though… When I see that red border my brain defaults to my module is erroring out

But that's more magenta than red :smiley: