Skip to content

Conversation

@ddbeck
Copy link
Collaborator

@ddbeck ddbeck commented Jul 28, 2025

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.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Jul 28, 2025
Comment on lines -5 to -10
# 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
Copy link
Collaborator Author

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.

Copy link
Contributor

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.

@ddbeck ddbeck added package:web-features schema Schema changes, proposals, and bugs minor version required This PR requires a minor version semver release (vX.Y+1.0) labels Jul 28, 2025
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 30, 2025
Comment on lines +5 to +14
# 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
Copy link
Collaborator Author

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.

Copy link
Contributor

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.

@ddbeck ddbeck marked this pull request as ready for review August 30, 2025 18:30
@ddbeck
Copy link
Collaborator Author

ddbeck commented Aug 30, 2025

I've updated this PR. Here's what's new:

  • The schema has been added. To match the description field, there is now a plain-text message field and a formatted message_html in the built package.

  • Regression notes that apply to a historic status are now forbidden. For example, if a feature regresses from high to low, then advances back to high, then the script that ingests the YAML treats that as an error. My working assumption is that such historic notes have no utility to web developers and ought to be dropped. This would result in the loss of one regression note. See my self-review for more detail and possible alternatives.

  • There are now guidelines for adding regression notes. I wrote the guidelines to emphasize impact on developers. This led to…

  • The regression notes have been revised. I tried to rewrite them to help developers make a decision about whether the regression is meaningful to their applications. This makes for much stronger notes, in my opinion.

  • The script that ingests the YAML files has been updated to handle the new fields and do the requisite conversions.

This PR now passes the tests and is ready for (real) review. I'll share this with the WebDX chat on Monday.

Comment on lines +5 to +14
# 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
Copy link
Contributor

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.

Comment on lines -5 to -10
# 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
Copy link
Contributor

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) {
Copy link
Contributor

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[];
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Copy link
Contributor

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.

@ddbeck
Copy link
Collaborator Author

ddbeck commented Sep 12, 2025

@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:

  1. Check out this branch.
  2. Run npm install and npm run build:extended. This generates data.extended.json in the root of the repository.

Copy link
Collaborator

@rviscomi rviscomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this in Timebase (along with a patch to fix the note messages) to give an idea of how this might be integrated in developer tools/resources:

image

I've left a few comments in places where things don't appear as expected

}
if (Array.isArray(data.notes)) {
for (const note of data.notes as FeatureData["notes"]) {
const { text, html } = convertMarkdown(data.description);
Copy link
Collaborator

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:

Suggested change
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.
Copy link
Collaborator

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:

safari: "9.1"
safari_ios: "9.3"

- date: 2025-08-11
category: baseline-regression
old_baseline_value: high
new_baseline_value: low
Copy link
Collaborator

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],
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature definition Creating or defining new features or groups of features. minor version required This PR requires a minor version semver release (vX.Y+1.0) package:web-features schema Schema changes, proposals, and bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants