quicktext icon indicating copy to clipboard operation
quicktext copied to clipboard

Get your hands dirty: Become a beta tester of Quicktext v6

Open jobisoft opened this issue 10 months ago • 45 comments

Hooray, you are here!

Quicktext v6 has reached the first milestone in being converted to the WebExtension technology. The ultimate goals of this effort are:

  • get rid of the full-access-to-your-computer permission
  • an always compatible version of Quicktext, which does not break on Thunderbird updates

There is a pre-release version of Quicktext v6, which waits for you to be tested. It should have feature parity with Quicktext v5, but there are a few important differences, which are mostly due to the switch from legacy APIs to WebExtension APIs.

  • Your templates and scripts are migrated from config files stored in your profile folder to the add-on local storage. The config files are not deleted, so you can always go back to Quicktext v5 and continue where you left off.
  • Instead of using XML, the templates are now exported as JSON files. The old XML format is still supported for imports, but not for exports.
  • The auto import of scripts and templates on startup (as defined by the default import field in the general tab of the Quicktext manager) is still supported for local files and for files fetched from a remote server. However, in the final version of Quicktext v6 support for auto importing local files will be dropped (as it is not supported by WebExtensions). This version however already includes support for distributing templates and scripts through managed storage, which is an appropriate replacement. The documentation for this approach is being discussed in a separate issue.

IMPORTANT: The add-on storage for WebExtensions is cleared when an extension is removed. You get this prompt to remind you of this fact:

If you have not exported your templates and scripts before confirming the removal, they are lost. So please use the export functionality.

What about scripts?

Edit: This section has been updated after the release of v6.3.0

A core feature of Quicktext is its capability to run user scripts. This is and will continue to be supported. As expected, the switch from legacy APIs to WebExtension APIs also affects scripts:

  • The advanced feature to access this.mWindow has been removed. It was used for example to access the subject field. It is simply impossible for WebExtensions to retain this access. Instead, scripts can now use WebExtension APIs. For example browser.compose.getComposeDetails().

A more in-depth description of the new script support is provided here. A simple script to get the current subject:

// Have a peak at what is available for direcly executed scripts:
console.log(this);

let details = await this.compose.getComposeDetails();
console.log(details);

return details.subject;

What about updates?

The provided pre-release version of Quicktext v6 will receive auto-updates from this GitHub repository, if a new pre-release version is published. Once the final version is published on ATN, the pre-release version will update to the ATN version and then receive regular updates through ATN again.

Why is this still an Experiment?

There is a lot of work needed for the full conversion. Having feedback on the already converted parts is crucial. The following parts still require Experiments (full legacy access):

  • The migration code needs to read the original XML config files from the profile folder.
  • The Quicktext toolbar has been decoupled and was moved into its own Experiment. It will be moved into an independent/optional add-on later, if there is no way to re-implement it as a WebExtension content script.
  • The settings dialog still has to be converted from legacy XUL to HTML
  • Some templates use tags which include files from the users disc (images, documents, attachments). In the final version, this will be replaced by a gallery (the files are "uploaded" into the add-on)

Wanna try?

Testing the pre-release of Quicktext v6 will help to prepare it for the broader community. Thanks for your support. The pre-release can be found here:

https://github.com/jobisoft/quicktext/issues/451

jobisoft avatar Mar 23 '25 19:03 jobisoft

This is awesome news. Thank you!

Now I can finally use QuickText again, after so many months/years.

PeterLairo avatar Mar 23 '25 20:03 PeterLairo

QuickText seems to add an extra space at the end of every text. There is no space at the end of my QuickTexts.

e.g.: "Sincerely" becomes "Sincerely "

This is problematic for QuickTexts that end with a <RETURN> because the new (supposedly) blank line starts indented by that one space, and the cursor is after the space. So you start typing with a space at the beginning of the line.

e.g.: "QuickText line that end with a <RETURN>" " This new line has a space at the beginning from QuickText (or a Thunderbird bug?)."

PeterLairo avatar Mar 23 '25 21:03 PeterLairo

Thanks for the report. Will look into it.

jobisoft avatar Mar 23 '25 21:03 jobisoft

@PeterLairo : Should be fixed in 6.2.1 (and you should be auto-updated).

Can you confirm?

jobisoft avatar Mar 24 '25 08:03 jobisoft

It looks like v6 places "Quicktext" at the bottom of the right-click context menu rather than the top like the previous version. Can this entry be moved to the top?

swbrains avatar Mar 24 '25 15:03 swbrains

It looks like v6 places "Quicktext" at the bottom of the right-click context menu rather than the top like the previous version. Can this entry be moved to the top?

That is policy for WebExtensions. They cannot add menu items at any place, but only in specific areas. This helps users to find the add-on entry points faster (because there is now an expectation where they should show up), but gives add-ons slightly fewer options.

jobisoft avatar Mar 24 '25 16:03 jobisoft

