[w3c/manifest] Add a "tabbed application" mode (#737)

A feature request to add a "tabbed" mode for installed applications. This would be similar to "standalone" in that when the application is installed, it can be opened in a separate window dedicated to that application. However, in "tabbed" mode, the user agent would divide the window into tabs, similar to a tabbed web browser, except that all the tabs belong to the app (and don't have a URL bar).

Differences to a normal web browser window:

- The window has the title and icon of the app, not the web browser.
- There could be a "new tab" button, but it would open a page at the application's `start_url`.
- Like a standalone window, browser-specific features like a URL bar, navigation buttons, etc, may be hidden.

(At the user agent's discretion), the user would be able to drag tabs around, split them out to separate application windows, drag tabs in the application scope between app windows and regular browser windows.

Essentially this lets web developers easily build multi-document interfaces for productivity applications.

**Why not just let developers build their own tabbed interface in HTML?**

This could be made into a library, where you embed your document pages inside an iframe. However, it would have a number of drawbacks compared to a user agent implementation:

- The tabs could not be dragged out of the window to split into a separate application window, or dragged back in to combine into a single window.
- The tabs could not be dragged to a regular browser window to transfer them back to a normal browsing context.
- The tabs could not be dragged from a browser window into the application.
- User agent affordances such as "copy this page URL", "cast this tab" or "open this page in a web browser" would be applied to the tabbed interface page, not the currently selected document page.

**Why can't a user agent just interpret "display: browser" as this tabbed mode?**

(i.e., why do we need to spec this at all?)

Because display: browser already has a specific meaning. "Opens the web application using the platform-specific convention for opening hyperlinks in the user agent (e.g., in a browser tab or a new window)." While user agents can do whatever they want regarding UI, it would clearly be a pretty big subversion of developer expectations if "display: browser" suddenly meant "run in a separate application-specific window with no browser affordances, but a tabbed document interface".

"display: browser" is the way you opt out of being put into an application window.

Furthermore, "display: browser" is at the bottom of the fallback chain. If a user agent doesn't support, say, "display: minimal-ui", it is required to fall back to "display: browser". It doesn't make sense that a developer requesting "standalone" would get a standalone single-document window with no browser UI, while a developer requesting "minimal-ui" (i.e. asking for more browser UI) would get a standalone multi-document window with no browser UI.

User agents **SHOULD NOT** treat "display: browser" as a tabbed document application window.

**How should this be requested, then?**

The obvious answer is to add a new display mode: "display: tabbed" or "display: multidoc" (the latter would let user agents provide a different multi-document interface, [in case there is a Windows 95 implementation](https://docs.microsoft.com/en-us/windows/desktop/winmsg/about-the-multiple-document-interface) :smile:).

One potential issue is that it doesn't fit cleanly into the fallback hierarchy. Currently, the fallback hierarchy is: fullscreen > standalone > minimal-ui > browser. If we put "tabbed" above "standalone", then that implies a user agent that doesn't support "fullscreen" should fall back to "tabbed" (bad). If we put it above "fullscreen", then that implies a user agent that doesn't support "tabbed" should fall back to "fullscreen" (also bad).

We could make the fallback hierarchy a [DAG](https://en.wikipedia.org/wiki/Directed_acyclic_graph), which would look like this:

       tabbed
              \
               > standalone > minimal-ui > browser
              /
    fullscreen

I think that would be reasonable.

The other approach is that we make "tabbed_mode" or "multidoc_mode" a separate member that you can enable, in tandem with "display: standalone".

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/737

Received on Monday, 12 November 2018 23:31:49 UTC