-
Notifications
You must be signed in to change notification settings - Fork 17
Consider using recipes to represent element-specific attributes #215
Comments
At the moment, the situation is like this:
So the story is quite simple. You have recipes for files that want to be MDN pages, and the build process turns each one into a JSON file, and the renderer turns each JSON file into a page. If we want to "use recipes for HTML attributes too, but use mdn_url as a way to signify that some content is addressable (and should get a page generated) and some content is a partial component (that shouldn't get a page generated)", then how does that affect this process? We might say:
But also, recipe-generated objects can embed other recipe-generated objects. So we need some syntax allowing an ingredient (in this case the What do we get in return for this? One thing is this: at the moment the rules for how attribute files are structured are kind of secret implicit rules, buried in the But we should be clear that there will always be these kinds of ingredient-specific rules. For example, the rules about live samples are not going to be described in any recipe. Which leads to another question: what's the test for whether a thing should be recipe-driven or not? At the moment it's simple: if it wants to be an MDN page. But under this proposal that doesn't work. We need to have a clear answer for this, otherwise why can't BCD tables or live samples be specified in recipes (I really don't think they should)? I think the answer is: self-contained documentation objects for web technology items can be recipe-driven. An HTML attribute is a web technology item, and the whole collection of documentation elements for it - examples, BCD, prose - are a complete documentation object for it. BCD is only one aspect of the documentation for an item. Another very compelling argument for having recipes drive attributes is that we are proposing to do that for global attributes, and element-specific attributes are the same kind of thing. But this also makes me wonder, why do we have standalone pages on MDN for one and not for the other? That is, is this inconsistency in stumptown just a reflection of an inconsistency in MDN? Before we make any big changes though, I'd also be interested in seeing other examples of this sort of problem: that is, items which should be recipe-represented according to the rule "self-contained documentation objects for web technology items", but which are embedded in other pages rather then built as standalone pages. I can't off-hand think of any, which makes me wonder if this is an aberration. A much more common way to handle relations between different "documentation objects" is just by linking between standalone pages. For example, consider a recipe-driven page for a JS object like |
From the writers' guide PR:
@Elchi3 :
@ddbeck :
The text was updated successfully, but these errors were encountered: