-
Notifications
You must be signed in to change notification settings - Fork 162
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
Relationship between nestedly scoped web app manifests? #539
Comments
This is the first I'm hearing of potentially nested manifests. Is this a theoretical question or are there examples of sites that implement this functionality? Are there web browsers / user agents that support such functionality? Considering a complex web app manifest is still a relatively small JSON file with around a dozen top-level members, I wonder how much demand there is for something like this. |
Well, let's take Alibaba as a example. The URL of Taobao mobile web app is What if Taobao and Alitrip want to build their own PWA without altering the domains? And what if users want to add those sub-apps of AliTrip independently? (I mean, they are hotel booking, airplane ticketing thus It totally make sense.) That will make nested manifests happen. |
That sounds a bit like Android apps being able to add multiple different home screen icons (still only one icon in launcher) for shortcuts into the apps, like for chats with a specific friends, weather for Google search, my apps for Google Play etc |
@Paul_Kinlan ^ |
This seems somewhat similar to the challenge(s) described with multiple scopes in #449 In the case @Huxpro describes, I'm thinking:
If there was shared content or a shared log-in page that resided on the root h5.m.taobao.com, that the AliTrip PWA or the AliTrip "sub-app" PWA needed, issue #449 would enable adding that (ex: h5.m.taobao.com/login) as an additional scope. |
@RobDolinMS Yep, glad to see the discussion! I think the feature I mainly requested is pretty similar to
but focus on paths instead of subdomains. If we take something similar to the proposal of
In this case, the Alitrip sub-app PWAs could be separated from Alitrip PWA and AliTrip PWA could be separated from Taobao PWA. The browsers could open a new browsing context when navigating to Alitrip from Taobao PWA and vice versa. |
But It is still kinda verbose and is slightly different from subdomains' issues cuz the path could be nested. Thus I do think taking advantages of allowing overriding might solve problems better. For example, we could define some override rules like service workers: the manifest from longer path (a.k.a subManifest) always extend the one from shorter path (a.k.a superManifest):
In this case the manifests might look like:
Pretty neat right? |
Will deal this, if it's an actual bug, as part of the work we will do to close off any remaining scope member issues. |
@marcoscaceres It's been a while since I opened this. Great to see there is follow-up going on! |
I have a simpler question to ask relating to this: Currently Chromium matches with the app that has the longest scope. So if both apps are installed, navigating to Should this be clarified in manifest spec? |
There has since been some more literature on the chromium side about this:
When talking to web developers, we have never found any strong use-case or reason why developers needed nested apps. And thankfully now that an I wonder if it's ok to start with just specifying what the current status quo is, and hopefully it's not-great nature will dissuade developers from doing this. Would the following help with resolving this issue? Understanding "scope"Web apps that share an origin.There can be web apps that share an origin, where their scope contains the same origin. This is not recommended due to origin-based settings like:
Web apps that have nested scopes.Among the issues above, if a page resides inside the scope of multiple webapps, that is considered a scope conflict. This is strongly not recommended, and will cause the following possible UX changes and API behavior inconsistencies, among other possible issues:
[1] https://github.com/ivansandrk/multi-apps/blob/main/explainer.md |
Just to jump into the discussion: |
Closing due to how this doesn't affect user agents like Safari who are doing full isolated installs. Documentation about Chromium's recommendation is at https://web.dev/articles/building-multiple-pwas-on-the-same-domain |
There is an explicit section match-service-worker-registration defining how nestedly scoped service workers work, where a SW with longest scope_url would "override" all the others:
But of web app manifest, how nestedly scoped web app (manifest) effect with each other? Taking
/
and/sub-app/
as an example, is the one with shorter path (which has a wider scope) totally bypassed? OR the longer-path one (the sub one) can inherit all missing members from the shorter/parent one? There seems no definition exist about this scenarios in the current spec.Furthermore, there might exist some scenarios that a
/sub-app/
want treat/
as sort of "parent app", where the sub-app can be navigated to from the "parent app" (in current browsing context) but has its own needs for a separated manifest (e.g. different themes/bg colors, different orientation, different desceiption etc. I think It's common?), thus should allow the navigation back from sub-app to "parent app".There might be more complicated scenarios in practice, I believed It's worth discussion ;)
The text was updated successfully, but these errors were encountered: