-
Now that we seem to be in agreement to unify the event pages (https://github.com/mdn/content/discussions/9098), this discussion is about how to design the new event page that talks about both the onXXX event handler and the event itself. This means we are creating a new page type. Examples for unified pages that I have created so far are: The new outline is: "Event type" is new and I thought of it like "Return value" on method pages, so I thought it deserves its own section. Maybe it should be an h3 and under Syntax (also new!), though. Typically Event pages have tables. See e.g. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volumechange_event. I'm not sure if a table is the best way to communicate the information. I think I'm keen on trying to get rid of it. However, I'm happy to hear other thoughts. So, how should we structure unified event pages? |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 7 replies
-
Thanks for starting this conversation!
There are obviously a few bits of common information that event pages should have a consistent way to represent, and that's what these tables were trying to do. The basic tables (e.g. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadstart_event) have:
Some tables, like https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volumechange_event, have extra stuff, and I'm not sure it's worth capturing that.
I'd like to understand better the rationale for this. We use tables like this in a few different page types on MDN (e.g. HTTP headers, HTML elements, CSS properties. Are we intending to deprecate them generally? I think tables are quite a good way to present this kind of very structured data, where there's not a lot of nuance for the values (I think tables tend to fall apart when the values need a lot of description, which is why they're not a good way to represent parameters). One obvious problem with them is that Markdown hates them, and they are a real pain to write in HTML. We've talked before about generating them though, which avoids this problem. But apart from that, I'd like to understand why we don't like them (I'm not a huge defender of tables, would just like to understand the reasoning). Is there a user-facing reason to deprecate them? |
Beta Was this translation helpful? Give feedback.
-
Event type sections currently have something like:
We should just use the inheritance diagram macfro. The macro doesn't say event or or interface. It just shows the relationship and provides links and does so with automation. To provide this manually I have to look it up. Further more, if an inheritance sequence is expanding by adding upstream items, no one has to remember to update event pages. (This happens sometimes. Remember the audio classes that got base classes a few years ago?) |
Beta Was this translation helpful? Give feedback.
-
A new template for event pages has been agreed on: https://developer.mozilla.org/en-US/docs/MDN/Structures/Page_types/API_event_subpage_template The backlog to update existing pages is here: mdn/browser-compat-data#14578 |
Beta Was this translation helpful? Give feedback.
A new template for event pages has been agreed on: https://developer.mozilla.org/en-US/docs/MDN/Structures/Page_types/API_event_subpage_template
The backlog to update existing pages is here: mdn/browser-compat-data#14578