browser-compat-data icon indicating copy to clipboard operation
browser-compat-data copied to clipboard

Mirroring adds partial_implementation when version_added is false

Open Elchi3 opened this issue 2 years ago • 1 comments

What type of issue is this?

Script issue

What is the issue?

BCD exports this:

"hr_in_select": {
          "__compat": {
            "description": "<code>&lt;hr&gt;</code> in <code>&lt;select&gt;</code>",
            "source_file": "html/elements/hr.json",
            "support": {
              "samsunginternet_android": {
                "notes": "Exposes the <code>&lt;hr&gt;</code> as its own empty selectable option and not as a horizontal rule.",
                "partial_implementation": true,
                "version_added": false
              },
            }
          }
        },

What behavior were you expecting?

I would have expected:

"hr_in_select": {
          "__compat": {
            "description": "<code>&lt;hr&gt;</code> in <code>&lt;select&gt;</code>",
            "source_file": "html/elements/hr.json",
            "support": {
              "samsunginternet_android": {
                "version_added": false
              },
            }
          }
        },

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

  • [X] The current BCD release
  • [X] The current version of the main branch

Do you have anything more you want to share?

I think the schema/linter excludes partial_implementation and version_added at the same time? Are such checks also done against the built data?

Issue found by @dletorey. Thank you!

Elchi3 avatar Dec 20 '23 11:12 Elchi3

I stumbled upon this issue and gathered some context (in this tree at 61b72137de4c91659a637a67553502e7a826d636):

The html.elements.hr.hr_in_select feature had this:

https://github.com/mdn/browser-compat-data/blob/61b72137de4c91659a637a67553502e7a826d636/html/elements/hr.json#L129-L133

https://github.com/mdn/browser-compat-data/blob/61b72137de4c91659a637a67553502e7a826d636/html/elements/hr.json#L155

The browsers data had this:

https://github.com/mdn/browser-compat-data/blob/61b72137de4c91659a637a67553502e7a826d636/browsers/chrome_android.json#L665-L671

https://github.com/mdn/browser-compat-data/blob/61b72137de4c91659a637a67553502e7a826d636/browsers/samsunginternet_android.json#L274-L279

The resulting data.json in the v5.5.1 release then indeed had this:

"hr_in_select": {
          "__compat": {
            "description": "<code>&lt;hr&gt;</code> in <code>&lt;select&gt;</code>",
            "source_file": "html/elements/hr.json",
            "status": {
              "deprecated": false,
              "experimental": false,
              "standard_track": true
            },
            "support": {
              // ...
              "chrome_android": {
                "notes": "Exposes the <code>&lt;hr&gt;</code> as its own empty selectable option and not as a horizontal rule.",
                "partial_implementation": true,
                "version_added": "119"
              },
              // ...
              "samsunginternet_android": {
                "notes": "Exposes the <code>&lt;hr&gt;</code> as its own empty selectable option and not as a horizontal rule.",
                "partial_implementation": true,
                "version_added": false
              },
              // ...
            }
          }

caugner avatar Oct 07 '24 19:10 caugner