In this version of sync, we'll only store the data that's absolutely necessary to recreate things.
Non-essential data, such as the colour of a calendar, will be added later.
I've almost completely rebuilt the code for creating and applying sync records. All records are
now cached in the user's profile so that we don't destroy information we don't understand yet
(forward compatibility). This isn't backwards-compatible, existing data will be wiped from the
server automatically because the engines' version numbers have been incremented.
I've also overhauled the tests. They are very repetitive but cover almost 100% of the code.
Differential Revision: https://phabricator.services.mozilla.com/D205784
--HG--
rename : mail/services/sync/modules/engines/accounts.sys.mjs => mail/services/sync/modules/engines/servers.sys.mjs
rename : mail/services/sync/test/unit/test_account_store.js => mail/services/sync/test/unit/test_server_store.js
rename : mail/services/sync/test/unit/test_account_tracker.js => mail/services/sync/test/unit/test_server_tracker.js
extra : amend_source : 54e3f0d713980172b02585b0de36278390379b87
When the view gets hidden, the resize observers are informed that its height is 0. Consequently
when it becomes unhidden, some calculations are performed using a cached height of 0, before the
resize observers are updated.
When the header itself is hidden, we DO cache a height of 0, because that is the actual height.
Differential Revision: https://phabricator.services.mozilla.com/D210245
--HG--
extra : amend_source : 28fb039d266f9884f4c3cd768e003f23a28fd6ec
Thunderbird has two special content script types (one for the editor of
the compose window and the other for messages being displayed) for which
we have the dedicated composeScripts API and messageDisplayScripts API.
Manifest V3 moved content script related methods into the scripting API
and applied the following changes:
* no longer allows to use code strings as content scripts
* dropped its child implementation
* has a dedicated unregister function (the register function no longer
returns an object with an unregister() method)
* has a getRegisterdScripts() function
To adjust to these changes, we deprecate both our current content script
APIs and add new ones to the scripting API.
This patch only updates existing tests to work with the new
implementation. A follow-up will add tests for the new features of the
added APIs
Differential Revision: https://phabricator.services.mozilla.com/D210241
--HG--
rename : mail/components/extensions/parent/ext-extensionScripts.js => mail/components/extensions/parent/ext-scripting-tb.js
extra : amend_source : b676ef477ffaa03baf33d79eacb7800ee67e0797
The scripting API was added for Manifest V3. This adds tests for this
new API.
Differential Revision: https://phabricator.services.mozilla.com/D210103
--HG--
rename : mail/components/extensions/test/browser/browser_ext_composeScripts.js => mail/components/extensions/test/browser/browser_ext_composeScripts_mv3.js
rename : mail/components/extensions/test/browser/browser_ext_contentScripts.js => mail/components/extensions/test/browser/browser_ext_contentScripts_mv3.js
rename : mail/components/extensions/test/browser/browser_ext_messageDisplayScripts.js => mail/components/extensions/test/browser/browser_ext_messageDisplayScripts_mv3.js
extra : amend_source : 4eece16a87e9f5e1c61d360d43f9de9cf522429e
Mozilla supports the scripting API (which was introduced for Manifest V3)
already in Manifest V2. This adds tests for the scripting API in Manifest V2.
Differential Revision: https://phabricator.services.mozilla.com/D210102
--HG--
extra : amend_source : 324b77a8b52693e63844c2e3fb3431de04a79744
We do not support the method to hide tabs, so we do not need to list the
permission, which shows up the in the documentation and may be
confusing.
Differential Revision: https://phabricator.services.mozilla.com/D210282
--HG--
extra : amend_source : a9c3b6e36e8e9df9c67c4b217a92a2ad0a9209be
- Fix a recent regression (from bug 1892074) by restoring the thread state when all messages have been loaded in any view searching one or more folders.
- Enable DBViewWrapper._threadExpandAll and threadPane.restoreThreadState() for synthetic views as well. This is necessary to use Grouped-By-Sort in Expand-All state without performance impact.
Differential Revision: https://phabricator.services.mozilla.com/D209493
--HG--
extra : amend_source : 3b08301bd81c8743cae1b9a60c8af1ff143204e3
After we introduced the unified toolbar, the action manifest property
`default_area` was removed for Manifest V3. This however introduced
an incompatibility with Firefox, and a simple WebExtension using an
action button would throw. This patch re-adds support for the property,
but ignores it.
Differential Revision: https://phabricator.services.mozilla.com/D210127
--HG--
extra : amend_source : bab78c4511cfa33f4738a89dac4ac8c486f74495
- Implement the `mail.identity.default.archive_recreate_inbox` preference and the corresponding `nsMsgIdentity` attribute `archiveRecreateInbox`. This defines how the inbox folder is handled when archiving while preserving the folder structure. If the pref is `false`, the inbox is treated like the root folder, if `true`, it is recreated like any other folder.
- Make this preference available in the account archive options. Update and fix the example shown there.
Differential Revision: https://phabricator.services.mozilla.com/D208350
--HG--
extra : amend_source : a17e36bde568e13d2735587e8a54255b9d68bca9
Really a Windowx XP thing...
Differential Revision: https://phabricator.services.mozilla.com/D210022
--HG--
extra : rebase_source : 2de0e3e970367bbcb1528e2310ba5bf68e3095ad
extra : amend_source : 5213eceaddb12b829352c406c1603c7099ec607e
Resorting the messages is only necessary when changing from threaded or grouped to unthreaded.
Differential Revision: https://phabricator.services.mozilla.com/D208830
--HG--
extra : amend_source : 81cc22b8e615e0959a36b214a4e590d47e370a07
Just a simple tidy up. No attempt has been made to replace XUL widgets with HTML ones, or any other maintenance of that sort.
Differential Revision: https://phabricator.services.mozilla.com/D209901
--HG--
extra : amend_source : 4fd753f2e2b379ff2ae45101bac44e7ddb19d108
This patch generalises the existing nsISmtpService and nsISmtpServer interfaces
to remove assumptions that the sending mail server is always SMTP. In this new
architecture, the protocol-specific settings are set in a separate,
protocol-specific XPIDL interface that is used to configure the sending server.
I have also removed some attributes and a method from these interfaces, as they
either were not needed across the XPCOM boundary, or were not used at all.
Intentionally left out of scope for this patch:
* Migrating (from .properties to Fluent) and updating some l10 strings to not
mention SMTP explicitly.
* Conditionally defining the outgoing protocol in the account setup code.
* Conditionally showing a server's details and edit form in the account
settings code.
* Migrating prefs to not use "smtp" in their names if the server doesn't
actually use SMTP.
Differential Revision: https://phabricator.services.mozilla.com/D203799
--HG--
rename : mailnews/compose/public/nsISmtpServer.idl => mailnews/compose/public/nsIMsgOutgoingServer.idl
rename : mailnews/compose/public/nsISmtpService.idl => mailnews/compose/public/nsIMsgOutgoingServerService.idl
rename : mailnews/compose/src/SmtpService.sys.mjs => mailnews/compose/src/OutgoingServerService.sys.mjs
rename : mailnews/compose/test/unit/test_nsSmtpService1.js => mailnews/compose/test/unit/test_nsMsgOutgoingServerService1.js
extra : moz-landing-system : lando
**How to Test**
- Check all actions that can open message in a new tab
- Using the context menu or middle click should always open a message in a tab
- Using shift with those above actions should focus those tabs, otherwise the tabs should open the background
- Double clicking a message when loadInBackground pref is false should open and focus on that message in a new tab
- Shift should open the above action in the background
- Vice versa for when loadInBackground pref is true
- Load in background pref should not affect middle click and context menu actions
Differential Revision: https://phabricator.services.mozilla.com/D209609
--HG--
extra : moz-landing-system : lando
This only removes the 10 seconds delays when clicking on a Windows OS notification.
With these prefs set to `false` the notification is correctly dismissed and the message is visualized.
Unfortunately, the application is not brought to the foreground correctly, but we will take care of this in bug 1863798.
Differential Revision: https://phabricator.services.mozilla.com/D208574
--HG--
extra : amend_source : 441ed8f2688c50caf349c6a064628eb5b4f9f5b1
Optional properties should not return null, but be simply undefined. The
risk of breaking add-ons here is to big, so we fix this only for
Manifest V3.
Differential Revision: https://phabricator.services.mozilla.com/D209203
--HG--
extra : moz-landing-system : lando
The mailTabs API has `mailTabs.getSelectedMessages(id)` which has its
`id` parameter defined optional, returning the selected message(s) of
the currently active tab if not specified.
Let's allow the same behavior also for `messageDisplay.getDisplayedMessages()`.
Differential Revision: https://phabricator.services.mozilla.com/D209018
--HG--
extra : moz-landing-system : lando
This patch updates the schema files to correctly specify the return
values of Thunderbird's WebExtension APIs. This aims to help create
proper TypeScript type definitions directly from the schema files.
There are 3 areas of interest:
The callback function parameter, which we use to define the return
type is optinal. Our APIs can actually be used with callbacks, but
they are of course optional. Some of our APIs did not specify them as
optional. The schema validator ignored these issues and they went by
unnoticed.
Functions can either return `null` or `undefined` and our APIs did both
without explicitly specifying which. We now use `optional: true` to
indicate `undefined`. If a function returns `null`, it is explicity
stated as a possible return value.
Some of our WebExtensions APIs return objects with some/all of their
properties being defined as optional. Some of those however have been
returned as `null`, which is now fixed.
Differential Revision: https://phabricator.services.mozilla.com/D208998
--HG--
extra : moz-landing-system : lando
Properties expecting a folderId are renamed to have an `Id` suffix. This
affects properties of the `MailTabProperties` type used in
`mailTabs.update()` and `mailTabs.create()`, as well as properties of
the `ComposeDetails` type used in `compose.set/getComposeDetails()`.
The `ComposeDetails` properties switch to "optional": "omit-key-if-missing"
syntax, allowing us to drop `ComposeDetails.overrideDefaultFcc`. We can
now reset the override by setting `overrideDefaultFccFolderId` to `null`.
Differential Revision: https://phabricator.services.mozilla.com/D208196
--HG--
rename : mail/components/extensions/test/browser/browser_ext_compose_details.js => mail/components/extensions/test/browser/browser_ext_compose_details_mv3.js
extra : moz-landing-system : lando
Adding full support for virtual tag folders did force a slight change in
the representation of unified folders. I already tried to not expose
that unified folders actually belong to the "smart" account, but I did
expose the common root folder for all unified folders. After adding the
tags folder, it became obvious, that this should be reverted. The API
should not depend on the implementation detail, that the "tags" folder
is a folder of the same "smart" account.
The unified mailbox folders now have the following representation:
id: unified://<type>
path: /unified/<type>
The virtual tag folders have the following representation
id: tag://<key>
path: /tag/<key>
This patch adds the missing pieces for full support of virtual tag
folders and the required tests.
Differential Revision: https://phabricator.services.mozilla.com/D208945
--HG--
extra : moz-landing-system : lando
We currently use getSmartServer() in various code areas to create, get
and update the smart account/server/folders. The virtual tags folders
were not handled by that method and the required code was only
triggered, when the user enabled the "tags" folder mode in the UI.
The WebExtension API needs access to these tag folders even if the user
has not yet enabled that folder mode.
This patch adds a SmartMailbox class, which simplifies tasks related to
unified mailbox folders and virtual tag folders, and creates the
virtual tag folders together with the unified mailbox folders.
It renames SmartServerUtils.sys.mjs to SmartMailboxUtils.sys.mjs.
Differential Revision: https://phabricator.services.mozilla.com/D208776
--HG--
rename : mail/modules/SmartServerUtils.sys.mjs => mail/modules/SmartMailboxUtils.sys.mjs
extra : moz-landing-system : lando
This adds a dedicated method to get one of the tags folders.
Including a minimal test.
A follow-up is needed to move the code which actually creates the
virtual tag folders from about3pane.js to SmartServerUtils.sys.mjs
Differential Revision: https://phabricator.services.mozilla.com/D208762
--HG--
extra : moz-landing-system : lando
Increase timeout for CCOV builds, which seem to be the ones affected.
Make the test clean up after itself so `./mach test --verify` can be used.
Differential Revision: https://phabricator.services.mozilla.com/D209779
--HG--
extra : rebase_source : 65917ca76c5be23eb2f56aff7ebb0505f525cef7
extra : amend_source : 07b472e3f3d7b3bf0c3938f955d7d050fa2f3b48
The test couldn't run with `--verify` before due to not cleaning up properly.
It's still doesn't fully locally due to errors with the gloda collection test cases, but it's much better.
Differential Revision: https://phabricator.services.mozilla.com/D209783
--HG--
extra : rebase_source : d3e2e5805fe1b028782e986b441dcb5d2fd182c0
extra : amend_source : 38ee1de7d454f8b6932f5a46149131cda8d46da7
This is adding the required changes to make `runtime.getContexts()` work
in Thunderbird.
This also adds a mochitest, which is based on this m-c test:
/browser/components/extensions/test/browser/browser_ext_runtime_getContexts.js
Differential Revision: https://phabricator.services.mozilla.com/D209794
--HG--
extra : rebase_source : 8c0c71071c77eb7bacd06fa5c5a5ef787c163e2b
- This shows the appropriate confirmation dialog also when deleting messages in a unified folder, a conversation view or in the Search Messages dialog.
- Disable move/delete operations for expanded headers in Grouped By views (see also bug 1873313).
Differential Revision: https://phabricator.services.mozilla.com/D208902
--HG--
extra : amend_source : 10eae9c2eea8b3e3265864c63c87fce31ac6def5
This fixes the following issues:
- Selecting Grouped By Sort in a unified folder doesn't work properly under certain circumstances.
- In a single-folder view with bySize as the secondary sort, selecting Grouped By Sort always uses byDate as the sort type.
- In a multi-folder view with bySize as the primary sort, selecting Grouped By Sort destroys the view.
- Selecting Grouped By Sort when the view is sorted byUnread, byJunkStatus, or (in a single-folder view) byLocation leads to an empty view.
Differential Revision: https://phabricator.services.mozilla.com/D209492
**How to Test**
- Open up your chat account on Thunderbird
- View "Previous Conversations" and "Participants" on the right hand side and check if the styling is unaffected
Differential Revision: https://phabricator.services.mozilla.com/D209675
--HG--
extra : moz-landing-system : lando