Template Manager: Append Changes

Hi!

Template Manager is a true power under the X/Pro hood.

I find ways daily to utilize it for tremendously speeding up production.

It also plays the “Actions” panel role found in Photoshop, where it can quickly do repetitive tasks.

But, Actions panel can be tweaked. Everything evolves, and that is the weak spot of the TM: Once made, It cannot be updated. It has to be deleted (From a different place) and replaced with a new version.

Would it theoretically be possible to append changes to existing Templates?

For example, I add a 2em bottom margin to a button and instead of saving a new template, add this move to the existing template without overwriting other settings? If it had a margin bottom in the template, it would be overwritten, but if not, it would be added to it.

THAT would be truly cool.

Also, Combining templates would be a great thing!

For example, I have a template for centering buttons. It sets margin left and right to auto and adds the class of center-list. It is great when creating a new button: I can click this first and adjust it from there.
But if I had some setting already in place, this centering template would overwrite the rest of the setup. But combining templates would solve this.

So this:

  1. Appending settings to existing templates
  2. Appending templates to existing settings

Maybe it is not Templates. Maybe it is Pro Actions. However we call it, it would be huge!

@alexander?

Thanks!

Hi Misho,

This is a really interesting idea. At a technical level, something like PhotoShop actions is possible but it would be a pretty big project to do. Having moved to Redux for state management does help. We’d need to give the builder a self-awareness so to speak that it’s not had before. For example, the underlying key name where margin is stored is different across elements. If you take an action like “Set margin 2em” it would mean different things for different elements. This means when the action is applied it would only be compatible with a button.

Kory and I have had some discussions about making the “partials” something you can copy and paste around. For example, if you make a toggle on a cart element and want to re-use that toggle for a navigation. If we make this possible it moves us in the step of having a more declarative way to instruct elements how to style themselves. In this case it would mean the margin action we talked about before could be used across multiple elements.

I’m going to add some notes based on your feedback to the notes from that conversation so it can be kept under consideration as the application evolves. At the moment this feels more uphill vs actionable but I do like the concept and see the power behind it.

One thing to keep in mind in the meantime is that you can always overwrite a template by saving it again with the same name.

1 Like

Thank you @alexander for your detailed insights!

And lol, it never occurred to me that templates can be overwritten by saving them with the same name.
I had a false memory that if I do that, I get template-name(1).

That is very helpful!

Thanks again!

We’re glad it helped, Misho.

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