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

Convert to purely screen wake lock #255

Merged
merged 8 commits into from
Mar 25, 2020

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Mar 11, 2020

Closes #254
Closes #253
Closes #232

BREAKING CHANGES:

  • powerful feature name becomes "screen-wake-lock"
  • Feature policy becomes "screen-wake-lock".
  • Dropped WakeLockPermissionDescriptor, just use "screen-wake-lock".

The following tasks have been completed:

  • Modified Web platform tests (link to pull request)

Implementation commitment:


Preview | Diff

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@marcoscaceres marcoscaceres changed the title BREAKING CHANGE: Convert to purely screen wake lock Convert to purely screen wake lock Mar 16, 2020
@marcoscaceres
Copy link
Member Author

Breaking changers remain:

  • powerful feature name becomes "screen-wake-lock"
  • Feature policy becomes "screen-wake-lock".
  • Dropped WakeLockPermissionDescriptor, just use "screen-wake-lock".

@reillyeon, I guess I could revert those too? The WakeLockPermissionDescriptor felt like a bit of overkill, but I guess it does provide some extensibility.

Copy link
Member

@anssiko anssiko left a comment

Choose a reason for hiding this comment

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

Much thanks!

LGTM overall, punting the review of the remaining breaking changes https://github.com/w3c/wake-lock/pull/255#issuecomment-599514748 to @reillyeon.

Copy link
Member

@reillyeon reillyeon left a comment

Choose a reason for hiding this comment

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

This looks good except for a couple places where we should still be using WakeLockType.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@marcoscaceres
Copy link
Member Author

Thanks @reillyeon for chatting all those. Need a day before I jump back into this.

@marcoscaceres
Copy link
Member Author

Ok, sorry for taking a little longer than expected. Hope you are all healthy and well.

How should we handle the testing?

@Honry
Copy link
Contributor

Honry commented Mar 25, 2020

How should we handle the testing?

I'd suggest to separate tests into corresponding directories, as WPT's test directories are typically named after the shortname of the spec. And we may reuse some common JS from screen wake lock for system wake lock.

@marcoscaceres
Copy link
Member Author

Thanks @Honry! I guess we need to then split up:
https://github.com/web-platform-tests/wpt/tree/master/wake-lock

@Honry will you be our testing lead for this? It would be great to start matching tests to spec text.

@anssiko, @reillyeon, should we request a new shortname for the spec?

@marcoscaceres
Copy link
Member Author

@Honry, lol, sorry, I see you are already listed as our QA lead! 🙌🎉🎊 Can't ask for a better QA lead on this!

ReSpec supports data-tests as a way of linking tests to spec text. And we also support checking if tests exist in WPT:
https://github.com/w3c/respec/wiki/wpt-tests-exist

@Honry
Copy link
Contributor

Honry commented Mar 25, 2020

@Honry will you be our testing lead for this? It would be great to start matching tests to spec text.

@marcoscaceres, sure! :)

@Honry
Copy link
Contributor

Honry commented Mar 25, 2020

Actually the original test links were added by myself. I will update them once tests relocated.

@marcoscaceres
Copy link
Member Author

Ok cool! Let's merge this, and do the test linking independently.

@marcoscaceres marcoscaceres merged commit 59d8d39 into w3c:gh-pages Mar 25, 2020
@marcoscaceres marcoscaceres deleted the screen-wake-lock branch March 25, 2020 07:20
@reillyeon
Copy link
Member

I've filed a Chromium issue to track the breaking changes.

@anssiko
Copy link
Member

anssiko commented Mar 25, 2020

@anssiko, @reillyeon, should we request a new shortname for the spec?

Can do this when we publish to /TR.

chromium-wpt-export-bot referenced this pull request in web-platform-tests/wpt Mar 26, 2020
This CL renames "wake-lock" to "screen-wake-lock" in policy-controlled feature
specific for screen wake lock, and leaves system wake lock's policy control
as allowed by default because its associated feature policy is not defined yet.

