Changing the way templates will be stored

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.

1 Like

For more context

Thanks for clarifying your idea, it indeed seems to make sense.

Since the Templates notebooks is no longer required, I think it would make sense to make it clearer what this automatically created notebook is. How about giving it a title like "Imported Templates" followed by the date like Imported Templates - 30/07/21 11:14? That way you don't need to check if another templates notebook exists, and it also solves the issue with sync because each device will have its own "Imported Templates" notebook, which the user can later sort out.

I would even suggest creating a default note inside that explains what this notebook is, and that the user can rename it to something else.

3 Likes