Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spike: add support for alternative template renderer #1714

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrismclarke
Copy link
Member

@chrismclarke chrismclarke commented Jan 11, 2023

PR Checklist

  • - Latest master branch merged
  • - PR title descriptive (can be used in release notes)

Description

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 to dynamic 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

@chrismclarke chrismclarke added the test - visual Run visual regression tests label Jan 11, 2023
@github-actions
Copy link

github-actions bot commented Jan 11, 2023

Visual Test Summary
new : 0
different : 21
same : 279

Largest Differences
1 | 19.5% | example_lang_template_1
2 | 3.4 % | feat_animated_slides
3 | 3.2 % | feature_radio_group
4 | 2.7 % | debug_radio_group
5 | 1.5 % | comp_select_text
6 | 1.1 % | feature_lottie_habits
7 | 0.8 % | example_calc_date
8 | 0.7 % | example_calc
9 | 0.3 % | example_calc_2
10 | 0.2 % | feature_home

Download Link
https://nightly.link/IDEMSInternational/parenting-app-ui/actions/runs/3889208460

Run Details
https://github.com/IDEMSInternational/parenting-app-ui/actions/runs/3889208460

@chrismclarke chrismclarke added the test - preview Create a preview deployment of the PR label Jan 11, 2023
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 30acd60):

https://plh-global--pr1714-spike-alternate-temp-6qg25ixu.web.app

(expires Wed, 18 Jan 2023 02:54:51 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 923c9e473f0c2e4a63e9c593734c0204f16c6916

@chrismclarke chrismclarke mentioned this pull request Aug 20, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test - preview Create a preview deployment of the PR test - visual Run visual regression tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant