spike: add support for alternative template renderer #1714
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
master
branch mergedDescription
Related to Phase 1 of Dynamic Templating RFC
This adds support for a future migration towards alternative template rendering. At the center is a new
template_type
property that can be assigned to any template. If left blank it will render using the default (existing) container renderer, if set todynamic
it will use a new experimental/work-in-progress system. This aims to preserve full backwards compatibility and provide options for incremental adoption of future systems.The motivation for this change comes following the work on dynamic data, which does not fit well in existing structures (adds a lot of extra code to container boilerplate and has to un-parse various bits of data to work with raw).
Dev Notes
The main technical change is replacing the way the template page renders the template component. Previously it used a single
template-container
element, however now it has a dynamic injector so that it can use different containers depending on the indicated template type.A small amount of in-progress work has also been started on a new system for rendering templates and included in this PR, however it is incomplete and will continue to be worked on in follow-up PRs.
Review Notes
This is intended to have no impact on existing templates, and so visual test has been added to confirm this is indeed the case.
Git Issues
Closes #
Screenshots/Videos
If useful, provide screenshot or capture to highlight main changes