Skip to content
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

Single event entries for TextTrack APIs #13887

Merged
merged 7 commits into from
Feb 11, 2022
Merged

Conversation

Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Dec 6, 2021

@Elchi3 Elchi3 added the needs content update 📝 This PR needs a corresponding update to mdn/content to update the documentation label Dec 6, 2021
@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Dec 6, 2021
Copy link
Collaborator

@foolip foolip left a comment

Choose a reason for hiding this comment

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

I did some checking of the entries where the versions don't match the parent feature. All looks good!

api/TextTrackList.json Show resolved Hide resolved
api/TextTrackList.json Show resolved Hide resolved
@Elchi3
Copy link
Member Author

Elchi3 commented Feb 1, 2022

Resolved the merge conflict (caused by #13936) and added Webview Android versions from that PR to the eventName_event entries.

"version_added": "10"
},
"opera": {
"version_added": "≤12.1"
Copy link
Collaborator

Choose a reason for hiding this comment

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

On second review I see that the "oncuechange" and "cuechange_event" data doesn't match for Opera or Safari. There's probably a lot of small differences. Can you list what they are for ease of review?

Such differences are really the only thing worth looking at when reviewing these PRs, so maybe it's worth writing a script to list the differences and generate a boilerplate comment for each PR?

@Elchi3
Copy link
Member Author

Elchi3 commented Feb 3, 2022

Here are the differences:

api.Texttrack.cuechange_event

"opera": {
    "version_added": "15"
},
"opera_android": {
    "version_added": "14"
},
"safari": {
    "version_added": "7"
},
"safari_ios": {
    "version_added": "7"
},
"webview_android": {
    "version_added": "≤37"
}

api.Texttrack.oncuechange

"opera": {
    "version_added": "≤12.1"
},
"opera_android": {
    "version_added": "≤12.1"
},
"safari": {
    "version_added": "6"
},
"safari_ios": {
    "version_added": "8"
},
"webview_android": {
    "version_added": "4.4"
}

api.TextTrackList.removetrack_event

  "opera": {
    "version_added": "20"
  },
  "opera_android": {
    "version_added": "20"
  },

api.TextTrackList.onremovetrack

  "opera": [
    {
      "version_added": "20"
    },
    {
      "version_added": "≤12.1",
      "version_removed": "15"
    }
  ],
  "opera_android": [
    {
      "version_added": "20"
    },
    {
      "version_added": "≤12.1",
      "version_removed": "14"
    }
  ],

@Elchi3
Copy link
Member Author

Elchi3 commented Feb 3, 2022

My assumption is that the onremovetrack and the oncuechange entries are more correct because these were updated by the collector.

@foolip
Copy link
Collaborator

foolip commented Feb 3, 2022

Yes, I'd take the onremovetrack data for Opera.

For "cuechange_event", I think this would be a good guess that's fairly consistent with the other data:

"opera": {
    "version_added": "≤12.1"
},
"opera_android": {
    "version_added": "≤12.1"
},
"safari": {
    "version_added": "6"
},
"safari_ios": {
    "version_added": "7"
},
"webview_android": {
    "version_added": "4.4"
}

@Elchi3
Copy link
Member Author

Elchi3 commented Feb 3, 2022

Another thing here is api.GlobalEventHandlers.oncuechange.

My guess would be to remove this data as it is captured in api.TextTrack.cuechange_event and api.HTMLTrackElement.cuechange_event.

Not sure where to redirect https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oncuechange to. Either to https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/cuechange_event or to https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/cuechange_event

@Elchi3
Copy link
Member Author

Elchi3 commented Feb 3, 2022

Not sure where to redirect https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oncuechange to. Either to https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/cuechange_event or to https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/cuechange_event

I redirected to TextTrack. Appreciate a look at the content change, too: mdn/content#12684

Will remove api.GlobalEventHandlers.oncuechange here then, too.

@foolip
Copy link
Collaborator

foolip commented Feb 4, 2022

I made the mistake of checking if the two remaining "cuechange_event" entries on TextTrack and HTMLTrackElement now seem to make sense together. Of course there are issues.

A trivial issue is that a link to https://html.spec.whatwg.org/multipage/webappapis.html#handler-oncuechange is missing.

https://trac.webkit.org/changeset/100064/webkit introduced the two events in WebKit, so the versions for Safari should match, but they don't. The data for TextTrack is largely Safari/iOS 6/7, but for HTMLTrackElement it's 6/6 or 7/7. Which is correct?

I doubt the data for Opera is correct, and would suggest setting it to "12" like most of HTMLTrackElement.

There are also differences in the IE and Edge data that I haven't researched, but I wouldn't be surprised if it's wrong.

Also, should we capture that the oncuechange attribute for HTMLTrackElement was added much later than the event itself was supported? That happened in https://trac.webkit.org/changeset/204729/webkit.

@Elchi3
Copy link
Member Author

Elchi3 commented Feb 4, 2022

Thanks for your detailed view. Unfortunately I don't know all the answers.

A trivial issue is that a link to https://html.spec.whatwg.org/multipage/webappapis.html#handler-oncuechange is missing.

Done.

I doubt the data for Opera is correct, and would suggest setting it to "12" like most of HTMLTrackElement.

Done.

Also, should we capture that the oncuechange attribute for HTMLTrackElement was added much later than the event itself was supported? That happened in https://trac.webkit.org/changeset/204729/webkit.

I've added a range to show partial support. The wording is per our guideline: https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines.md#dom-events-eventname_event

For the issues with IE support and Safari versions, I don't know how to resolve the issues you found. You could file it as a new issue and we land this to continue refactoring other event data?

{
"version_added": "6",
"partial_implementation": true,
"notes": "The <code>oncuechange</code> event handler property is not supported."
Copy link
Collaborator

Choose a reason for hiding this comment

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

We'll need a note like this for Chrome and friends too. Using http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=10032 I found that it was added in Chrome 32.

@Elchi3 Elchi3 removed the needs content update 📝 This PR needs a corresponding update to mdn/content to update the documentation label Feb 7, 2022
@Elchi3
Copy link
Member Author

Elchi3 commented Feb 7, 2022

If this is approved, it can be merged. The content work got merged in mdn/content#12688 and mdn/content#12684

@Elchi3 Elchi3 requested a review from foolip February 10, 2022 10:40
Copy link
Collaborator

@foolip foolip left a comment

Choose a reason for hiding this comment

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

There's still a mix of Safari/iOS versions that must be wrong, with 6/6 in some places and 6/7 in others. But that problem exists outside of the updated data, so let's leave that for another day.

api/HTMLTrackElement.json Show resolved Hide resolved
api/TextTrack.json Outdated Show resolved Hide resolved
@Elchi3 Elchi3 merged commit 92a0ced into mdn:main Feb 11, 2022
@Elchi3 Elchi3 deleted the events-texttrack branch February 11, 2022 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants