RealRaven2000 / SmartTemplates

Thunderbird Add-on: SmartTemplates
http://smarttemplates.quickfolders.org/
Other
25 stars 15 forks source link

Clicking Add on Template Files without location "undefined" #298

Closed RealRaven2000 closed 4 months ago

RealRaven2000 commented 4 months ago

If the user forgets to open a template using "open template file from disk" they only get a non-descript alert saying "undefined":

image

Since the [Add] button probably attracts a lot of attention - it would be better to explain that a file needs to be opened with the button to the right. Also a label for the Add template button would be more helpful:

image

RealRaven2000 commented 4 months ago

It turns out that the function getBundleString wasn't written with full path. After fixing this we get "Please enter a title!" (triggered by the empty title field)- which is not helpful, as the template location is empty and there is no file selected. So this should be checked first, resulting in the error "Please select a valid path!". This is also not very helpful because it doesn't really show where the path should be entered (Template location).

So we want to add a better more verbose warning, and highlight which button to click to do this:

"Please select a file that contains the html / text and your SmartTemplates variables. This file will be processed and inserted when the new menu item is selected. You can still modify the template file to your needs after creating the menu item by clicking Edit."

RealRaven2000 commented 4 months ago

Here is a preview version:

smartTemplate-fx-4.6pre1.zip

Warning displayed if Add button is clicked without a given Template location:

image

After clicking OK, the row with the template location is highlighted and the button for selecting the file from disk is especially highlighted (bold writing, larger icon and special color). I also added a label to clarify the function of the button:

image

After selecting an external file successfully the display returns to its normal state:

image


to install the version above, drag the archive (zip file) into Thunderbird Add-ons manager - do not unpack contents as then it won't install.

RealRaven2000 commented 4 months ago

Implemented in 4.6.1 - published 16/07/2024