RealRaven2000 / SmartTemplates

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

New feature: list of most recent templates (write / fwd & reply) for template menus #263

Closed RealRaven2000 closed 9 months ago

RealRaven2000 commented 9 months ago

I notice that when I use the message header button dropdown menu to follow up with templates of a particular category, the complexity of selecting a single template is quite taxing, even when using keyboard shortcuts. See also issue #262 which will add accelerators for the actions (forward, reply, reply all, reply list) Therefore it would be great to add a list of the last N actions to the top level of the menu. So these would include the kind of follow up (forward / reply etc) and the template. They could be accessible through a simple number shortcut and would significantly simplify and speed up operations when writing many emails in a day based on a small number of templates.

Example: in an sales email campaign reminding users about license renewals, I have to select a template from a number of choices depending on license type and location. FOr each of these selections I need to go through 4 separate selection events (pressing the ST button, selecting Forward, Selecting Category "SmartTemplates", then selecting the template after figuring out which of these cases applies:

image

Really we should be able to skip the first 3 steps and go straight to the selection of the type, which would be easily available when showing the last 10 used cases at the top level of the menu (ideally underneath the bottom menu item "settings")

image

RealRaven2000 commented 9 months ago

Here is a first test version:

smartTemplate-fx-4.3pre25.zip

I have decided to only add "write template" items in the unified toolbar menu, and only "reply" and "forward" items in the toolbar header, to reflect the contextually most used items. These items are currently only built during the Thunderbird session (so they get lost when Thunderbird is restarted)

Example for the header area (Forward and Reply entries only)

image


To test the version above, download the zip file, drag the file into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 commented 9 months ago

New version to test - I am still intending to add file support so the recent menu items survive the session:

smartTemplate-fx-4.3pre59.zip

what's new:

RealRaven2000 commented 9 months ago

Next version:

smartTemplate-fx-4.3pre67.zip

I added file saving / loading, but only manually at the moment. This can be done via the test menu (Save MRU List, Load MRU List) on the main toolbar button. In the final production version this will be done automatically once I have added license dependent UI for configuration of maximum number of items.

image


To test the version above, download the zip file, drag the file into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 commented 9 months ago

After prerelease 56, the MRU menu items didn't fire the event anymore, I found out this was caused by the following lines which add a "command" attribute. This somehow stopped the "oncommand" event firing:

    if (theTemplate.command) {
      menuitem.setAttribute("command", theTemplate.command)
    }

I was using the attribute for finding out the type of reply (reply, replyList or replyAll) and now fixed the problem by prepending an underscore to the attribute, so that the command event handler can fire again.

smartTemplate-fx-4.3pre70.zip


To test the version above, download the zip file, drag the file into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 commented 9 months ago

Latest version below.

smartTemplate-fx-4.3pre78.zip


To test the version above, download the zip file, drag the file into Thunderbird Add-ons Manager, do not extract contents or if won't install.

RealRaven2000 commented 9 months ago

Implemented in 4.3.1 - published 16/10/2023