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

Device Posture API #37595

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisdavidmills
Copy link
Contributor

@chrisdavidmills chrisdavidmills commented Jan 10, 2025

NOTE: Keeping this as a draft until I've had my code example checked, made it available on dom-examples, and linked to it from the docs.

Description

Chrome 132 supports the Device Posture API, which provides functionality to create user interfaces that adapt to a foldable device's posture and respond to posture changes.

Specifically, it adds:

  • The DevicePosture interface, which is accessed via the navigator.devicePosture property.
  • The device-posture media query feature.

This PR adds docs for all the features of the API.

See https://chromestatus.com/feature/5185813744975872 for the data source.

Also see https://developer.chrome.com/blog/foldable-apis-ot for a tutorial with some info.

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills chrisdavidmills requested review from a team as code owners January 10, 2025 17:49
@chrisdavidmills chrisdavidmills requested review from sideshowbarker, estelle and pepelsbey and removed request for a team January 10, 2025 17:49
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:WebAPI Web API docs labels Jan 10, 2025
@chrisdavidmills chrisdavidmills marked this pull request as draft January 10, 2025 17:49
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Jan 10, 2025
Copy link
Contributor

Preview URLs (10 pages)
Flaws (198)

Note! 5 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Navigator
Title: Navigator
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/Navigator/standalone does not exist

URL: /en-US/docs/Web/CSS/@media
Title: @media
Flaw count: 48

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/CSS_basics
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/What_is_CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/Getting_started
    • and 43 more flaws omitted

URL: /en-US/docs/Web/CSS/@media/device-posture
Title: device-posture
Flaw count: 48

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/CSS_basics
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/What_is_CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/Getting_started
    • and 43 more flaws omitted

URL: /en-US/docs/Web/CSS/CSS_media_queries
Title: CSS media queries
Flaw count: 53

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/CSS_basics
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/What_is_CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/Getting_started
    • and 48 more flaws omitted

URL: /en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries
Title: Using media queries
Flaw count: 48

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/CSS_basics
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/What_is_CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/Getting_started
    • and 43 more flaws omitted
External URLs (4)

URL: /en-US/docs/Web/API/DevicePosture
Title: DevicePosture


URL: /en-US/docs/Web/API/DevicePosture/type
Title: DevicePosture: type property


URL: /en-US/docs/Web/API/DevicePosture/change_event
Title: DevicePosture: change event


URL: /en-US/docs/Web/API/Device_Posture_API
Title: Device Posture API

@sideshowbarker sideshowbarker removed their request for review January 18, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant