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.99k stars 2.01k forks source link

meta: Remove references to "version_added": true or null from compat data schema documentation #24257

Closed danielhjacobs closed 2 months ago

danielhjacobs commented 2 months ago

What type of issue is this?

Schema issue

What is the issue?

https://github.com/mdn/browser-compat-data/blob/main/schemas/compat-data-schema.md#the-__compat-object, https://github.com/mdn/browser-compat-data/blob/main/schemas/compat-data-schema.md#version_added, and https://github.com/mdn/browser-compat-data/blob/main/schemas/compat-data-schema.md#flags make references to "version_added": null and/or "version_added": true.

Looking at https://github.com/search?q=repo%3Amdn%2Fbrowser-compat-data+%22%5C%22version_added%5C%22%3A+null%22&type=code, explicit mention of "version_added": null has already been fully removed from the BCD, only being referenced in that documentation and in a test that checks it to be the default when compatibility data is not provided.

Looking at https://github.com/search?q=repo%3Amdn%2Fbrowser-compat-data+%22%5C%22version_added%5C%22%3A+true%22&type=code, "version_added": true is only being used in 12 remaining files (outside the documentation page), and there has recently been a concerted effort to remove the remaining instances.

It's also worth noting this is the only remaining document that mentions "version_removed": true: https://github.com/search?q=repo%3Amdn%2Fbrowser-compat-data+%22%5C%22version_removed%5C%22%3A+true%22&type=code

What behavior were you expecting?

The schema documentation shouldn't reference a deprecated way of indicating browser support. There's an argument to be made for not removing this until those other 12 files are updated, but I think it's a poor argument, as the documentation says it's only noting the "common possible support statements", and this support statement is no longer common.

What version(s) of BCD is the issue present in?

Do you have anything more you want to share?

No response

danielhjacobs commented 2 months ago

For reference, 12 files are left that still use "version_added": true:

1) https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/commands.json - Chrome data, fixed by https://github.com/mdn/browser-compat-data/pull/24263 2) https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/cookies.json - Chrome data, fixed by https://github.com/mdn/browser-compat-data/pull/24268 3) https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/privacy.json - Chrome data, not fixed 4) https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/management.json - Chrome data, fixed by https://github.com/mdn/browser-compat-data/pull/24278 5) https://github.com/mdn/browser-compat-data/blob/main/webextensions/manifest/dictionaries.json - Firefox data, not fixed 6) https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/storage.json - Firefox for Android data for sync not fixed 7) https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/devtools.json - Chrome data, fixed by https://github.com/mdn/browser-compat-data/pull/24270 8) https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/webRequest.json - Firefox data, fixed by https://github.com/mdn/browser-compat-data/pull/24281 9) https://github.com/mdn/browser-compat-data/blob/main/webextensions/manifest/background.json - Chrome data, not fixed 10) https://github.com/mdn/browser-compat-data/blob/main/webextensions/manifest/optional_permissions.json - Chrome data fixed by https://github.com/mdn/browser-compat-data/pull/24093 11) https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/menus.json - Chrome data, fixed by https://github.com/mdn/browser-compat-data/pull/24277 12) https://github.com/mdn/browser-compat-data/blob/main/webextensions/manifest/commands.json - Chrome and Firefox data, not fixed

danielhjacobs commented 2 months ago

1) https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/commands.json

queengooborg commented 2 months ago

This is already covered in #24174, which will be merged once the remaining usage of nonreal values is finally removed.

As far as removing the mention of these values from the docs before they're fully removed from BCD, I do not think that updating the docs early is a good idea. While I'm all for finally getting rid of nonreal values (I'm leading the project after all!), they are still valid values, so we should document them and describe them while they're still present. Additionally, we're so close to getting rid of them all, so there's no need to remove the documentation early!

danielhjacobs commented 2 months ago

Ok, for what it's worth if it helps the effort:

  1. https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/commands.json
  2. https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/cookies.json
  3. https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/privacy.json
danielhjacobs commented 2 months ago

Continued:

  1. https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/management.json
  2. https://github.com/mdn/browser-compat-data/blob/main/webextensions/manifest/dictionaries.json
    • Skipping for now, Firefox data needs to be found in the Gecko source code.
  3. https://github.com/mdn/browser-compat-data/blob/main/webextensions/api/storage.json - https://github.com/mdn/browser-compat-data/pull/24084 is already open for the Chromium data, Firefox for Android data for sync needs to be found.