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

Foldables CSS #472

Closed
1 task done
dlibby- opened this issue Feb 7, 2020 · 7 comments
Closed
1 task done

Foldables CSS #472

dlibby- opened this issue Feb 7, 2020 · 7 comments
Assignees
Labels
Progress: propose closing we think it should be closed but are waiting on some feedback or consensus Review type: CG early review An early review of general direction from a Community Group Topic: CSS Venue: CSS WG

Comments

@dlibby-
Copy link

dlibby- commented Feb 7, 2020

Hello TAG!

I'm requesting a TAG review of CSS primitives for dual screen layouts.

In order to enable web developers to build layouts that are optimized for foldable experiences declaratively using CSS, we must consider fundamental assumptions of CSS (i.e. a single contiguous rectangular space for laying out content) and introduce new primitives that -together with existing layout media queries- allow developers to create layouts that react to states where the root viewport spans multiple displays.

Further details:

  • I have reviewed the TAG's API Design Principles
  • The group where the work on this design is being done (or is intended to be done in the future):
    CSSWG
  • Existing major pieces of multi-stakeholder review or discussion of this design:
    csswg-drafts issue 4736
  • Major unresolved issues with or opposition to this design:
    None at the moment
  • This work is being funded by:
    Microsoft

Note that the current explainer contains two different APIs - this TAG review is for the CSS portion. The explainer has both API surfaces mainly to reduce confusion and duplication of the introductory content (the APIs expose the very similar concepts, but in different forms). If preferable, we can split these out. We're in the very early stages, so major changes would not be unexpected, based on feedback from the CSSWG and other developers.

We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify [github usernames]

@dlibby- dlibby- added Progress: untriaged Review type: CG early review An early review of general direction from a Community Group labels Feb 7, 2020
@kenchris kenchris self-assigned this Feb 12, 2020
@plinss plinss added this to the 2020-02-17-week milestone Feb 12, 2020
@torgo torgo self-assigned this Feb 12, 2020
@kenchris
Copy link

Feedback from CSS WG: w3c/csswg-drafts#4736

@kenchris
Copy link

We (me and co-worker) have played around with this and it works quite well we think:

https://darktears.github.io/foldable-device-configurator/demo/

@diekus-zz
Copy link

I'm still concern over the wording "root viewport spans multiple displays". That does not comply with devices that use one single screen. I would feel a lot more comfortable (and feel it's a lot more future proofed) if this is implemented around the idea of a 'hinge' instead of a display. That way it can include all sorts of folding devices. The physical implementation of the device can then be abstracted around the idea of the folding feature of the device. A window can span across screens, yes, but technically it's spanning across the hinge as a common denominator between the Surface Duo and the Galaxy Fold for example.

@hober
Copy link
Contributor

hober commented Mar 2, 2020

In the explainer, it says (emphasis mine)

iframes where screen-spanning feature policy is enabled will receive values in the client coordinates of the top most window, and it's possible the iframe won't be able to interpret that data without other information from its embedder. As an example, for cross origin iframes, the iframe's embedder must provide information about how to transform from the root client coordinate space to the iframe's client coordinate space, as this information is not available to cross-origin iframes for security reasons.

Why expose the screen spanning information to the iframe at all, if the values can't be used reliably?

@kenchris
Copy link

kenchris commented Mar 2, 2020

Thanks for filing this, we are happy to see that there are active discussions in the CSSWG and will wait to see how that turns out.

We are proposing to close this issue for now.

@zouhir
Copy link

zouhir commented Mar 6, 2020

really good question, @hober.

We noticed there are some existing web apps designed with the whole app as an iframe, taking 100% of the browser viewport. We emphasize with the architectural / technical decision web developers have to make and we worked with those customers who are keen to utilize the newly proposed web APIs to provide enhanced UIs for foldable & dual-screen devices.

We found out that the best path forward was to not look at heuristics to enable it for some iframes and also to not disable it completely. Instead, having it off by default and giving the control over its availability to the parent frame developer who knows best about the child iframe behavior and geometry sounded like a good balance.

We are happy to share more in-depth details with TAG, we also welcome suggestions & ideas.

if @kenchris wants to close this for now, happy to continue the iframe discussion @ https://github.com/MicrosoftEdge/MSEdgeExplainers

@hober hober added the Progress: propose closing we think it should be closed but are waiting on some feedback or consensus label May 28, 2020
@kenchris
Copy link

@hober and I took a look at this during our TAG F2F this week and your answer sounds sensible to us, so let's go ahead and close this. Thanks for flying TAG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Progress: propose closing we think it should be closed but are waiting on some feedback or consensus Review type: CG early review An early review of general direction from a Community Group Topic: CSS Venue: CSS WG
Projects
None yet
Development

No branches or pull requests

7 participants