Sprints: Replace WebExtBrowserCompat macro with Compat

Created on 10 Jan 2019  路  10Comments  路  Source: mdn/sprints

We should replace the WebExtBrowserCompat with the Compat macro.

There are about 400 en-US pages using this macro and about 1000 across all locales. It's possible to split this work up among several people, but needs coordination.

Tasks


    • [x] Write a tracking sheet so we can share the work


    • [x] Describe what people need to do


    • [x] Convert all en-US pages


    • [x] Convert other major locales


    • [x] Convert whatever's left

Acceptance criteria

WebExtBrowserCompat is deleted All pages use Compat.

Most helpful comment

All 10 comments

I am happy to do some of these as time allows. Let's see where we are by mid-sprint review time.

There are ~400 calls to this macro in en-US, and ~1000 in all locales. Unfortunately we don't AFAIK have good tools for getting the list of pages. So the overall plan is this:

  1. we fix all the en-US pages:

    • we fix all the pages we can find under /API and /manifest.json. This should comprise almost all calls to the macro.
    • we go back and check the numbers in https://developer.mozilla.org/en-US/dashboards/macros, and if they are small enough we manually fix any stragglers.
  2. we go to a different locale that is well maintained (e.g. fr) and repeat (1).

  3. we repeat (2) until we have only a handful of calls left, then manually fix any stragglers.

To that end I've created https://docs.google.com/spreadsheets/d/1IwoiPHT14iGueV3ddYPNi8pcZ8q6IkleOALx7RFU5D8/edit#gid=0. It will have one page per locale, only en-US for now. Each row is an API overview page (except the first which is the top-level manifest page). To use the spreadsheet:

  • claim an API (or the manifest keys) by adding your name in "Assignee" for that row.
  • fix all pages in that API (this means all the Types, Properties, Functions, Events). "Fixing" means replacing {{WebExtBrowserCompat}} with {{Compat(path)}} where path is the relevant BCD query, then checking the page looks OK. The might be a few tricky cases but in general it should be pretty obvious what to do.
  • when you are done, write "Done" in the "Status" column.

@Elchi3 , @chrisdavidmills, does that sound OK?

@wbamberg sounds fine!

I did 100 of the en-US ones starting from the bottom of the API list:
storage
tabs
theme
topSites
types
webNavigation
webRequest
windows

If you grant me access to the sheet, I can enter that there as well.

@Elchi3 , did you also do alarms, bookmarks, and browserAction?

fr is done (or near enough, anyway). A lot of these pages were updated by @hellosct1 over the weekend - thanks!

Moving on to ja.

I've converted all pages across all locales, and filed: https://github.com/mdn/kumascript/pull/1048 to remove the WebExtBrowserCompat macro.

https://www.youtube.com/watch?v=OTn01jjEFfY

Wow, that was fast! I didn't even get to start on any of them ;-)

Great work @wbamberg. And thanks @Elchi3 for helping out.

Was this page helpful?
0 / 5 - 0 ratings