Folding phones and tablets may be the future, but developers are ill-prepared to support the ever-changing form factors of these devices.
To help out web developers in particular, Microsoft has proposed a new API which would help developers better plan the layout of their pages to take into account the variable nature of folding devices.
Called the Window Segments Enumeration API, the aim is to help developers effectively layout the content in a window that spans multiple displays and to help them react when areas of that window are occluded by the OS, for example when soft keyboard pops up.
This proposal is primarily aimed at reactive scenarios, where an application wants to take advantage of the fact that it spans multiple displays, by virtue of the user/window manager placing it in that state.
While Microsoft may be working to better support folding Android phones as part of their commitment to Chromium, we can’t help but remember that a number of Windows OEMs are also working on folding laptops and that this technology may be needed there also.
Web techies can read more at Github here.