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

Add WebHID feature #183

Merged
merged 1 commit into from
May 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions feature-group-definitions/webhid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
spec: https://wicg.github.io/webhid/
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be nice to have a TODO comment or an issue noting that this is a… conflicted specification. That is, Apple and Mozilla are explicitly not prototyping/implementing the spec. That's an interesting bucket that I imagine we'll get to eventually and it'd be nice to have a way to come back to it when we're ready to add it to the schema.

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 think the best way to capture that would be a standards_positions field that can link to issues in https://github.com/mozilla/standards-positions or https://github.com/WebKit/standards-positions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Tracked in #186

caniuse: webhid
usage_stats: https://chromestatus.com/metrics/feature/timeline/popularity/2865
status:
is_baseline: false
support:
chrome: "89"
edge: "89"
compat_features:
- api.HID
- api.HID.connect_event
- api.HID.disconnect_event
- api.HID.getDevices
- api.HID.requestDevice
- api.HIDConnectionEvent
- api.HIDConnectionEvent.HIDConnectionEvent
- api.HIDConnectionEvent.device
- api.HIDDevice
- api.HIDDevice.close
- api.HIDDevice.collections
# - api.HIDDevice.forget
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm guessing you omitted this one because it landed several versions later. What do you think of including it anyway, and advancing the Chrome and Edge version numbers? This would make the group more complete to the contemporary API without strongly altering the compatibility story.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a good question. Should we be more liberal about updating groups for features that are "new"? I'm inclined to say no actually, and think we should handle this situation the same as we would given a new feature that ships in all browsers around the same time, and then gets some small later. I think the feature as a whole should still use the older launch date.

What do about api.HIDDevice.forget then? I don't know. We have this question sprinkled all over our YAML files now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

we should handle this situation the same as we would given a new feature that ships in all browsers around the same time

OK, that's a fair point. I think the overriding thing ought to be developer expectations: if we get information that forget is part of the popular understanding of WebHID—even if it arrived later—then it should be part of the main group. But absent that information, it does seem wise to treat it like anything else.

And I'd be probably be less reluctant to split things, if we had already worked out group composition (e.g., "WebHID (kitchen sink)" = "WebHID" + "forget"). So let's keep this as is, then sort out composition so we don't have to have these conversations as often. 😄

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 agree that developer expectations trumps all.

- api.HIDDevice.inputreport_event
- api.HIDDevice.open
- api.HIDDevice.opened
- api.HIDDevice.productId
- api.HIDDevice.productName
- api.HIDDevice.receiveFeatureReport
- api.HIDDevice.sendFeatureReport
- api.HIDDevice.sendReport
- api.HIDDevice.vendorId
- api.HIDInputReportEvent
- api.HIDInputReportEvent.data
- api.HIDInputReportEvent.device
- api.HIDInputReportEvent.reportId
- api.Navigator.hid
- http.headers.Permissions-Policy.hid