WIP: Class conflicts on imported templates

When I import a template that has classes applied to it and my site already has those classes in use, Bricks gives me two options:

  1. Skip class import
  2. Override classes.

Skip class import means that the template is imported without any of the conflicting classes. This causes it to be imported unstyled and I need to go apply the classes back in.

Override classes means that it imports the classes from the template, but it either replaces the existing classes and their properties, or adds a duplicate of that class with separate properties and my customizations won’t apply to the imported template.

Disabling the class conflict manager doesn’t restore the behavior to how it was in 1.11. In 1.11, importing a template with classes that already existed in the database would use those classes and apply styles and customizations that had already been made.

I feel like this significantly impedes the ability to use templates, because if I want to use a template with the expectation of it respecting my class properties, I will need to import it skipping the classes and then trying to remember which class was applied to which element, and do this each time I import a template.

5 Likes

I have the same issue. Thanks for reporting

2 Likes

Just adding my 2 cents.

The change in behavior is specially nefarious when one uses a lot of templates created over time and expects that a template import respects the existing classes if one already had that template imported before or is using the same utility classes.

Please add a 3rd option to restore former behavior. Or to disable this new feature. Whatever is easier.

1 Like

This is such a massive hinderance on our workflows that we’re unable to update to 1.12 on any of our projects.

I have the same issue. I rolled back to v. 1.11 because it created such a problem for me.

Hello all,

thank you for your reports. We already have a bug report about this, and we are currently working on fixing it. I’ve linked this task to the internal bug report, and we will update it once we release a fix.

But, this seems to happen if the “internal id” of the class is different than the one you are importing. In this case, when you click “skip class import”, it will skip it - aka, not even include it tin the template.

I can assure you, this is a bug, not a feature :wink:

Thanks.
Matej

1 Like

Matej, is the bug reported here in your Forum? I’d be curious to subscribe to notifications on it.

Hi @Ben,

yep, we will update this topic. I linked it inside our internal task, but I forgot to update it here from WAIT to WIP. I just did that now.

So, once we release a fix, we will update this one.

Best regards,
Matej

2 Likes

Thank you for your responsiveness on this @Matej, I appreciate it a lot.

1 Like

Drove me crazy too. I personally don’t even understand all the options…The documentation needs some help too. What’s the difference between Rename and Duplicate? Why choose one or the other? In any option I choose, am I changing any classes and properties that already existed on the site?

I found this somewhat helpful video posted over on the Automatic CSS forum, where people are puzzling over the same issue.

To explain a little further after playing around with it:
Basically, you’re seeing a list of all the classes included for import along with the template. The non-red ones are unique to the template and new to you. The classes in red have a naming conflict with ones you already have, so you need to choose which you want to continue with-- yours or theirs. (If you want both-- you can rename the incoming classes from the template to avoid the conflict altogether.)

Hover over each class name in the list, and choose what to do:

  1. Arrow: Imports the class from the template, which will write over your existing one of the same name. (I think the “undo”-looking arrow icon refers to the likelihood that you’re effectively rolling back that class to its “original” version, assuming you brought in that template or one of its buddies in the past.) This option is only available for conflicting classes.
  2. Trash: Removes that class from the list to import along with the template, thereby preserving your version of the class (important if you’ve made changes to the styling that you want to keep).

When you’ve addressed all the conflicts, the “Import Classes” button at top right will turn green, and you can click it to proceed with importing the template.

Note: You can use the checkbox at the top of the list to apply your choice to all the classes in the whole list, but keep in mind that on mixed conflicting/not lists, it trashes not just conflicting classes, but all the classes, so you’ll lose all the unique styling too, which basically ruins the template.

1 Like