First up is the ability to merge changes into templates after upgrading XenForo, an add-on, or a distributable style.
This is done via the existing outdated template interface:
You have the option to automatically merge changes if possible. This will merge any updates where a conflict is not detected. If a conflict is detected, you will need to use the manual merge interface, which you can access by clicking on "merge changes" for a template. Here's what you'll see:
The yellow and blue highlighted blocks indicate the changes that are being brought in. Blue represents a successful, non-conflicted merge (either from the parent changes or your custom changes). Yellow represents a conflict and gives you options to deal with it. In this example, I probably want to use my custom version only, but there are situations where you may need to use both (such as changes adding buttons in the same location). Note that you cannot submit this form until you have resolved all conflicts.
What if you're not happy with the changes that are being merged? You can click on any blue (successfully) merged section or any yellow (conflict) section after you've selected a conflict-resolution method. This will turn the text into a textarea that you can type in:
As soon as you leave the text box, it will turn back into text to improve readability.
Note that in this example, I selected "resolve using both" so you see both parts of the conflict there, which can then be edited. I selected this to demonstrate but in this case, resolving with both blocks doesn't really make sense.
I made reference to it above, but there have been some additional changes to how templates noted as being outdated. Previously, this system could only be used when updating XenForo or an add-on. If you have installed a third-party style and kept your changes in a child style, you wouldn't see any outdated templates if you updated the third-party style. With these changes, updating a templates in a parent style will mark child templates as outdated (if necessary).
In terms of the merging, we are using an algorithm to help us reduce conflicts as far as possible. I suspect that most changes will simply be mergeable automatically but that obviously varies based on what changes you've made to the style. Regardless, it should make upgrades with customizations much easier.
Along with these merging changes, we now also track template changes for a period of time (30 days by default, configurable via option). This can make it easier to revert bad changes if needed or simply see what changes you've been making.
You can see the history when editing a template:
I've cut this off at the bottom, but as you would expect you can use the old and new options to compare changes from your individual edits.