#492: Window Segments API

Visit on Github.

Opened Mar 31, 2020

Hello TAG!

I'm requesting a TAG review of the Window Segments API.

Web developers targeting foldable devices want to be able to effectively lay out the content in a window that spans multiple displays. However, the web platform does not yet provide the necessary primitives for building layouts that are optimized for foldable experiences. The Window Segments API will provide a list of logical segments of the viewport that web developers can use to target with different views, as appropriate based on size and configuration of those segments.

Further details:

  • I have reviewed the TAG's API Design Principles
  • The group where the incubation/design work on this is being done (or is intended to be done in the future): Second Screen CG
  • The group where standardization of this work is intended to be done ("unknown" if not known): Unknown
  • Existing major pieces of multi-stakeholder review or discussion of this design:
  • Major unresolved issues with or opposition to this design: N/A
  • This work is being funded by: Microsoft

We'd prefer the TAG provide feedback as:

💬 leave review feedback as a comment in this issue and @-notify [github usernames]

Discussions

Discussed Apr 20, 2020 (See Github)

Ken: Added comment about hinge area

Peter: What about ordering (top, down -> left, right) and what about multiple dimensions. I will add comments.

Comment by @kenchris Apr 20, 2020 (See Github)

The current API exposed the two windows segments, but some devices will have no physical hinge but still have a hinge area that might not be good place to place UI components as the screen might be bending there.

I have heard that from multiple people working at Samsung, that the dual screen APIs would work for non dual screen, actually foldable screen devices, but the hinge area would just be visible.

As that is the case, it might make sense to expose the hinge area as a segment as well, potentially by supplying an option to the method.

Comment by @plinss Apr 20, 2020 (See Github)

How does this handle multiple axes? For example, if a user has 4 monitors in a 2x2 grid and the window spans all 4 (fairly common).

Also, is there a defined ordering to the rects or does the user have to infer their spatial relationships based on the coordinates?

Are the returned rects always adjacent? e.g. for hardware with a known gap between devices will that be reflected in the coordinates?

Discussed May 11, 2020 (See Github)

Rossen: this was discussed at the css f2f a week ago - at this point it's well engaged discussion with the working group. that's the main venue for that work. The issue that Peter brought up is more general - this explainer doesn't aim to address it. The main motivation is for portable devices vs multi-screen. As we discussed in the css f2f call - we're not interested in watering down this proposal to address all permutations of devices... use case here is a lot more narrow: portable devices where it's subdived or physical hinged screens... The overall shape is still being worked on by the CSS working group. Not quite sure what else we need to... .. one question was making sure foldable devices that have no physical hinge addressed by - in another explainer.

Dan: Kenneth and Diego (from Samsung) are working on another explainer...

Dan: so if we don't think there's much to do here we could propose close...

Rossen: overall architecture review and feedback - which was provided initially - is valid. All of these questions are answered. From security & privacy, no concerns raised. Remaining work - we trust that CSS wg will do it.

[set to "propose close"]

Comment by @plinss May 13, 2020 (See Github)

Closing this issue, the TAG is satisfied that this is being handled in the CSSWG. Happy to re-review when it reaches later stages.