Storing the templates
Current Implementation
There are two main sources of storing templates according to current implementation.
- Templates Notebook - There will be a notebook that will be mandatory to have that serves the purpose of storing templates. At the first start there will be a pop up to ask for setting the templates notebook, either by creating a new one or selecting an existing notebook. People would have option to change the templates notebook at any point of time.
-
Tags - Templates can be created in notebooks other than templates notebook using a tag titled
template
.
As, there would be a lot of people migrating from existing templates feature to the plugin, it is important to load previous templates. Currently, the plan was to load the previous templates on first load in the templates notebook itself.
Problems with this implementation
There was some discussion that the current implementation is ambiguous. Please refer to the discussion here for more context.
Proposed Solution
As you might've read above most of the problems were due to the interactions with a notebook. So, I've proposed a solution i.e. to just use tags for storing the templates.
So, to create a template a user simply needs to create a note and apply a tag with titled template to it. The most important benifit of this would be that it's very easy to understand and guess the behaviour of the plugin i.e. if there's a tag titled template
applied to the note then it's a template for sure.
There's no need of a templates notebook in this approach, however if someone wants to separate the templates in a notebook they still can. They can create a notebook and apply template tag to all the notes in that notebook.
Loading the previous templates in proposed approach
As loading the previous templates is crucial part of the plugin, here's what I've thought. If the user has previous templates a notebook titled Templates
would be created automatically, and all the previous templates would be loaded to that notebook and template
tag will be applied, if it doesn't exist it would be created. Then a dialog would be displayed saying that the previous templates of the user were loaded and can be used.