Closed RealRaven2000 closed 4 months ago
1st (semi stable) Test version:
smartTemplate-fx-4.4pre132.zip
To activate the new menu system (only affects the message action menu above the message preview), select this from the Test menu:
To do:
Next version, this one is able to correctly update the MRU items. It also has the "configure menu items" command. You still have to activate the mechanism from the test menu (see previous comment) Test / Create message Actions (API). Once you use a template from the dropdowns, the MRU items will update.
smartTemplate-fx-4.4pre135.zip
The menus reply all and reply list may not work on certain mails, they should ideally be hidden in the future depending on whether a controller for the command exists - see fileTemplates.fireComposeCommand()
. We need a way to do (somthing like) this based on the selected email when the action menu is opened and then hide those particular submenus, using the API.
Legacy code:
// Possible commands :
const ControllerMap = new Map([
["cmd_newMessage", "new"],
["cmd_reply", "rsp"],
["cmd_replyAll", "rsp"],
["cmd_replyList", "rsp"],
["cmd_forward", "fwd"]
]);
let controller = getEnabledControllerForCommand(entry.command);
if (!controller) {
SmartTemplate4.Util.logDebug(`No controller exists for the command ${entry.command} `);
} else {
if (controller.isCommandEnabled(entry.command)) {
controller.doCommand(entry.command);
} else {
SmartTemplate4.Util.logToConsole(`Cannot call command ${entry.command} as it is disabled.`);
}
}
Here is the latest version (removed the legacy part for the action menu)
smartTemplate-fx-4.4pre143.zip
One main problem is that the "last template" currently is moved to the bottom of the menu (although it should remain at the same position when calling menus.udpate() - I suppose this may be a bug in the menus API.
In this latest version, I diversified the "Last Template" items so that there are separate items for reply, reply all and reply list. This seems to be more user friendly, as these are also separate items when listed in the MRU menu.
smartTemplate-fx-4.4pre144.zip
I also removed the remaining obsolete sections of legacy code that manipulated the message action menus - this is now fully based on the API. The next big step would be to do the same for all menus in the unified toolbar, which will probably be handled in a separate issue.
To install version above download zip file and drag the file into Thunderbird Add-ons Manager (do not extract contents, it won't install like that)
Latest version - I added the license based restrictions and message that explains license tiers, also made the categories case insensitive so that different-cased categories, e..g quickfilters + quickFilters will show under the same child menu:.
restrictions for free + Standard version: max 3 categories (items cats are gathered under "other") restrictions for free version: 5 templates max restrictions for Standard version: 25 templates max no restrictions for Pro version.
smartTemplate-fx-4.4pre164.zip
To install version above download zip file and drag the file into Thunderbird Add-ons Manager (do not extract contents, it won't install like that)
Added warning item for when too many categories are defined. Also added a warning icon for all menu items that explain restrictions.
this particular item will now open the SmartTemplates licenses dialog so users can go to the feature comparison page and / or obtain a license.
smartTemplate-fx-4.4pre167.zip
To install version above download zip file and drag the file into Thunderbird Add-ons Manager (do not extract contents, it won't install like that)
Implemented in 4.4 - published 28/03/2024
In order to better support the new SuperNova environment, the popup menus showing the commands / templates have to be built in the background page using API code.
Steps to implementation
-- in the background page, create the menu and then update on shown
Christopher Leidigh suggested to look at ImportExport tools ng for example code for vuilding menus, see: https://github.com/thundernest/import-export-tools-ng/blob/v14.0.0/src/wextMenus.js