Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

O: Event reference docs refactoring #685

Closed
4 tasks done
Elchi3 opened this issue Nov 29, 2018 · 10 comments
Closed
4 tasks done

O: Event reference docs refactoring #685

Elchi3 opened this issue Nov 29, 2018 · 10 comments
Labels
Cf:Med Confidence: Medium Epic OKR Objective or Key Result

Comments

@Elchi3
Copy link
Member

Elchi3 commented Nov 29, 2018

User story

As a MDN content writer or content lead, I want to have a detailed refactoring plan about the event reference docs, so I can fit work items into sprints in Q1 2019.

Acceptance criteria

User stories and tasks for the event docs refactoring are created, estimated and prioritized. (the checklist under "planning tasks" is done)

Planning tasks

@Elchi3 Elchi3 added Cf:Med Confidence: Medium Content labels Nov 29, 2018
@Elchi3 Elchi3 added this to the Diana Ross (Q4 S4 2018) milestone Nov 29, 2018
@Elchi3 Elchi3 self-assigned this Nov 29, 2018
@Elchi3 Elchi3 changed the title Write a plan for event reference docs refactoring Event reference docs refactoring Feb 5, 2019
@Elchi3
Copy link
Member Author

Elchi3 commented Feb 5, 2019

The foundation tasks are written now. I had one API (WebSpeech) to play through a moving. In the MDN leads meetings today we decided that we should put 10 APIs into the next sprint, so I will create 10 issues in a similar fashion like I've done in #915

@Elchi3
Copy link
Member Author

Elchi3 commented Feb 6, 2019

I have created 10 issues for ten groups of events to work on. They are linked above.
More pages to refactor can be found in the spreadsheet: https://docs.google.com/spreadsheets/d/1uxOmExdaQsSU0J-DWDu-D0J3idhYc20Z9-Oh4tql8-0/edit#gid=0

We have 262 web events and there are 135 events not yet in issues. So these 10 issues are half of the web event pages roughly. Of course there is more work besides moving web events (see foundational work above), so I'm not saying that we can get half of all the work done in one sprint, but I think this would be really great progress.

@ExE-Boss
Copy link

ExE-Boss commented Feb 6, 2019

A lot of the events listed as “Legacy add‑ons” should be listed as “Chrome code”: #874 (comment)

@Elchi3
Copy link
Member Author

Elchi3 commented Feb 6, 2019

If you tell me which, then I can update #874.

@ExE-Boss
Copy link

ExE-Boss commented Feb 6, 2019

I’m pretty sure it’s all of them.

@Elchi3
Copy link
Member Author

Elchi3 commented Feb 6, 2019

Updated.

@jmswisher jmswisher added the Epic label Feb 7, 2019
@wbamberg
Copy link

wbamberg commented Feb 13, 2019

I've written up the procedure for moving and updating event reference pages, based on #915 (comment) and other stuff we have learned/decided since then.

This comment will be updated as we learn/decide new things :).


For each page:

Event page updates

  • Change the page title to interfacename: eventname event. For example, "Document: drag event".

  • Change the sidebar from {{EventRef}} to {{APIRef}}.

The page structure should be like:

The cells in the first column should be defined using <th>:

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Bubbles</th>
   <td>Yes</td>
  </tr>
  <tr>
   <th scope="row">Cancelable</th>
   <td>No</td>
  </tr>
  <tr>
   <th scope="row">Interface</th>
   <td>{{domxref("Event")}}</td>
  </tr>
  <tr>
   <th scope="row">Event handler property</th>
   <td><code><a href="/en-US/docs/Web/API/IDBRequest/onerror">onerror</a></code></td>
  </tr>
 </tbody>
</table>
  • H2: Examples:

    • Make sure the page contains an example of listening to the event using addEventListener.
    • If the interface also supports the on- event handler property version of the event (it usually does), include an example of that as well.
  • H2: Specifications:

    • this should look something like:
<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
  </tr>
  <tr>
   <td>{{SpecName('SPECNAME', '#SPECFRAGMENT')}}</td>
   <td>{{Spec2('SPECNAME')}}</td>
  </tr>
 </tbody>
</table>
  • H2: Browser compatibility:

    • This should use the {{Compat}} macro.
  • H2: See also

  • Some pages have different ways to format the info in the blue box. These should be updated to use the format in https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/abort_event

  • Some pages have a "Properties" section. This should be deleted (it duplicates the info in the event interface link).

  • Some pages have a "Related events" section. This should be deleted.

Interface page updates

  • Create a new H2 "Events" after the "Methods" H2. It should look something like: https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction#Events.

  • For every event page you create, add a new list item: the <dt> is a link to the new event page, and the <dd> describes it. If the interface also has an on- event handler property, add some words like "Also available via the oneventname property."

  • The interface page will typically have an "Event handlers" H3 under the "Properties" H2 (e.g. https://developer.mozilla.org/en-US/docs/Web/API/Document#Event_handlers). In that list, find the on- event handler property corresponding to the event you just added, and delete it. Ultimately we will retire this "Event handlers" H3, and only link to event pages from the "Events" H2


Some example migrated event pages:

https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/error_event
https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/audioend_event

Some example "Events" sections in the interface pages:

https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition#Events
https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest#Events

@a2sheppy
Copy link
Contributor

I would like for us to seriously consider naming the pages "InterfaceName: eventname event" instead of simply "InterfaceName: eventname"

For example, I feel very much that "RTCPeerConnection: track event" is vastly more helpful, and much easier to quickly understand what you're seeing, than simply "RTCPeerConnection: track". Not to mention that we've been getting recommendations from the SEO side that we add things like this to titles anyway.

@chrisdavidmills
Copy link
Contributor

I would support that.

@ExE-Boss
Copy link

ExE-Boss commented Feb 20, 2019

Also, for the blue box (<table class="properties">), make sure that the first column uses <th scope="row"> and not <td>, otherwise formatting breaks on mobile.

@jmswisher jmswisher removed this from the Erykah Badu (S1 Q1 2019) milestone Mar 22, 2019
@jmswisher jmswisher added OKR Objective or Key Result Q2'19 labels Apr 26, 2019
@jmswisher jmswisher changed the title Event reference docs refactoring KR: Event reference docs refactoring Apr 26, 2019
@jmswisher jmswisher changed the title KR: Event reference docs refactoring O: Event reference docs refactoring Apr 30, 2019
@Elchi3 Elchi3 removed their assignment May 2, 2019
@Elchi3 Elchi3 closed this as completed Mar 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Cf:Med Confidence: Medium Epic OKR Objective or Key Result
Projects
None yet
Development

No branches or pull requests

7 participants
@chrisdavidmills @Elchi3 @wbamberg @jmswisher @a2sheppy @ExE-Boss and others