You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is mainly a place to store my thoughts, this is a long-term goal that I don't want to put in Jira yet.
The template plugin carries a lot of history in its implementation. It used to act both as a full-document template selector and a "snippet" inserter. Throughout all the changes we've lost that second ability and rebuilt it as the snippet plugin.
There's already a lot of overlap between snippets and "full templates", given that snippets can contain other snippets. I think we can evolve towards a generic template manager plugin.
it needs to:
understand the concept of a "template", whatever that will look like by the time we start implementing this (in particular, the work regarding rdfa connections will be important here)
understand template (aka snippet) placeholders and their configuration
understand snippet nodes after insertion (replace, add, delete)
allow to select and change the "base template" -> this is nothing more than a set of templates that replace the entire content rather than insert into it
allow to "insert" a template -> this is like the pre-placeholder snippet behavior
This suggests a component split of the main search and select UI, a button that reacts on placeholder selection, an insert button, and "base template" button
The latter 3 would likely trigger the same search UI, but each with a different list of templates.
all of these modes should be configurable, and (at least part of) that config will likely have to be stored alongside the document.
The template plugin is also responsible for fetching snippets from a configured endpoint, just like the snippet plugin is now. We might make this configurable by taking in a callback argument, which we would then provide a default for, but that may be overkill and can be added later.
The text was updated successfully, but these errors were encountered:
This issue is mainly a place to store my thoughts, this is a long-term goal that I don't want to put in Jira yet.
The template plugin carries a lot of history in its implementation. It used to act both as a full-document template selector and a "snippet" inserter. Throughout all the changes we've lost that second ability and rebuilt it as the snippet plugin.
There's already a lot of overlap between snippets and "full templates", given that snippets can contain other snippets. I think we can evolve towards a generic template manager plugin.
it needs to:
This suggests a component split of the main search and select UI, a button that reacts on placeholder selection, an insert button, and "base template" button
The latter 3 would likely trigger the same search UI, but each with a different list of templates.
all of these modes should be configurable, and (at least part of) that config will likely have to be stored alongside the document.
The template plugin is also responsible for fetching snippets from a configured endpoint, just like the snippet plugin is now. We might make this configurable by taking in a callback argument, which we would then provide a default for, but that may be overkill and can be added later.
The text was updated successfully, but these errors were encountered: