-
Notifications
You must be signed in to change notification settings - Fork 49
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 vibrationActuator to the main spec #190
Add vibrationActuator to the main spec #190
Conversation
@nondebug, @marcoscaceres Just a few questions I had while editing:
|
Yes, let's remove it. It was never really part of the spec so it's not even officially deprecated.
Yes, let's do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Um, any idea why it's showing both files as being entirely changed? I think you might have changed the line endings or something? (i.e., this makes it not possible to review the changes)
Can you try sending it again or reach out to us if you need a hand? Are you doing this on windows machine maybe?
Yeah, @gabrielsanbrito, it seems you've accidentally changed the whitespace of the file: Can you see about changing it back? Maybe try:
|
0ed8113
to
37a26a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of nits and suggestions, but generally looking pretty solid now.
Outstanding work @gabrielsanbrito. Thank you so much for putting so much work into this.
@nondebug, do you want to give this one last look over?
File Gecko and WebKit bugs... WebKit already implements vibratorActuator, and so does Chrome. But it would be good to make sure we are all interoperable. In any case, it meets criteria for inclusion in the spec. |
@gabrielsanbrito, I merged in my suggestions and rebased. The last remaining thing is just adding the DOMHighResTimestamp suggestion. Do you want me to do that? |
Thanks for doing that, @marcoscaceres! I was looking up on how to do the DOMHighResTimestamp. I was thinking on something like this:
Then, on the issue a haptic effect, I was thinking of adding:
What do you think? Please feel free to add it directly if it is too far from ideal. |
It looks like both WebKit (https://bugs.webkit.org/show_bug.cgi?id=267523) and Gecko (https://bugzilla.mozilla.org/show_bug.cgi?id=1824217) already have bugs filed for the vibrationActuator addition. I have just added a small update comment on the Gecko one to let them know that |
@gabrielsanbrito, the proposed text for the timestamp sounds great! |
Ok, cool. I've updated the OP to link to the existing Gecko bug. Thanks also for commenting there @gabrielsanbrito. |
I wonder if we should do a little "test fest" on our next call. Would be nice to just run through the algorithms manually and check for any introp issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change LGTM, thanks for the update! And, to reiterate, I agree with the decision to leave pulse()
in the extensions doc, given the confusion around it and it's intended behavior.
I appreciate the explicit "completed"/"preempted" status of playEffect()
in this regard, and would recommend that if pulse()
is carried forward that it may be worth evaluating whether or not to transition to that model for consistency and clarity. (Since the enums will evaluate to be truthy and existing implementations have apparently only ever returned true this is maybe a reasonable backwards compat break.)
@marcoscaceres had to remove the Just removing the class made "Return |
Yeah, that's fine. And don't worry, we will eventually get rid of all the |
@gabrielsanbrito, just waiting on Matt. Spoke to him and he's hoping to do the final review soon. Expecting this to land hopefully early next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thank you all for the valuable feedback! @marcoscaceres may I merge the pull request? |
Merged 🎉 |
This change implements the latest updates in the GamepadHapticActuator API introduced in w3c/gamepad#190. Which are: - Add the `effects` array; - Emit deprecation console messages for `type` and `canPlay()`. Bug: 40834175 Change-Id: I4d77441887c3e4d4d98f65668517d98a8a0a66ab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5350942 Reviewed-by: Matt Reynolds <mattreynolds@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Gabriel Brito <gabrielbrito@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1271235}
Closes #173
The following tasks have been completed:
Implementation commitment:
Preview | Diff