Spec changes at: https://github.com/w3c/wake-lock/pull/255

Bug: 1064685
Change-Id: I7701a532a7688d708a75aedafc8713d671da6e2b
chromium-wpt-export-bot referenced this pull request in web-platform-tests/wpt Mar 27, 2020
This CL renames "wake-lock" to "screen-wake-lock" in policy-controlled feature
specific for screen wake lock, and leaves system wake lock's policy control
as allowed by default because its associated feature policy is not defined yet.

Spec changes at: https://github.com/w3c/wake-lock/pull/255

Bug: 1064685
Change-Id: I7701a532a7688d708a75aedafc8713d671da6e2b
rakuco pushed a commit to rakuco/wake-lock that referenced this pull request Apr 1, 2020
Make some small corrections after the big changes from that pull request.
marcoscaceres pushed a commit that referenced this pull request Apr 2, 2020
Make some small corrections after the big changes from that pull request.
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 2, 2020
…on names.

This adapts the implementation to some of the breaking spec changes
introduced in w3c/screen-wake-lock#255.

Namely, WakeLockPermissionDescriptor has been removed in favor of using a
regular PermissionDescriptor object with |name| set to "screen-wake-lock".

That spec change also removed system wake locks (and consequently the
additions to the WorkerNavigator interface) altogether, but that will be
done in a separate CL, so for now we also support a PermissionDescriptor
object with |name| set to "system-wake-lock".

Bug: 257511, 1064685
Change-Id: I096f3fae24444da5ca6b1eeb3889a813a9e5f270
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 3, 2020
…on names.

This adapts the implementation to some of the breaking spec changes
introduced in w3c/screen-wake-lock#255.

Namely, WakeLockPermissionDescriptor has been removed in favor of using a
regular PermissionDescriptor object with |name| set to "screen-wake-lock".

That spec change also removed system wake locks (and consequently the
additions to the WorkerNavigator interface) altogether, but that will be
done in a separate CL, so for now we also support a PermissionDescriptor
object with |name| set to "system-wake-lock".

Bug: 257511, 1064685
Change-Id: I096f3fae24444da5ca6b1eeb3889a813a9e5f270
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 6, 2020
…on names.

This adapts the implementation to some of the breaking spec changes
introduced in w3c/screen-wake-lock#255.

Namely, WakeLockPermissionDescriptor has been removed in favor of using a
regular PermissionDescriptor object with |name| set to "screen-wake-lock".

That spec change also removed system wake locks (and consequently the
additions to the WorkerNavigator interface) altogether, but that will be
done in a separate CL, so for now we also support a PermissionDescriptor
object with |name| set to "system-wake-lock".

Bug: 257511, 1064685
Change-Id: I096f3fae24444da5ca6b1eeb3889a813a9e5f270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134228
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Mounir Lamouri <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Auto-Submit: Raphael Kubo da Costa <[email protected]>
Commit-Queue: Raphael Kubo da Costa <[email protected]>
Cr-Commit-Position: refs/heads/master@{#756753}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 6, 2020
…on names.

This adapts the implementation to some of the breaking spec changes
introduced in w3c/screen-wake-lock#255.

Namely, WakeLockPermissionDescriptor has been removed in favor of using a
regular PermissionDescriptor object with |name| set to "screen-wake-lock".

That spec change also removed system wake locks (and consequently the
additions to the WorkerNavigator interface) altogether, but that will be
done in a separate CL, so for now we also support a PermissionDescriptor
object with |name| set to "system-wake-lock".

Bug: 257511, 1064685
Change-Id: I096f3fae24444da5ca6b1eeb3889a813a9e5f270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134228
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Mounir Lamouri <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Auto-Submit: Raphael Kubo da Costa <[email protected]>
Commit-Queue: Raphael Kubo da Costa <[email protected]>
Cr-Commit-Position: refs/heads/master@{#756753}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Apr 6, 2020
…on names.

This adapts the implementation to some of the breaking spec changes
introduced in w3c/screen-wake-lock#255.

Namely, WakeLockPermissionDescriptor has been removed in favor of using a
regular PermissionDescriptor object with |name| set to "screen-wake-lock".

That spec change also removed system wake locks (and consequently the
additions to the WorkerNavigator interface) altogether, but that will be
done in a separate CL, so for now we also support a PermissionDescriptor
object with |name| set to "system-wake-lock".

Bug: 257511, 1064685
Change-Id: I096f3fae24444da5ca6b1eeb3889a813a9e5f270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134228
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Mounir Lamouri <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Auto-Submit: Raphael Kubo da Costa <[email protected]>
Commit-Queue: Raphael Kubo da Costa <[email protected]>
Cr-Commit-Position: refs/heads/master@{#756753}
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Apr 9, 2020
…riptor, use separate permission names., a=testonly

Automatic update from web-platform-tests
wake lock: Remove WakeLockPermissionDescriptor, use separate permission names.

This adapts the implementation to some of the breaking spec changes
introduced in w3c/screen-wake-lock#255.

Namely, WakeLockPermissionDescriptor has been removed in favor of using a
regular PermissionDescriptor object with |name| set to "screen-wake-lock".

That spec change also removed system wake locks (and consequently the
additions to the WorkerNavigator interface) altogether, but that will be
done in a separate CL, so for now we also support a PermissionDescriptor
object with |name| set to "system-wake-lock".

Bug: 257511, 1064685
Change-Id: I096f3fae24444da5ca6b1eeb3889a813a9e5f270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134228
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Mounir Lamouri <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Auto-Submit: Raphael Kubo da Costa <[email protected]>
Commit-Queue: Raphael Kubo da Costa <[email protected]>
Cr-Commit-Position: refs/heads/master@{#756753}

--

wpt-commits: 7ab34f7e16b668b470397262b66db4ba915beedd
wpt-pr: 22658
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 10, 2020
…riptor, use separate permission names., a=testonly

Automatic update from web-platform-tests
wake lock: Remove WakeLockPermissionDescriptor, use separate permission names.

This adapts the implementation to some of the breaking spec changes
introduced in w3c/screen-wake-lock#255.

Namely, WakeLockPermissionDescriptor has been removed in favor of using a
regular PermissionDescriptor object with |name| set to "screen-wake-lock".

That spec change also removed system wake locks (and consequently the
additions to the WorkerNavigator interface) altogether, but that will be
done in a separate CL, so for now we also support a PermissionDescriptor
object with |name| set to "system-wake-lock".

Bug: 257511, 1064685
Change-Id: I096f3fae24444da5ca6b1eeb3889a813a9e5f270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134228
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Mounir Lamouri <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Auto-Submit: Raphael Kubo da Costa <[email protected]>
Commit-Queue: Raphael Kubo da Costa <[email protected]>
Cr-Commit-Position: refs/heads/master@{#756753}

--

wpt-commits: 7ab34f7e16b668b470397262b66db4ba915beedd
wpt-pr: 22658
rakuco pushed a commit to rakuco/wake-lock that referenced this pull request Sep 30, 2020
And make it default to "screen". Existing code continues to work, while new
code can also call `navigator.wakeLock.request()` to request a screen wake
lock.

Issues w3c#253, w3c#255 and w3c#288 indicate that there is a preference for making
`type` an optional parameter that just got overlooked.
rakuco pushed a commit to rakuco/wake-lock that referenced this pull request Oct 5, 2020
And make it default to "screen". Existing code continues to work, while new
code can also call `navigator.wakeLock.request()` to request a screen wake
lock.

Issues w3c#253, w3c#255 and w3c#288 indicate that there is a preference for making
`type` an optional parameter that just got overlooked.
rakuco pushed a commit that referenced this pull request Oct 5, 2020
And make it default to "screen". Existing code continues to work, while new
code can also call `navigator.wakeLock.request()` to request a screen wake
lock.

Issues #253, #255 and #288 indicate that there is a preference for making
`type` an optional parameter that just got overlooked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants