hadynz / obsidian-kindle-plugin

Sync your Kindle notes and highlights directly into your Obsidian vault
MIT License
922 stars 52 forks source link

[BUG] #182

Closed sradics closed 2 years ago

sradics commented 2 years ago

Describe the bug

I cannot replace the template text. When I try to change the template text the whole text suggestion disappears. Then I found bookTemplate.njk and copied text from there. But then the template field shows red. And I found that this happens when I enter {% commanded. When I add a space { % then I can enter the template but this does not render correctly.

I was able to manually fix the main.js from the plugin for now.

Method of syncing

To Reproduce

Steps to reproduce the behaviour:

  1. Go to settings - template editor
  2. Try to add the template text from bookTemplate.njk
  3. My template text field is marked red and it does not store the text

Expected behaviour

I can enter template text like bookTemplate.njk and it stores it without problems. And it would be even better if I can extend the suggested template text instead of having it disappearing as soon as I want to edit.

Metadata

tjex commented 2 years ago

It is normal that the text suggestion disappears when typing your own templates in. Have you tried just typing in manually some very basic template code and seeing if it works? eg: {{ location }}

Also, not all template variables can be used in all templating fields. There are only three file name template variables for example, but many more for other fields. If you are trying to type in variables that cannot be used in a certain field ie file name template / file template / highlight template , then I can imagine you may get an error as well.

hadynz commented 2 years ago

@sradics the template text "disappears" because it was being shown to you as a placeholder. Once you type a single character, the placeholder text is no longer displayed.

This is not a bug. But probably bad UX design from my part.

I will close this issue, but I will work on significantly improving the template editing experience. Thanks for your feedback. It has given me a good hint to some of the usability issues I should keep in mind.