web-platform-dx / web-features

Exploring how to present Web platform features adoptability
https://web-platform-dx.github.io/web-features/
Apache License 2.0
365 stars 72 forks source link

Browser versions for a group of features #1248

Open captainbrosset opened 4 months ago

captainbrosset commented 4 months ago

On the Microsoft Edge's TopDevNeeds dashboard we make use of web-features only for some of the features that are listed. For the rest, there are two cases:

  1. Either the feature isn't yet covered in web-features (which I'm trying to fix, slowly, over time).
  2. Or the feature we display is for multiple entries in web-features at the same time.

An example for (2) is scrollbar styling, which is actually about scrollbar-gutter, scrollbar-color, and scrollbar-width. We feel it's better to display them as a group of related features than individual entries on our dashboard.

Because of this, so far, I've manually maintained the data on the dashboard.

I'm opening this issue to discuss being able to get aggregated browser compat data from web-features for multiple features at once. On the dashboard, we don't display Baseline status, so I'm not concerned about this. But we do display supported browser versions. So, ideally, I'd have a way to get the minimum versions of browsers that are needed to get support for the group of features.

I can compute this myself. But perhaps this is something web-features ought to offer out of the box? Maybe via groups.

ddbeck commented 4 months ago

A prerequisite for this is probably publishing groups themselves:

It wouldn't be hard to compute a status for a group, though I'd expect the status of many of the groups to be sorta uninteresting (e.g., imagine a feature group "JavaScript" in your dashboard). But I'm not opposed to trying it out (or adding an option to compute-baseline's getStatus() to make this possible).

captainbrosset commented 3 months ago
  1. Either the feature isn't yet covered in web-features (which I'm trying to fix, slowly, over time).

I've fixed this, our TopDevNeeds dashboard no longer lists features that aren't covered in web-features.

  1. Or the feature we display is for multiple entries in web-features at the same time.

This is still the case, for a few of them. When this happens, I get the individual features from web-features, and compute the overall browser support data by merging each feature's browser support data. I don't use the baseline status, only the browser support data.

I just realized that I could replace my own merging code with computeBaseline() instead. I could get all of the BCD keys from each feature, put them all into an array, and then call computeBaseline() on this array.

Would that work @ddbeck? If so, I think we can close this issue.

Or we keep it open to experiment with making getStatus() able to generate statuses for groups.