Ok, thanks.

swbrains avatar Mar 24 '25 16:03 swbrains

@PeterLairo : Should be fixed in 6.2.1 (and you should be auto-updated).

Can you confirm?

Yes! There seem to be no more extra spaces at the ends of my QuickTexts. Well done! Thank you!

My version is at 6.2.2. You're updating a the speed of light. :-)

PeterLairo avatar Mar 24 '25 20:03 PeterLairo

Well this is going to make syncing quite a bit more difficult. Maybe someone could look at tackling https://github.com/jobisoft/quicktext/issues/54 to provide some way to sync templates and scripts. Maybe something like Google Drive with a shared file/directory? The Google Drive API provides a way to receive push notifications for changes to resources (https://developers.google.com/drive/api/guides/push).

multiwebinc avatar Mar 24 '25 23:03 multiwebinc

However, in the final version of Quicktext v6 support for importing from the local file system will be dropped (as it is not supported by WebExtensions). This version however already includes support for distributing templates and scripts through managed storage, which is an appropriate replacement.

I am confused by this. Will there ultimately be any way to import from a local file, or not? If not, could there be a work around, like the user pastes the contents of a backup file into a textarea box?

mkerost avatar Mar 25 '25 16:03 mkerost

The add-on will always have import and export functions, which prompt the user to select a file for import or export using a file picker (the pre-release already uses WebExtension code for this).

What is going to be dropped is automatic imports from the file system on startup, because WebExtensions cannot read your local filesystem without showing a file picker. Quicktext v5 has an default import field in its general tab of the manager window where you can specify locations for these auto-startup-imports, and they can be https:// URLs or file system URLs (C:\folder\file.xml or whatever your system uses). The final version of v6 will no longer support file system urls there.

jobisoft avatar Mar 25 '25 16:03 jobisoft

I will explore other sync options.

In https://github.com/jobisoft/quicktext/issues/54 IMAP sync was proposed, but we can also think about dropbox or other services. We also have Mozilla/Firefox sync, which may be available to Thunderbird this summer, but it is limited to 100KB per add-on, which might not be enough for templates.

jobisoft avatar Mar 25 '25 16:03 jobisoft

Thank you, that is awesome news. Previously had the problem that QuickText did not work in the latest ThunderBird. I then rolled back and disabled Thunderbird updates. As we now have a new QuickText, will it be safe to upgrade Thunderbird to the latest version?

pietpetoors avatar Mar 25 '25 19:03 pietpetoors

As we now have a new QuickText, will it be safe to upgrade Thunderbird to the latest version?

Yes. Standard update will give you v5.19. The pre-version will give you v6.2.2. Both will work in 128+.

jobisoft avatar Mar 25 '25 19:03 jobisoft

Cool!! Thank you for working on this!! I will install the pre-release to try it out.

rob4226 avatar Mar 26 '25 10:03 rob4226

The add-on will always have import and export functions, which prompt the user to select a file for import or export using a file picker (the pre-release already uses WebExtension code for this).

I tried the export function for templates, but it didn't work well. After asking for the file name to save, nothing happened.

(Quicktext ver. 6.2.2, Thunderbird 128.8.1esr (64-Bit))

gschenck avatar Mar 26 '25 14:03 gschenck

I used to use ctrl key for my shortcuts. In new version if I select ctrl key for my shortcuts then the normal ctrl-enter to send email does not work no more. I switched my shortcuts to use alt key and now ctrl-enter works again. In old versions ctrl-enter worked even if I used ctrl for shortcuts.

pietpetoors avatar Mar 27 '25 04:03 pietpetoors

The add-on will always have import and export functions, which prompt the user to select a file for import or export using a file picker (the pre-release already uses WebExtension code for this).

I tried the export function for templates, but it didn't work well. After asking for the file name to save, nothing happened.

(Quicktext ver. 6.2.2, Thunderbird 128.8.1esr (64-Bit))

With ver. 6.2.3 export works, if you type your export file name with extension ".json".

gschenck avatar Mar 27 '25 08:03 gschenck

I used to use ctrl key for my shortcuts. In new version if I select ctrl key for my shortcuts then the normal ctrl-enter to send email does not work no more. I switched my shortcuts to use alt key and now ctrl-enter works again. In old versions ctrl-enter worked even if I used ctrl for shortcuts.

I will look at it this weekend. Thanks for the report.

jobisoft avatar Mar 27 '25 08:03 jobisoft

The add-on will always have import and export functions, which prompt the user to select a file for import or export using a file picker (the pre-release already uses WebExtension code for this).

I tried the export function for templates, but it didn't work well. After asking for the file name to save, nothing happened. (Quicktext ver. 6.2.2, Thunderbird 128.8.1esr (64-Bit))

With ver. 6.2.3 export works, if you type your export file name with extension ".json".

