mdn / browser-compat-data

This repository contains compatibility data for Web technologies as displayed on MDN
https://developer.mozilla.org
Creative Commons Zero v1.0 Universal
4.93k stars 1.98k forks source link

Proposal: BCD dashboard and query language #11189

Open foolip opened 3 years ago

foolip commented 3 years ago

Summary: one giant compat table that can be filtered with a simple query language

BCD is treasure trove of browser compatibility data, over 11k entries, but it's difficult to understand high level trends or to filter it to specific interesting subsets. The current best and most canonical way of visualizing it is the rendering on MDN pages, e.g., the big table for HTMLElement.

Being able to render all of BCD as a single giant compat table that can be sorted and filtered would enable the following use cases:

Are there more important use cases? Please comment!

Prior art:

P.S. One thing I'd consider important is that the same queries should be possible to run on the command line, maybe as part of BCD itself, so that burndown lists don't just live on a website frontend but could also be consumed by scripts, etc.

foolip commented 3 years ago

In https://github.com/foolip/browser-compat-data/pull/10 I wrote some code to take screenshots of the BCD tables on all MDN pages, and stitched them together. The result is a 720✗819060 image. I downscaled it to 10% horizontally and 0.1% vertically to produce something that looks like a minimap of BCD: image

A fun visualization IMHO. Seeing this get more green (and longer) over time would be great :)

Elchi3 commented 3 years ago

Prior art for querying / BCD API: https://github.com/Xelzs/mdn-browser-compat-api

foolip commented 3 years ago

More prior art for the query syntax: https://github.com/GoogleChromeLabs/confluence#querying-the-catalog

foolip commented 3 years ago

To give a few examples of what a query language for this could look like:

It's harder than I thought to come up with something that looks OK :)

Elchi3 commented 3 years ago

Prior art: https://github.com/browserslist/browserslist#full-list

foolip commented 3 years ago

@bkardell, @PaulKinlan and I had a chat about https://the-web-of.glitch.me/ and our conversation earlier this week. On "where to start", Paul suggests starting from questions we want to answer, or use cases, which makes a lot of sense to me.

So, for anyone on this thread, if you could post specific question you'd like to get answered, that would be great.

gsnedders commented 3 years ago

So, for anyone on this thread, if you could post specific question you'd like to get answered, that would be great.

foolip commented 3 years ago

Here are my use cases, including/restating ones in the issue description:

foolip commented 3 years ago

Features not in one browser but in two others (but including beta/preview, unlike the-web-of)

+1 to this one. @gsnedders I guess you're looking for stuff that will soon be a single-engine omission, so future releases are interesting but stuff behind flags is less so?

I might add that I would generally like the ability to inspect BCD with flag data deleted, since stuff behind flags doesn't impact web developers yet.

gsnedders commented 3 years ago

+1 to this one. @gsnedders I guess you're looking for stuff that will soon be a single-engine omission, so future releases are interesting but stuff behind flags is less so?

With/without flags is both interesting. Both tend to be indicative to some degree.