Re: [manifest] Allow multiple application contexts per app (#294)

> The reason I think this is important is to allow multiple pages of an app to be open at the same time, with the manifest applied. This becomes particularly important if we add capturing scope to the spec such that an app can capture navigations from a browsing context outside the app. Otherwise any navigation to a URL inside the scope of an app would always navigate the single application context for that app, potentially navigating the user away from a page they are still using. 

Can you walk through the above sequentially from the following scenarios below? I want to make sure we are on the same page (hehe, no pun intended). 

We assume the following two apps are installed:

### App 1 - Foo!
  * short name: "Foo!" 
  * scope: is foo.com/app.
  * display mode: standalone.
  * orientation: portrait. 
  * start url: foo.com/app/start.html

### App 2 - Bar! 
  * short name: "Bar!" 
  * scope: is bar.com/.
  * display mode: fullscreen.
  * orientation: landscape. 
  * start url: bar.com/start.html

### Installed app (in app navigation within scope)
1. User launches "Foo!" by clicking its icon. 
1. App context automatically navigates to `foo.com/app/start.html`.
1. User clicks link to `foo.com/app/whatever.html`. Link is in scope. 
1. Navigation to `whatever.html` happens and application context remains fullscreen.
 
### Browser navigation
1. User has opened Foo!. 
1. User navigates Foo! to "foo.com/app/form.html" - inputs some details. 
1. User jumps to web browser and navigates to facebook.com. This puts Foo! in the background. 
1. In browser, user clicks on link to `foo.com/app`. 
1. Browser navigates to `foo.com/app`. 
1. As foo.com/app is in scope of an installed web app (Foo!), browser MAY indicate that Foo! is already installed and the user can switch to Foo app: 
![screenshot 2015-01-12 11 02 04](https://cloud.githubusercontent.com/assets/870154/5698471/3447e1c2-9a5a-11e4-97d4-dae6e1caf7ec.png)

1. In browser, user navigates to foo.com/app/whatever.html (also in scope).
1. User clicks on "open" button, Foo app opens `foo.com/app/whatever.html`. 
1. foo.com/form.html detects that it's about to `unload`. Alerts users that they could lose work.  

### Installed app (following links outside scope)
1. user opens Foo! 
1. User clicks on `bbc.co.uk/news`. Link is out of scope. 
1. Link opens in default web browser. 

### Installed app (following links)
1. user opens Foo! 
1. User clicks on `bbc.co.uk/news` with `_blank` (or `_whatever`). 
1. Link opens in browser. 

### Installed app (opening windows)
1. user opens Foo! 
1. User clicks on `bbc.co.uk/news/some_story`. 
1. Click is intercepted, and `window.open` is called.   
1. Overlay browser is shown. `bbc.co.uk/news/some_story` is shown. 
1. User closes overlay browser, returns to app (currently `at foo.com/app/start.html`).  

### Jumping between Bar and Foo
1. user opens Foo! 
1. User clicks on `bar.com/whatever`.
1. Open in Bar! Orientation and display mode change. 
1. User clicks "Return to Foo!" (foo.com/app/whatever).
1. Open in Foo! Orientation and display mode change.

### Notes
Identity is still problematic. There can be a third app that can subsume Foo!'s scope and start URL. 
Need to deal with that in a separate bug. 

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/294#issuecomment-69525977

Received on Monday, 12 January 2015 03:08:27 UTC