I will try to reproduce this, but was not able to up to now. The default filename pre-filled should be "templates.json" and even if I change it to something else ("templates.txt"), it works.

What OS are you on? What filename did you use, which did not work?

jobisoft avatar Mar 27 '25 08:03 jobisoft

To extend on ctrl option for shortcuts, ctrl v also do not work when ctrl is used for shortcuts. Right click paste works, thus nothing wrong with the paste function. I now remembered why I use ctrl key instead of alt, I need alt for special characters used in my language. If alt is used for shortcuts it enters the quicktext while I try type a special character code like alt136 for example.

pietpetoors avatar Mar 27 '25 09:03 pietpetoors

The add-on will always have import and export functions, which prompt the user to select a file for import or export using a file picker (the pre-release already uses WebExtension code for this).

I tried the export function for templates, but it didn't work well. After asking for the file name to save, nothing happened. (Quicktext ver. 6.2.2, Thunderbird 128.8.1esr (64-Bit))

With ver. 6.2.3 export works, if you type your export file name with extension ".json".

I will try to reproduce this, but was not able to up to now. The default filename pre-filled should be "templates.json" and even if I change it to something else ("templates.txt"), it works.

What OS are you on? What filename did you use, which did not work?

I'm on Windows 10. The filename "250327-quicktext" without extension did not work.

gschenck avatar Mar 27 '25 14:03 gschenck

I'm on Windows 10. The filename "250327-quicktext" without extension did not work.

Yeah, that looks like a general limitation. You need to use an extension.

jobisoft avatar Mar 27 '25 14:03 jobisoft

I can confirm that when you try to save an export file it doesn't export at all, regardless of the extension. I tried both json and txt.

Additionally, Quicktext isn't inserting the 'subject' field into any emails.

Quicktext Ver. 6.2.3 Windows 11 24H2 Build 26100.3476 Thunderbird 128.8.1esr

If you'd prefer, I can start a new issue for these.

bookmanager-mackenzie avatar Mar 27 '25 17:03 bookmanager-mackenzie

I can confirm that when you try to save an export file it doesn't export at all, regardless of the extension. I tried both json and txt.

Additionally, Quicktext isn't inserting the 'subject' field into any emails.

Quicktext Ver. 6.2.3 Windows 11 24H2 Build 26100.3476 Thunderbird 128.8.1esr

If you'd prefer, I can start a new issue for these.

Subject option is broken. Confirmed. Expect a fix this afternoon.

I cannot reproduce the export issue. Anything on the console? Can you give more details? You click on save and then what happens? Dialog closed but no file in the selected folder?

jobisoft avatar Mar 27 '25 18:03 jobisoft

OK, so I did some testing, and I found out something WILD.

I have two monitors. Apparently I have to move the save window around in order for it to export the files?

I made a screen recording.

https://photos.app.goo.gl/eVrEzR3ycrCbSPPA7

bookmanager-mackenzie avatar Mar 27 '25 18:03 bookmanager-mackenzie

Subject bug should be fixed in 6.2.6.

Known unresolved bugs:

  • some shortcuts do not work (https://github.com/jobisoft/quicktext/issues/439#issuecomment-2756656639)
  • large screen systems have an issue with the save dialog (debugging postponed till XUL-HTML conversion)
  • export needs an extension (do not think I can do something here)

jobisoft avatar Mar 27 '25 23:03 jobisoft

I have this script that no longer works with version 6 due to the removal of this.mWindow:

const type = this.mVariables[0];
const win = this.mWindow;

if (
  type == null ||
  (type == "on" && !win.gMsgCompose.compFields.returnReceipt) ||
  (type == "off" && win.gMsgCompose.compFields.returnReceipt)
) {
  win.ToggleReturnReceipt();
}

Are there alternatives to activate the return receipt only in certain templates?

EffeF avatar Mar 31 '25 07:03 EffeF

I have this script that no longer works with version 6 due to the removal of this.mWindow:

Are there alternatives to activate the return receipt only in certain templates?

Here is how you need to do it now (with v6.3.0 and later):

let { returnReceipt } = await this.compose.getComposeDetails();
// Toggle the return receipt setting, see
// https://webextension-api.thunderbird.net/en/stable/compose.html#compose-composedetails
await this.compose.setComposeDetails({ returnReceipt: !returnReceipt });

Note that all functions from this.compose.* automatically use the correct tabId, and you do not have to specify it.

Edit: Updated after the release of v6.3.0

jobisoft avatar Mar 31 '25 09:03 jobisoft

I used to use ctrl key for my shortcuts. In new version if I select ctrl key for my shortcuts then the normal ctrl-enter to send email does not work no more. I switched my shortcuts to use alt key and now ctrl-enter works again. In old versions ctrl-enter worked even if I used ctrl for shortcuts.

This should be fixed in v6.2.8.

jobisoft avatar Mar 31 '25 21:03 jobisoft