Coder Social home page Coder Social logo

developer-docs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

developer-docs's Issues

TB 68->78 changes page should mention removal of nsIEditorStyleSheets

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.

Artifacts Build page introduces the Try Server without it having been explained yet

https://developer.thunderbird.net/thunderbird-development/building-thunderbird/artifact-builds#artifact-builds-on-the-try-server

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

Wishlist for Developer Docs

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

Do we still QI windows to nsIMsgWindow?

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.

TB Changes pages should mention Services.prompt.select

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...

Fixing a bug: Add parsable CSS test

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.

[Code Example] Add menu item in new App Menu

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.

Add a top-level menu item for MailExtension API

Step to Reproduce

  1. Open tps://developer.thunderbird.net/
  2. Go to Resources and Additional Documentation
  3. Click on MailExtension URL in the table (it opens a new tab that goes to https://thunderbird-webextensions.readthedocs.io/en/68/)
  4. Click on the "latest version" URL in the note block

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.

Images not visible on developer.thunderbird.net

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).

manifest.json not parsed correctly

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

[Code Example] How to add a custom toolbar button

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.

Add Linting section

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.

Add de-XBL info and resources

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:

Need cause for recommendation to not have install.rdf+install.js

In the TB 68 extension update docs, it says:

It is possible to have both install.rdf and manifest.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.

Xul conversion: most (not all!!) overlays have been removed

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

Try server docs don't tell you how to find your results

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. :-)

"Tips for making builds faster" link refers to the wrong page (Get Started guide)

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.

Add some bookmarks hg config to the bookmarks page

There are a few things that will make working with bookmarks better:

  • the hg evolve extension, despite it being experimental
  • colors
  • the hg wip command, which is defined through hgrc

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.

Update docs to reflect removal of legacy add-on support

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.

Building thunderbird from the manual no longer appears possible for general users

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

Add <textbox> to <html:input> conversion quick guide.

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:

  • Add aria-labelledby="labelID" to the html:input for accessibility.
  • All the proper styles and classes should come from the input-fields.css, most likely all the various cases should be covered by those CSS declarations.
  • Use the class .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.
  • Add the globalOverlay.js and editMenuOverlay.js if the right click (context menu) doesn't work on an input field.
  • Specify the field type, like type="text", type="number", etc.
  • Visually compare the fields before and after the conversion to be sure the UI, sizing, and spacing doesn't change.
  • Always look if any JS method is interacting with the fields you're updating to check if the textbox tag name is used for conditions or similar. Eg. if (element.localName == "textbox") { or getElementsByTagName("textbox")

Improve docs for try server with non-tip mozilla-central changeset

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.

TB 78 changes page should (?) suggest explicitly adding drop-markers to menubuttons

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.

SVG and Iconography guidelines for Add-ons

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:

  • Create SVGs for toolbar buttons
  • HiDPI PNGs
  • Recommended software for image creation

I'll create a PR with this section later next week.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.