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

Implement Template API for Explicit Expansion Behavior #590

Open
KetanReddy opened this issue Feb 12, 2025 · 0 comments
Open

Implement Template API for Explicit Expansion Behavior #590

KetanReddy opened this issue Feb 12, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request minor Increment the minor version when merged

Comments

@KetanReddy
Copy link
Member

Changes to the Template API

Template elements would have a new property (to be decided during implementation) that would take information on whether the expanded data from the template should be appended (added to the end of the any existing elements) or prepended (added before any existing elements) in the location its being expanded to. Because the order of elements in an array is persevered and easy to ascertain at a glance, it is possible for content authors to accurately predict the order of multiple templates being expanded into the same slot with the same expansion behavior (e.g if there are two templates both set to append, the first template will be expanded followed by the second template).

Changes to Template Processing

During template expansion in the TemplatePlugin, the newly added field should be used to determine how the expanded template nodes should be inserted to the tree during parsing. In order to not break existing behavior, if no value is specified for how the template should be expanded the existing logic should be followed. As part of this change, we should introduce a warning message that a value was not specified to allow Player to require explicitly setting this at a later date.

@KetanReddy KetanReddy added enhancement New feature or request minor Increment the minor version when merged labels Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor Increment the minor version when merged
Projects
None yet
Development

No branches or pull requests

2 participants