hadynz / obsidian-kindle-plugin

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

[BUG] File template and Highlight template not really editable #209

Open doodoo787 opened 1 year ago

doodoo787 commented 1 year ago

First: AWESOME plug in!! Loving it πŸ’–

Describe the bug

If I open preferences (cmd+,) and go to the kindle plugin there are three windows that I want to update:

However, when I click in either of them, the cursor will always blink at the very first position. I can neither copy nor edit the content. The only thing I can do is "start typing" which instantly removes all the content of the input field. I can delete everything and the former text will reappear. However, that's very inconvinient if you have to retype everything (from memory) everytime you want to make a minor change.

I first thought that would be a one time thing (some default values that have to be changed) which would have been annoying, but bearable.

However, this happens every time I open the preferences.

I hope this can be fixed ☺️

Keep up the good work!

Method of syncing

To Reproduce

Steps to reproduce the behaviour:

  1. Go to 'cmd+,'
  2. Click on 'Kindle Highlights'
  3. Scroll down to 'File name/template/highlight'
  4. Try to edit the content.

Expected behaviour

Being able to edit the templates without retyping them from memory.

Screenshots

None.

Metadata

doodoo787 commented 1 year ago

Correction: I tried syncing all my books all over again. The file name template and the highlight template input fields now seem to work as expected (I can even click in them and edit them).

However (!) the file template input field still has the same bug. If I type in it, it will clear itself. AND it won't save any changes that I made in it (after closing the preferences window it will be back to the way it originally was).

hadynz commented 1 year ago

Thanks for creating this issue. It sounds like it is a duplicate of https://github.com/hadynz/obsidian-kindle-plugin/issues/174.

Can I ask you to download the latest version of the plugin 1.8.0 that has overhauled templated editing. I've invested time to make it much more intuitive since it is a core functionality that many users will want to play with.

doodoo787 commented 1 year ago

Hi ☺️ Thanks so much for your response. I've downloaded and installed the most recent update now. Awesome that you wanted to make it more intuitive (although I must admit that I kind of preferred having all of it on one page πŸ˜…).

However: It seems to work now EXCEPT: The very first time I opened the File-Content-Tab and wanted to change the file content, it wouldn't let me edit the preset/default template. Everytime I clicked into it, the cursor landed on the first mark and I could only type over it (just like before).

So I pasted my own template in there (I retyped most of your original template, which is kind of annoying πŸ˜…). Afterwards I was able to edit the content of the field. However, for testing reasons (I wanted to make a screenrecord for you) I hit the button "reset to default template". If I do that I cannot even click into the field to edit OR delete it ...

I've attatched a screenrecord of that πŸ˜‰ CleanShot 2022-11-09 at 11 59 02

hadynz commented 1 year ago

The behaviour that you've described is per design:

  1. You can only view the default template in read-only mode
  2. If you want to edit the default template, then you click on the "override" button which allows you to edit the default template without the need for you to retype it.

Based on your feedback is looks like the UX still needs some work as it is not intuitive. Thanks for your feedback, I'll think about making some tweaks to simplify it even further.

Do you agree that your original issue is solved and this ticket can be closed?

lukebarton commented 1 year ago

@hadynz Did you consider automatically inserting the base template into the text box if there existing user input is empty? You could also discard the input value if it's unchanged - so your plugin can continue to update the default template for users who don't modify it.

That UX might confuse fewer people.

doodoo787 commented 1 year ago

(I don' exactly get what lukebarton is saying πŸ™ˆ)

So if the "it's not changeable" is by design, then it's not an error and you may close this bug report. However, I did never consider that I had to click the button a second time (after it went to "override default template"). I think I expected it to change back to what I had entered before .... I didn't dare to click it either way.

What I would have expected:

Otherwise you would have to have a text appear that says: To edit please click the button again πŸ™ƒ

Newdea commented 1 year ago

i got the same problem by the latest version of the plugin 1.8.1, and then i fond out it's because i didn't click on save button that even can't be seen. how about

  1. resize the manage template setting windows; or
  2. move the save button aside the override/reset button; or
  3. save the template in data.json file.

image