Replies: 4 comments 6 replies
-
Sounds good. Just FMI (and possibly outside scope), are we allowing multiple BCD keys? The use case is overview page, where the set of specs and browser compat might be the union of multiple classes. |
Beta Was this translation helpful? Give feedback.
-
It seems to me that this allows for two mechanisms in which pages can include a spec URL:
Am I right in reading this:
...as saying that including both keys will give at least a warning? I'm not sure how to interpret "order of preference". Or to put it another way, why not just always do the most-preferred thing? In which circumstances should we choose a less-preferred option? I'm also not sure why setting multiple URLs is less preferred than setting one. If the feature is actually governed by two specifications, why isn't it preferred to set two URLs? It seems to me that we have:
|
Beta Was this translation helpful? Give feedback.
-
In the interest of having concrete cases to discuss, and in regard to the specific category of reference pages that currently have Specifications sections but that don’t have data in BCD, here’s a list of all the current pages in the
|
Beta Was this translation helpful? Give feedback.
-
I’ve come around to finding the following part of #5347 (reply in thread) pretty persuasive —
I’ve been anxious to hear what @wbamberg thinks, but the part of #5347 (reply in thread) cited above has led me to conclude that it’d seem best if we could move toward always using only the To that end, I’ve opened #5971 and #5972, which essentially will allow us to eliminate any need for passing arguments to the |
Beta Was this translation helpful? Give feedback.
-
Since we’ve added new ways of adding specifications to MDN, we ought to have an idea of where we want to end up, so we’re not adding complexity on top of complexity. I’ve written a brief outline of where I think we should go. Please comment with questions or suggestions. Once we have agreement on key points, we can start to plan in reverse to get there (even though there will be some messiness in the meantime).
Setting front matter
For pages about specified, standards-track web platform features, authors set specifications by one of these methods, in order of preference:
Setting a
browser-compat
front matter key.Authors should prefer this option, even if there’s no compatibility table on the page.
Setting a URL string for the
spec-urls
front matter key.Setting an array of two or more URLs for the
spec-urls
front matter key.Omitting the
browser-compat
orandspec-urls
keys, where inapplicable.For pages about unspecified, non-standard features, authors declare this status by one of these methods, in order of preference:
Setting a
browser-compat
front matter key.Authors should prefer this option, even if there’s no compatibility table on the page.
Setting a special MDN URL string for the
spec-urls
front matter key (e.g.,https://developer.mozilla.org/en-US/docs/non-standard
or similar).Generating tables and text
If both
spec-urls
andbrowser-compat
are set, then this should provoke an error for conflict front matter keys.(Previous paragraph replaces the text below, which has been stricken out. See discussion in this thread: #5347 (comment))
If an author uses two or more methods to set specifications (or non-standard status), then Yari should generate specification tables or text that fails useful (i.e., shows URLs from all sources or shows non-standard boilerplate text), with the following caveats:spec-urls
key have overlapping members, then this should provoke a duplicate data error.spec-urls
key don’t have overlapping members, then this should provoke a warning that BCD is potentially missing data.If there exists a conflict between the reported standards status of a feature between BCD or the set of URLs inspec-urls
, then this should provoke a conflicting data error.Authors insert specifications tables (or boilerplate non-standard text) into pages by one of these methods, in order of preference:
Specifications
macro with no arguments.Style and consistency
To ensure the ongoing consistency of BCD and MDN specification URLs and status information, the following rules should apply to allowed values of
spec-urls
:Each URL must be in w3c/browser-specs or added to an allowlist.
If a URL is added to an allowlist, it must be accompanied by an explanatory comment (for why it won’t ever be included in w3c/browser-specs) or a link to an issue or PR which will bring about its eventual removal from the list.
Moreover, the allowlist for MDN must be a superset of BCDs (i.e., MDN’s
spec-urls
validation must always succeed for BCD-sourced URLs).Each URL must be a complete and valid URL. If it contains a fragment identifier, that identifier must exist in the target URL.
Finally, BCD and MDN should have mutually compatible guidelines for choosing which part of a specification to link to.
Beta Was this translation helpful? Give feedback.
All reactions