What is the new best way to tweak distant theme component?

Months ago (or maybe more, I’ve never been that up to date), we could modify HTML/CSS of any theme components, not only the local one.

There was just an alert saying «be careful, if this component were to be updated, your tweaking would be erased».

To be fair, I miss this behaviour (I’m the forum admin, I should know what I do, I have a file with all the tweakings I have to re-update, it’s tedious but at least I can do it).

We can’t do that anymore, the only theme component the forum admin can tweak are the one it write directly on Discourse. Or the one it can access through its proper git repository.

So, my question is:
If I really need to tweak some other theme components, what would be the best way to do it?

  • Fork the original git repository in a new git repository?
    • pros: it’s quite easy to manage the original TC update
    • cons: it’s even more tedious than before
  • Copy paste the files in a new local theme component?
    • pros: less tedious (everything is done at the same place)
    • cons: some files can’t be added via the admin panel, I think
    • cons: hard to follow the original TC updates
  • Keep the original component and add a new component that modify the original?
    • pros: auto-updated
    • pros: quite safe
    • cons: work for some tweaking (ex: CSS) but not for everything (one can’t really modify a handlebars component without copy-pasting everything)
    • cons: probably possible but hard to modify widgets (at least, I didn’t find of to add a few code lines in a widget)

What would be your suggestions ?

I think you understand. It sounds like adding your own theme component with your customization is your best solution.

4 Likes

I would pick between “Fork the original git repository in a new git repository” and “Keep the original component and add a new component that modify the original”. If the changes you are making are substantial enough, fork the component repository. But if you are making simple style changes, a new component with just the overrides makes sense.

5 Likes