-
Notifications
You must be signed in to change notification settings - Fork 203
Add Baseline regression notes #3187
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
base: main
Are you sure you want to change the base?
Conversation
| # TODO: https://github.com/web-platform-dx/web-features/issues/1971 | ||
| # Status changed: https://github.com/web-platform-dx/web-features/pull/2358, https://github.com/web-platform-dx/web-features/pull/2491 | ||
| # 2024-12-19 — low → false — Regressed status to match Caniuse, which considers support beginning at BYOB shipping. | ||
| # 2025-01-30 — false → high — Split BYOB into a separate "readable-byte-streams" feature. Linked that one to Caniuse. | ||
| # References: | ||
| # - https://caniuse.com/streams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fussed over this for a while and ended up deciding to omit the note entirely. The first note would say that the feature regressed, the second note would be some new category (advance? unregression?) showing that we more or less reverted the second note. It seemed to me that the correct course of action in that scenario would be to withdraw the note, so that's what I've done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to agree. If our consumers really only care about baseline regressions, then we don't need a note here. Unless we have reasons to believe that the history of a feature would be useful. Which I don't think we do.
| # notes: | ||
| # - date: 2024-09-18 | ||
| # category: baseline-regression | ||
| # old_baseline_value: low | ||
| # new_baseline_value: false | ||
| # message: > | ||
| # Safari on iOS has a bug that prevents light dismiss (tapping outside the element to close it). | ||
| # citations: | ||
| # - https://bugs.webkit.org/show_bug.cgi?id=267688 | ||
| # - https://github.com/mdn/browser-compat-data/issues/22927 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I opened this PR, I had written this note. However, the feature has since progressed. It occurred to me that we should not show irrelevant notes, so I commented it out. This is a rather new idea, so I'd like to delete this entirely, if we decide this is the right way to go.
Other options considered: some sort of "historic" flag on notes that are no longer relevant, or filtering historic notes from the published package. I figured both of those added complexity that wouldn't be very useful to anyone, least of all developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I almost feel like we should have a linting step in place which checks that notes.new_baseline_value is equal to status.baseline, and if not, deletes that particular note. I think keeping old notes about status regressions that no longer apply would be confusing. I don't think that web-features necessarily needs to keep track of the history of a feature. Its role is to document the platform as it is now.
|
I've updated this PR. Here's what's new:
This PR now passes the tests and is ready for (real) review. I'll share this with the WebDX chat on Monday. |
| # notes: | ||
| # - date: 2024-09-18 | ||
| # category: baseline-regression | ||
| # old_baseline_value: low | ||
| # new_baseline_value: false | ||
| # message: > | ||
| # Safari on iOS has a bug that prevents light dismiss (tapping outside the element to close it). | ||
| # citations: | ||
| # - https://bugs.webkit.org/show_bug.cgi?id=267688 | ||
| # - https://github.com/mdn/browser-compat-data/issues/22927 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I almost feel like we should have a linting step in place which checks that notes.new_baseline_value is equal to status.baseline, and if not, deletes that particular note. I think keeping old notes about status regressions that no longer apply would be confusing. I don't think that web-features necessarily needs to keep track of the history of a feature. Its role is to document the platform as it is now.
| # TODO: https://github.com/web-platform-dx/web-features/issues/1971 | ||
| # Status changed: https://github.com/web-platform-dx/web-features/pull/2358, https://github.com/web-platform-dx/web-features/pull/2491 | ||
| # 2024-12-19 — low → false — Regressed status to match Caniuse, which considers support beginning at BYOB shipping. | ||
| # 2025-01-30 — false → high — Split BYOB into a separate "readable-byte-streams" feature. Linked that one to Caniuse. | ||
| # References: | ||
| # - https://caniuse.com/streams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to agree. If our consumers really only care about baseline regressions, then we don't need a note here. Unless we have reasons to believe that the history of a feature would be useful. Which I don't think we do.
| // Ensure regression notes are still relevant | ||
| if (Array.isArray(data.notes)) { | ||
| for (const [index, note] of (data.notes as FeatureData["notes"]).entries()) { | ||
| if (note.new_baseline_value !== data.status.baseline) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool! I see you've actually already done what I suggested in an earlier comment.
types.ts
Outdated
| /** Whether developers are formally discouraged from using this feature */ | ||
| discouraged?: Discouraged; | ||
| /** Notes about this feature */ | ||
| notes?: BaselineRegressionNote[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this to be an array? I don't think we do, but I can see the point that not making it an array might, some day, block us, and require a major release to change it then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, @captainbrosset!
I think it's very likely that we'll have other note types and notes may need to coexist. My inclination was to introduce one note type, then add more. But I recognize it looks a little odd now because there really ought to be just one note at a time under the constraints presented here. But there's some likely follow up note types:
First, consider the mirror of a regression: a case where we've prevented a feature from advancing (think of it as "baseline-delay" categeory or something). There are two open cases of this right now, see #3228. It's possible (though rare) that a feature could have regressed and be prevented from advancing.
Second, there are cases where we might choose to not regress a feature, like #2957 (though it's still my preference to let it regress). It seems to me it might be wise for us to (publicly) acknowledge the bug, even if we do not believe it enough to regress the feature (something like "known-incompatibility", though ). That said, this type of note would be more tenuous (we might consider attaching notes to supported version number, for instance).
I imagine there are still further note types (e.g., something like solicitations for input on potentially deprecating or removing a feature, for instance, as in the case of XSLT), but I haven't given them a ton of thought yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. The notes property is broad enough that we might indeed use it for other things. Based on this, I'm fine on making this an array. However, if we do add other types of notes in the future, that will still be a breaking change, right? Cause the schema will change. That might be fine by the way.
|
@rviscomi would you be interested in re-reviewing this, now that there's a proper schema and such for it? I'm especially curious to know if this is something you'd be interested in building something against soon or not. If you want to try playing with the data, then these steps ought to work:
|
rviscomi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
| if (Array.isArray(data.notes)) { | ||
| for (const note of data.notes as FeatureData["notes"]) { | ||
| const { text, html } = convertMarkdown(data.description); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to copy the feature description into the note message. I think it should be something like this:
| const { text, html } = convertMarkdown(data.description); | |
| const { text, html } = convertMarkdown(note.message); |
| old_baseline_value: low | ||
| new_baseline_value: false | ||
| message: > | ||
| Chrome, Edge, and Safari do not implement font synthesis for missing superscript or subscript glyphs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message is partially contradicted by the support data for Safari:
web-features/features/font-variant-position.yml.dist
Lines 9 to 10 in 7fb07e2
| safari: "9.1" | |
| safari_ios: "9.3" |
| - date: 2025-08-11 | ||
| category: baseline-regression | ||
| old_baseline_value: high | ||
| new_baseline_value: low |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the baseline_low_date be 2025-08-11 accordingly?
| baseline_low_date: 2023-12-11 |
| }, | ||
| "new_baseline_value": { | ||
| "description": "The `baseline` status value after the regression", | ||
| "enum": ["low", false], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How much value do we get in practice from letting the types exclude one of the possible Baseline statuses for old and new? Can we just use the generic definition and thus sidestep the stuff that quicktype is generating funny types for?

This is a work in progress toward fixing #1971.
This structures the existing Baseline regression comments as notes. I'm looking for early feedback on whether this structure for notes would be useful.