ivansandrk / multi-apps

Repository hosting the feature explainer
Other
26 stars 0 forks source link

Consider the pwa unique ids explainer #2

Open michaelwasserman opened 3 years ago

michaelwasserman commented 3 years ago

Please consider the pwa unique ids explainer: https://github.com/philloooo/pwa-unique-id/blob/main/explainer.md

Perhaps multi-apps would want multiple ids? Perhaps some id schemas would at least make that possible in the future? I'm not super familiar here, I'm mainly hoping that we'd get a broad view of what might be needed around each proposal.

philloooo commented 3 years ago

Hi I am copy-pasting my reply in the unique-id issue, it seems to make more sense to me to have one id for the multi-apps case, as there will be one manifest for a multi-apps PWA, thus the installation and update life cycle will treat it as one entity. Same for PWA stores, that this will be listed as a single PWA. Is my understanding of how a multi-apps PWA work correct?

dmurph commented 3 years ago

FYI - I believe the current preferred solution is to not have one manifest and instead have one manifest per app, which them main manifest would link to. This would let us use all of our existing updating logic.

In my head I was imagining:

I... don't think there are any other snags with this approach? I think the main features here is that the parent app basically gets to 'install'/'list'/'uninstall' these as it wants, and otherwise they can follow the existing webapps code?

ivansandrk commented 3 years ago

As Daniel wrote, we'd use one manifest per "sub-app", and I'm not sure if we would need to bake in unique-id in any special way for this feature. If anything, Daniel understands the technicals here much better than I do.

philloooo commented 3 years ago

Thanks, so sub-apps have ids but they are not stored as app entities in database?

dmurph commented 3 years ago

I think we would store them in the database like a regular app, and we would probably have a new 'type' field or some way to tell that they were sub-apps, as well as a pointer to the parent app id.