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 Compute Pressure API #22687

Merged
merged 6 commits into from
May 3, 2024
Merged

Add Compute Pressure API #22687

merged 6 commits into from
May 3, 2024

Conversation

Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Mar 22, 2024

See https://w3c.github.io/compute-pressure/#idl-index for the API surface.

Draft PR given this is not yet stable but it will probably make the Chromium 125 train. (and BCD doesn't have Chrome 125 yet, so the build failure here is expected and this will not matter when we merge this PR later in the process).

cc @arskama @kenchris here you go, draft BCD for compute pressure :)
Question for you: By default we assume that a new web platform features ship on desktop and mobile browsers at the same time (and hence we "mirror" in the data, see the diff). For this API, I'm not sure. If it is shipping soon in 125, on which platforms will it be available? Thanks!

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Mar 22, 2024
@kenchris
Copy link

The feature is only supported on desktop operating systems so far: https://chromestatus.com/feature/5597608644968448

Look at the Intent to Ship part:

image

@github-actions github-actions bot added the data:http 🚠 Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP label Mar 25, 2024
@Elchi3
Copy link
Member Author

Elchi3 commented Mar 25, 2024

Thanks @kenchris! So, "no information provided yet" means no support :)

I've also added the permissions policy bits here, they seem to be implemented as they are marked passing on https://wpt.fyi/results/compute-pressure?label=master&label=experimental&aligned&q=compute-pressure.

All features this PR is adding:

  • api.Permissions.permission_compute-pressure
  • api.PressureObserver
  • api.PressureObserver.PressureObserver
  • api.PressureObserver.disconnect
  • api.PressureObserver.observe
  • api.PressureObserver.supportedSources_static
  • api.PressureObserver.takeRecords
  • api.PressureObserver.unobserve
  • api.PressureRecord
  • api.PressureRecord.source
  • api.PressureRecord.state
  • api.PressureRecord.time
  • api.PressureRecord.toJSON
  • http.headers.Permissions-Policy.compute-pressure

@Elchi3
Copy link
Member Author

Elchi3 commented Apr 17, 2024

@kenchris @arskama This PR is now passing because the Chrome train has moved on to the next milestone :) Can you confirm the API ships as described in #22687 (comment)?

@Elchi3 Elchi3 marked this pull request as ready for review April 17, 2024 07:07
@kenchris
Copy link

@Elchi3 yes, this is shipping. We might remove the supportedSourced static before though, still considering

@Elchi3
Copy link
Member Author

Elchi3 commented Apr 30, 2024

Renamed supportedSources to knownSources. Still waiting for feedback if this will be M125 or M126 before merging.

@foolip
Copy link
Collaborator

foolip commented Apr 30, 2024

I've tested https://mdn-bcd-collector.gooborg.com/tests/api/PressureObserver in Chrome 125 beta and it's supported. I think this is good to go.

@Elchi3
Copy link
Member Author

Elchi3 commented May 3, 2024

I don't see knownSources in 125.0.6422.26 yet, but looks like it will be in there per https://issues.chromium.org/issues/337837870.

I'm merging this, so the compat data will be available to the docs PR next week (mdn/content#32923)

@Elchi3 Elchi3 merged commit 066737f into mdn:main May 3, 2024
6 checks passed
@Elchi3 Elchi3 deleted the compute-pressure branch May 3, 2024 13:43
@foolip
Copy link
Collaborator

foolip commented May 6, 2024

Yep, knownSources should be in Chrome 125:
https://chromiumdash.appspot.com/commit/911bf3b8e88a6eeaa2521f7186fdfcf23f123f70

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 data:http 🚠 Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants