Replies: 4 comments 18 replies
-
Good summary. IMO the current approach does not work, or we would not still be talking about this. I think the information should be in front page metadata, required for the event page type, and rendered either via a macro (or even better, fully automatically). The actual rendering can be a separate discussion, but if we're doing it automatically we can do it using a much more compact form than the old way. |
Beta Was this translation helpful? Give feedback.
-
Yeah, looks like people are looking for more discernible mechanism e.g badge or a table to get the info. Nobody ain't got no time to go through the prose to get to the info.
Having it in front-matter would be more nit. We can't have front-matter as well as macro at the same time. With front-matter yari need to render it automatically. I think this should go in the proposed and upcoming header badge row. Either way whether front-matter or macros, yari will be involved and so this will take time to happen. Also front-matter makes it easy to search in repo for the info. Current prose are not worded exactly the same and there are variations, so it is not possible to scan the repo for all the events that are not cancelable or bubbly. Can we have, for now, uniform status banners at the top?
With quick search for the prose following are number of non bubbly and canclelable events:
I think getting the info from webref will hit the same snag that we did for secure context info. In short, the specs don't meticulously documents the statuses in same machine readable manor and webref fails to acquire such stats.
When the cancelable PR lands it'll face the same issue. The webref is not a complete source of truth and for now we'll have to manually update front-matter. Or we could re-purpose mdn/data or create a new repo to track such statuses e.g. secure context, bubbles, cancelable, and other status that we were looking for in the past I don't remember now. For About |
Beta Was this translation helpful? Give feedback.
-
This discussion was discussed synchronously during the #writing-docs meeting held on April 16, 2024. Here are the (slightly edited for clarity) minutes from that portion of the meeting:
SOLUTION:
CONCLUSION: we do need something. Research is needed to know exactly what readers need. Webref is not the complete source of truth. Dominique from webref is suggesting to use their patch mechanism to handle missed cases. |
Beta Was this translation helpful? Give feedback.
-
So, it looks like we can obtain all the data needed automatically. The main question is how we want to display this information to the user. There are several ways:
We should try the 3rd option, but maybe there are others. Does anybody think of anything else? |
Beta Was this translation helpful? Give feedback.
-
When events were refactored in openwebdocs/project#61, the tables that list various properties of events (bubbles and cancelable) were dropped. Since then multiple issues have been raised on MDN asking to restore them. So this discussion is intended to be a place where we can reconsider this decision.
Event properties in the old pages
Before openwebdocs/project#61, the pages for events included tables listing some of their properties: whether the event bubbles, is cancelable, and the interface passed to event handlers:
See the page in archive.org at: https://web.archive.org/web/20210225074714/https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event.
Current practice
When events were refactored in openwebdocs/project#61, these tables were removed.
Current practice is not documented in the template, but it seems de facto practice is that only if the event does not bubble or is not cancelable, to write that in prose (mdn/content#22198 (comment)). If the event bubbles or is cancelable, the fact is omitted, since that's the more common case.
The history of this and the reasoning are given in mdn/content#31137 (comment).
Issues
Since then several issues have been raised asking for this information to be reinstated, including at least:
mdn/content#31137 (comment) also has some relevant discussion.
I think there are a couple of separable issues: content and presentation.
Content
It's confusing to omit bubbles/cancels in the common case:
Presentation
Some people have said that the old table is more scannable than having the information in prose. Against this is the contention in mdn/content#31137 (comment) that it takes up a lot of space and pushes more important information below the fold. Against that though, the "Syntax" is arguably not very useful in these pages, and it is almost always pure cookie-cutter content.
Beta Was this translation helpful? Give feedback.
All reactions