2021-04-24, 10:56 PM
With 1.9 development hopefully to resume soon, it seems useful to discuss how the key new change - the migration of the template system to Twig - will be finalised. The current plan seems to be to move templates out of the database and into the filesystem, so that they can be more easily edited outside of the MyBB admin interface itself.
There are pros and cons to this. Here are those of which I am aware:
Pros:
Just briefly, here's why I think metadata is important:
I envisage a future in which the Find Updated Templates feature is largely unnecessary, because on upgrade, the system detects the version on which a template was based, the version to which it is being upgraded, and auto-generates the equivalent of a patch between the two, which it then auto-applies when it can, regardless of any edits the admin has made to the template. (I'd like to see the same for stylesheets too).
This means, though, that when templates (and stylesheets) are edited, one piece of metadata needs to be reliably stored/updated: the version on which the edited template (or stylesheet) was based. We can ensure reliable storage/updating of this metadata when we require template/stylesheet editing to be done through the ACP. We can't when users can edit templates/stylesheets in the filesystem.
Anyhow, there are more than likely other pros and cons, and other considerations. Given that resumption of work on 1.9 is getting closer, I thought it was worth starting a public discussion to get community input.
There are pros and cons to this. Here are those of which I am aware:
Pros:
- Filesystem editing of templates offers more flexibility and user-friendliness in general.
- Filesystem editing of templates makes the template/theme design task easier for theme designers.
- Filesystem editing of templates makes reliable synchronisation of template/theme metadata impossible.
- Switching to filesystem editing of templates and discarding the existing DB-based paradigm involves more work, and delays the release of 1.9.
Just briefly, here's why I think metadata is important:
I envisage a future in which the Find Updated Templates feature is largely unnecessary, because on upgrade, the system detects the version on which a template was based, the version to which it is being upgraded, and auto-generates the equivalent of a patch between the two, which it then auto-applies when it can, regardless of any edits the admin has made to the template. (I'd like to see the same for stylesheets too).
This means, though, that when templates (and stylesheets) are edited, one piece of metadata needs to be reliably stored/updated: the version on which the edited template (or stylesheet) was based. We can ensure reliable storage/updating of this metadata when we require template/stylesheet editing to be done through the ACP. We can't when users can edit templates/stylesheets in the filesystem.
Anyhow, there are more than likely other pros and cons, and other considerations. Given that resumption of work on 1.9 is getting closer, I thought it was worth starting a public discussion to get community input.