Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OWD project: Up-to-date & machine readable specification links on MDN and in BCD #24

Closed
3 of 5 tasks
Elchi3 opened this issue Mar 2, 2021 · 8 comments
Closed
3 of 5 tasks

Comments

@Elchi3
Copy link
Member

Elchi3 commented Mar 2, 2021

This is a write up of a project around specification links that @sideshowbarker and I started to work on and that I'd like to introduce here some more, so that it becomes more transparent why we should do some work on this and what work is involved exactly.

Problem statement

  • The specification sections on MDN oftentimes present links to outdated or irrelevant specs. Browser engineers are unhappy to see links non-current specs and web developers get the wrong information about what is the latest standard. Some old specs are redirected by the W3C already, other links just continue to point to dated material or are 404.
  • The spec links aren't machine readable like the compat data is. Various tools need a mapping between: mdn url, spec url and compat data.
  • The MDN spec sections are inconsistent. If they were rendered from data, like the compat table, we could change the design of this section from a central place and iterate more on it.
  • Currently, to add a spec to MDN, one has to add to the specdata kumascript macro in yari to first register a spec. Then it is possible to call a spec macro to display a link. This process is unnecessarily complicated and costs time.

Priority assessment

This table checks this project against the OWD prioritization criteria.

Criteria Assessment
Effort Large as this affects all MDN reference pages. However, thanks to the scraping work that Mike has done, we were able to quickly get spec_urls in for javascript and HTML pages already.
Dependencies BCD and MDN are both involved. In order to render the spec section from a template like the yari compat table, we need yari engineering time. Collecting the spec_urls into BCD doesn't have a dependency, though.
Community enablement Anyone can submit and review spec_urls to BCD features. Is shareable. Some knowledge about what makes a spec a current spec required.
Momentum I think the momentum comes from being able to use this data in a machine-readable form in some spec tooling. No direct web developer momentum, I think.
Enabling learners N / A
Enabling professionals Professionals appreciate a precise spec section on MDN
Underrepresented topics / ethical web N/A
Operational necessities N / A
Addressing needs of the Web industry N / A

Proposed solutions

Task list

  • Define spec_url for BCD and agree on what sorts of specs qualify as correct and current.
  • Populate spec_url for all BCD features (upstream from https://github.com/w3c/browser-compat-data but review data from there)
  • Source the Specification section from BCD data
  • Remove the specdata macro implementation
  • (possibly more here)
@Elchi3
Copy link
Member Author

Elchi3 commented May 6, 2021

Status update!

@teoli2003
Copy link
Member

@Elchi3 As it is a prerequesite for this issue, should I submit PRs for bringing BCD in front-matter all over the place? I have a Python script that does most of the work automatically; I only need to deal with special cases manually.

@Elchi3
Copy link
Member Author

Elchi3 commented May 31, 2021

Yes, thanks for your work. BCD Front-matter is good for a variety of use cases.
In a next step, the specification section can then make use of it (via the new {{Specifications}} macro that is analog to {{Compat}})

@teoli2003
Copy link
Member

Absolutely! We can script this change (spec table -> spec macro) too but two points must be checked:

  1. If there are pages with a specification table but no BCD info, we need to check them and either add the corresponding entries in mdn/browser-compat-table or, if not relevant, to keep the table (or use a kind of {{Specifications("x.y.z")}} like with {{Compat}}). We can list these pages with a script and start handling them right away, I think.

  2. If there are comments after the specification table, should we just keep them there or evaluate them on a case by case basis?

@Elchi3
Copy link
Member Author

Elchi3 commented Jul 9, 2021

90% is done, the rest is blocked by other work. I'm not sure how much we want to rabbit whole into the remaining work in Q3.

Spec sections powered by BCD spec_urls are implemented for all major content areas on MDN.

  • CSS
  • HTML
  • JavaScript
  • HTTP
  • APIs
  • WebDriver
  • MathML
  • SVG (element pages)

The old spec tables still appear on:

@teoli2003
Copy link
Member

Except for the "few random pages", I don't think we should invest in this in Q3, other than trying to move forward the discussions.

@Elchi3
Copy link
Member Author

Elchi3 commented Jul 14, 2021

No disagreement in today's SC call to close this as done. 🎉
Follow-up projects can always be nominated and we will move open discussions forward as needed.

@Elchi3 Elchi3 closed this as completed Jul 14, 2021
@teoli2003
Copy link
Member

\o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants