thunderbird / developer-docs Goto Github PK
View Code? Open in Web Editor NEWDeveloper documentation for Thunderbird contributors.
Home Page: https://developer.thunderbird.net
Developer documentation for Thunderbird contributors.
Home Page: https://developer.thunderbird.net
For example, https://developer.thunderbird.net/thunderbird-development/fixing-a-bug/landing-a-patch#pushing-to-try mentions "IRC (#maildev)". This, and possibly other places, should mention "Matrix chat (#maildev:mozilla.org)" instead.
We should implement an "Iconography" section in the Add-ons category to help add-ons developers properly create or select images and SVGs for their add-ons.
These are the areas we should highlight:
I'll create a PR with this section later next week.
In the <textbox>
paragraph on https://github.com/thundernest/developer-docs/blob/master/add-ons/updating/tb78/changes.md
<script src="chrome://global/content/editMenuOverlay.js.js"/>
should be
<script src="chrome://global/content/editMenuOverlay.js"/>
I have developed a bootstrap add-on which was previously working on thunderbird v60. In order to make it compatible with the new thunderbird version ( currently testing on 67 beta ), i stared by changing the install.rdf file ( which was working fine on version 60 ) to a manifest.json file.
My manifest.json looks like the following:
{
"manifest_version": 2,
"applications": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "67.0a1"
}
},
"name": "SmartMail",
"description": "",
"version": "2.0",
"author": "[amine]",
"legacy": {
"type": "bootstrap",
"options": {
"page": "",
"open_in_tab": true
}
},
"icons": {
"64": "chrome/content/images/unisex32.png",
"32": "chrome/content/images/unisex32.png",
"16": "chrome/content/images/unisex32.png"
}
}
However, when i try to install the extension (add-ons --> debug add-on), i get the following error message:
Reading manifest: Error processing legacy: Value must either: be a boolean, or not contain an unexpected "type" property
The Services.prompt.select()
function now takes one argument less: no longer is it an array length followed by the array - now it's just the array (and it determines the length itself). I'm sure you can find an appropriate example...
On this page, it says:
With TB70, window objects don't need to be and cannot be QI'ed to nsIDOMChromeWindow, nsIDOMWindow and nsIInterfaceRequestor. You can just remove its usage, this is backwards compatible to TB 68. See the fix applied to enigmail.
but what about other interfaces? e.g. nsIMsgWindow? Do we still need to QI for that? This should be clarified.
The nsIMessageCopyService interface has had methods renamed to start with lowercase letters:
https://bugzilla.mozilla.org/show_bug.cgi?id=1715433
and while the service is mentioned on the TB 78->91 page, that's only in context of the switch to JS arrays.
Was a full pass made over the mercurial log to make sure all the changes covered by the page?
@jorgk3 suggested to limit the Thunderbird versions add-ons would be compatible with to reduce the reviewer burden.
Note: This issue was originally created in the atn-review-policy repository.
thunderbird/atn-review-policy#5
I hope this is the right location for this.
I have just noticed that the developer.thunderbird.net support site has a header pointing to https://support.mozilla.org/en-US/products/thunderbird
Given the audience of the site it is probably more relevant to point this link to a page showing addon and developer links, not general 8user support. perhaps https://developer.thunderbird.net/add-ons/community
https://developer.thunderbird.net/contributing/fixing-a-bug/using-mercurial-queues describes using mq. For various reasons the current recommendation is to use bookmarks, so for people who don't know either I think we should be recommending bookmarks. I think we should:
The xpcshell.ini example is missing, looks like you've skipped straight to the next example. Original is still here that you can copy https://github.com/darktrojan/developer-docs/blob/master/addingTests.rst
Xul conversion document:
It States that overlays in TB have been removd and recommends to use Messenger.xul.
That Statement is not quite correct.
For example searchdialog.xul still exists in 68b1.
So Maybe state most overlays have been removed.
I would have saved me a few hours of wonderment and Code analysis.
Thanks Klaus
JaneK recently wrote:
One thing that apparently changed with toobarbuttons (type=menu or type=menu-button) is that you have to include the dropmarker as child of the button:
<toolbarbutton type="menu-button"> <menupopup ..> ... </menupopup> <dropmarker type="menu-button" class="toolbarbutton-menubutton-dropmarker" /> </toolbarbutton>
I had a similar issue with a toolbarbutton that shows a menu.
This happened before TB 86:
https://bugzilla.mozilla.org/show_bug.cgi?id=1682941
Now, the the TB 78->91 changes page does mention a change to nsIMsgFolder.subFolders - but not the correct change. The change isn't abandoning nsISupportsArray in favor of a JS array, but rather replacing nsISimpleIterator with nsIArray.
See also #127.
We should add a section dedicated to the Linting of the code before pushing a patch, listing the commands and some formatting example.
Since we're adopting Prettier we should also list all the available extensions for the most commonly used code editors and IDEs.
An important API function removed over the past year is document.getAnonymousElementByAttribute()
.
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1591145
The TB 68->78 changes pages should discuss this and suggest an alternative.
Images on these pages are not visible for me.
https://developer.thunderbird.net/thunderbird-development/hello-world
https://developer.thunderbird.net/thunderbird-development/building-thunderbird/artifact-builds
The Thunderbird logo is also not visible in the site header. Instead of the images I see a "missing image" placeholder. The console reports CORS issues like this:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://gstatic.gitbook.com/js/111.e4f7ad42.js. (Reason: CORS request did not succeed).
TIL that we have the browser_parsable_css.js
test that checks for any typos or mistakes in our CSS files.
This test runs whenever we push something to the server but it can also run locally.
We should add a section in the "Fixing a bug" page recommending running this test locally whenever a CSS file is changed.
There are a few things that will make working with bookmarks better:
I'd suggest we either link to or provide a .hgrc that includes some of the features Thunderbird developers commonly work with and make some recommendations on what extensions to enable.
Hi there,
Thanks so much for your work documenting Thunderbird developer processes.
I was excited this morning to read about the new changes in Thunderbird 102.
However, when I attempted to build the binary from the mercurial package, I found that the instruction manual for building Thunderbird is no longer of much use to project outsiders. For reference: https://developer.thunderbird.net/thunderbird-development/building-thunderbird
The guide suggests using the mach
command to build Thunderbird from the root of the mercurial repository. However, there is no sign of a mach
command within the repository, and when I searched online for Mozilla's mysterious mach
command, I couldn't find the shell script anywhere online. I looked for it in Gentoo's package repository, because they usually have to host build processes in a very public way, but I had no success there.
Could someone please update the guide with instructions for general users intending on building Thunderbird from scratch, or simply direct me to a copy of the mach
command? Building an open source program is usually as simple as running ./configure
, followed by make install
. I was able to run Thunderbird 102 from the website's binary Linux download. However, doing it this way (from my Downloads directory) doesn't read any data from my ~/.thunderbird
directory, so I'm not really able to see Thunderbird 102 in action with my current email accounts. Any help would be much appreciated.
Kind regards,
Seán Healy
In Bug 1513652 on Bugzilla, Ben laid out what he would like to see documented in the docs. Below is what he said.
Also, I've been compiling a sort of wishlist for what I'd ultimately like to see in a TB development guide.
Most of the bullet points are a little arbitrary and incomplete, but hopefully it gives a flavour.
I've split up into 3 main sections: "Getting Started", "Reference" and "Architecture".Again, a lot of these things could be annotated links to existing docs, at least to begin with.
Getting Started
- Updated
Start_Hacking
guide- Assorted "How To" guides
- how to add a unit test
- debugging tips
- TB-centric Bugzilla guide
- Where to ask for help
- Relationship between M-C and C-C
- High-level architectural view
Reference
XPCOM reference
- Overview - goals, issues, common pitfalls
- Best practices/patterns/idioms
- API reference
- Index of core platform APIs - strings, XPCOM, file access etc
- Index of firefox APIs
- Index of TB APIs
- Note clearly which ones are being phased out, and their replacements
- Docs autogenerated from code where possible, but make sure not to overwhelm with detail.
- Curated index of important APIs
- Ongoing effort to improve/clarify docs.
If you can't easily document an API, then it's probably too complicated :-)C++ environment
- C++-specific APIs
- Coding style
- Thread safety rules
- Linting/static analysis tools
JS environment
- JS-specific API reference (eg OS.File et al)
- preferred idioms
- async/await vs promises vs generators
- modules (do we have our own module system or are we moving toward some existing standard?)
- coding style
- to run linter to check
- GUI (eg are we shifting from XUL to more HTML-based?)
Testing
- unit tests
- mozmill/mochi/whatever
- how to run/write/debug tests
Tools
- mach
- linting
- testing
Source layout
Index of stuff which is deprecated/on the way out and what replaces it.
(eg using OS.File over nsIFile),Curated index of interesting/useful blog posts/articles about TB development,
with some indication of relevance/staleness.Architecture
Concepts, intentions, aspirations.
JS/C++ split - where the boundaries should be.
Threading model
Plugin/extension model
The applications
is mentioned in https://developer.thunderbird.net/add-ons/mailextensions#basic-extension-properties, but is missing in https://developer.thunderbird.net/add-ons/mailextensions/supported-manifest-keys, which from my understanding should list all supported keys.
Step to Reproduce
Actual Behavior
It takes a lot of clicks to finally get to the MailExtension API documentation. Further, it's not obvious at first that the first link you need to click on to get to the doc is in the "Resources and Additional Documentation" section.
Expected Behavior
Having a top-level item in the main menu that send you directly to the API doc would be a good minimal solution. Having the documentation on developer.t.n instead of read the doc would be even better but that could be a separate issue since it'll need more work to migrate the doc.
The new App Menu is part of daily now, so we should consider writing down a small tutorial on how to generate and append custom menuitems
inside the various sections, and how to create sliding subsections.
https://developer.thunderbird.net/thunderbird-development/fixing-a-bug/try-server
The closest I could find on here was "it works pretty similar to Firefox's try server" and links to their docs. But the "how to view your results" on the Firefox Try docs only links the Firefox try server and ftp.
Should add a Thunderbird-specific how to view the results.
Treeherder: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central
I haven't found the FTP where the builds get put yet, or I'd have a PR for this. :-)
In the TB 68 extension update docs, it says:
It is possible to have both
install.rdf
andmanifest.json
files in your extension, so you could release a version compatible with Thunderbird 60 and 68. It is not recommended.
This is a pretty significant statement to make: You're recommending extension authors drop compatibility with v60 and earlier when updating their extensions for 68... I really feel you should give a reason for this dis-recommendation.
this page: https://developer.thunderbird.net/add-ons/upgrading-add-ons-for-tb68/list-of-changes-in-thunderbird-core#changed-api has a list of contents on the right side. It is truncated on a small screen ( 10 in) and there is no scroll bar.
Some add-on developers have to yet convert their code to Custom Elements and remove the deprecated XBL bindings.
We should extend the Remove XBL Bindings section with some code snippets and useful tools: https://developer.thunderbird.net/add-ons/updates/tb68#removed-xbl-bindings
Eg:
Yesterday comm-central was busted when I did a try server run (which failed due to the bustage). I followed the docs to redo the try run with a mozilla-central changeset that was earlier than the one that busted comm-central. The docs could be improved for this use case.
The relevant docs are here, but they cover a different use case, and didn't work for me when I tried to follow them. I had to get some help on IRC, and what I ended up having to do is not what was described in the docs.
All I had to do was add a GECKO_HEAD_REV line to my .gecko_rev.yml
file so it looked like this:
GECKO_BASE_REPOSITORY: https://hg.mozilla.org/mozilla-unified
GECKO_HEAD_REPOSITORY: https://hg.mozilla.org/mozilla-central
GECKO_HEAD_REF: default
GECKO_HEAD_REV: 7faec8e0996bce01fdd1bb9f1b2a1c60045de16c
One thing I didn't realize, since these docs don't mention it, is that you have to commit your changes to the .gecko_rev.yml
file for them to take effect on the try server.
Since bustages are still common, I think it would be worth having a different section in the docs to cover this scenario.
Really minor, but the developer docs have https://blog.mozilla.org/thunderbird whereas thunderbird.net has https://blog.thunderbird.net/
I don't think the link at https://github.com/thundernest/developer-docs/blob/master/thunderbird-development/building-thunderbird/README.md#make-your-build-faster really provides any insight on how to set up ccache. I also think it's now recommended to use sccace for Firefox, not sure if that also applies to TB.
We have seen this to be a major issue with forks being created and users manually have to switch. The new policies should open up a way to define "abandoned" and let us re-assign an owner.
Now that daily is free of <textbox>
elements, it might be helpful to write down a quick HOW-TO guide for add-on developers who might need to do the same.
Here's everything I learned while working on this:
aria-labelledby="labelID"
to the html:input
for accessibility.input-fields.css
, most likely all the various cases should be covered by those CSS declarations..input-container
on an HBOX
when you need the input field to behave like a flex="1"
as the attribute flex=""
doesn't do anything on the input field, so it can/must be removed.globalOverlay.js
and editMenuOverlay.js
if the right click (context menu) doesn't work on an input field.type="text"
, type="number"
, etc.textbox
tag name is used for conditions or similar. Eg. if (element.localName == "textbox") {
or getElementsByTagName("textbox")
We should migrate the Chat Core section from MDN, and all its subsections, to DTN.
https://developer.mozilla.org/en-US/docs/Mozilla/Chat_Core
For Firefox we have a download badge e.g. now on this page:
Three years ago I asked for this on Discourse and on GitHub.
However, where I can find the same for Thunderbird (add-ons)?
Cross-posted to the Mozilla Discourse forum and Thunderbird Topicbox.
This is the first mention of the try server in the developer docs if you're reading them in order, and it's written as if you already know what the try server is. It should either explain it here, or provide a link to where it does get explained.
Poking around a bit, it looks like the place it gets explained is https://developer.thunderbird.net/thunderbird-development/fixing-a-bug/try-server
We need to update the docs in order to reflect the new NotificationBox
implementation based on the abstract class available from toolkit.
An initial reference is here: https://thunderbird.topicbox.com/groups/addons/T321f9b5d0964e424-Ma3ec42bc020def36c8745dd0
Now that calendar is close to being integrated into TB (https://bugzilla.mozilla.org/show_bug.cgi?id=1608610), it is my understanding that support for legacy extensions will be going away soon after, possibly as soon as the next TB beta that will be released after the Firefox 73 merge on Feb 10 (https://wiki.mozilla.org/Release_Management/Calendar). The docs should help add-on devs understand and prepare for this. Here are a few things we can do. There are probably others as well.
Mail/WebExtensions Experiments should be more prominent, for example a brief description and link to further docs on the "About Add-ons" page (like what's currently on the "Updating Legacy Extensions for Thunderbird 78" page).
On the "About Add-ons" page there should be a stronger message that legacy extensions are deprecated, with support soon to be removed, with a mention of approximately when they are going away.
Here we have the following link: parseXULToFragment(). But - this link is dead.
On this part of the site:
https://developer.thunderbird.net/add-ons/about-add-ons
we should, IMHO, have not just a section with the information about changes in versions 61-68, but also a similar section with the information regarding changes in versions 53-60, which currently appears here:
The removal of nsIEditorStyleSheets necessitates the following changes:
addOverrideStyleSheet(uri)
-> windowUtils.loadSheetUsingURIString(uri, windowUtils.AGENT_SHEET)
removeOverrideStyleSheet(uri)
-> windowUtils.removeSheet(uri, windowUtils.AGENT_SHEET)
enableStyleSheet(uri, enable)
-> (enable ? windowUtils.loadStyleSheetUsingURIString : windowUtils.removeSheet)(uri, windowUtils.AGENT_SHEET)
The TB 68->78 changes page should mention this.
Create a small tutorial with some snippets on how to generate and add a custom toolbarbutton
to our main Toolbar.
This example is useful to showcase how a developer can generate custom elements to dynamically load and append in the Thunderbird UI.
The link for "Tips for making builds faster." in Make Your Build Faster section refers to the Get Started section. This section doesn't talk about tips to build TB faster.
At least, the page Tips and Tricks is more appropriate than Get Started page, even if there is no information about building TB faster.
On Mozilla developer website, Tips for making builds faster refers to Making builds faster.
By replacing the link https://developer.thunderbird.net/thunderbird-development/getting-started by https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Mozilla_build_FAQ#making_builds_faster for Tips for making builds faster in Make Your Build Faster, it can be more understandable.
importing js:
var { Foo } = Cu.import("resource://foo/modules/Foo.jsm", null);
this is now necessary already in 60.6.1. Documentation says it was added in TB 67
./mach install-moz-phab
is needed to install phabricator.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.