player-ui / player

https://player-ui.github.io
MIT License
73 stars 47 forks source link

Support a Mechanism for Specifying Index/Position of Template Insertion #541

Open KetanReddy opened 3 weeks ago

KetanReddy commented 3 weeks ago

Related to #540, for cases where a template is being expanded into a property with existing assets. It would be a good feature to specify where the insertion actually happened. In the most simple case, we could support a prepend/append, property on the template object. However, if there are multiple existing assets we wouldn't be able to insert the expanded template in between the two elements so we may need to support expansion based on index? This also opens the door for conflicts in insertion from multiple templates because the order in which the templates are expanded is also not controllable via content so that is another parameter that might need to get added.

TODO: