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
344 stars 64 forks source link

Allow ranged dates and versions for non-threshold support information #1018

Open ddbeck opened 4 months ago

ddbeck commented 4 months ago

This issue is blocked on adopting an earliest-possible-date indicator, as in #623.

@foolip, @rumyra, and I had a chat earlier that veered into this topic. I am trying to capture that conversation, but I invite them to correct me on any misstatements here.

Proposal

Allow an "at least this early" range indicator (e.g., ) on status block version numbers and dates, if those dates and versions are Baseline high.

For dates, (i.e., baseline_low_date and baseline_high_date) a range indicator would be taken to mean "this date but potentially earlier." That is, new or wider availability may have been more historical, but not newer.

For version numbers, a range indicator would be taken to mean "supported this version and later." That is, support in preceding versions would be unknown, not unsupported.

Example

Ranges for version numbers would allow web-features to communicate the distinction between caniuse's red, green, and gray boxes. Take this, for example:

Screenshot 2024-04-30 at 18 37 30

The corresponding data would look like this:

support:
  chrome: "45"
  edge: "≤15"
  safari: "7.1"
  firefox: "25"

Presently, our schema would only be able to show unsupported for Edge versions less than 15.

Motivation

This has a few key benefits:

Though it comes at increased integration burden to consumers (though it's likely most could strip out the indicator).

@foolip and I are spending quite a lot of time picking apart features and cleaning up data in BCD, so that each version numbers reported by web-features is accurate. So far, we've been pretty meticulous, so that a consumer could take version numbers for a feature's support block and report that the feature was supported from those versions continuously to the present and that preceding versions were unsupporting. That's ideal, especially for recent features where it's important for developers to have accuracy through the whole life of the feature.

For older features, however, there's less value in knowing precisely which version marked the beginning of support for a feature while the cost of finding that precise version increases substantially. Whether a feature originally shipped in one of the core browsers in 2017 or 2016 is probably not a make-or-break event for using that feature, as long as we're reasonably certain it's no later than a given date or version number.

foolip commented 4 months ago

I'm very keen on this approach to handling older features. A few things I'd like to see here:

For simplicity, I think we should start with a simple cutoff point for where ≤ is allowed. I would propose that it's OK for any release before 2016, so that there's no uncertainty about the Baseline 2016 (or later) feature set. That would mean:

If we find that this is too far back in time and that reviewing is still too slow, we could move the cutoff point to 2020, at least temporarily.

foolip commented 3 months ago

While preparing https://github.com/web-platform-dx/web-features/pull/1206 I tried a few different things, and there are tradeoffs that I'm undecided about.

I am now leaning towards a more restricted use of ranges than I have prototyped:

This ends up not addressing https://github.com/web-platform-dx/web-features/issues/623 at all, which I think is good, because that's a different issue, not caused by uncertainty about Chrome/Firefox/Safari, but really about whether a feature was supported in IE.

foolip commented 3 months ago

I've sent https://github.com/web-platform-dx/web-features/pull/1208 implementing that.