Skip to content
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

Consider the pwa unique ids explainer #2

Open
michaelwasserman opened this issue Feb 11, 2021 · 5 comments
Open

Consider the pwa unique ids explainer #2

michaelwasserman opened this issue Feb 11, 2021 · 5 comments

Comments

@michaelwasserman
Copy link

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
Copy link

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
Copy link

dmurph commented Feb 17, 2021

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:

  • Sub apps will never be their own app (like, never independent of parent app, so we don't need to support migration to something like that),
  • We allow an app, in our database proto, to reference sub-app ids. (I guess maybe in sync data too)
  • Those sub-apps basically exist in our system as regular apps, but we store the parent id in the web app database proto (and in the sync data)

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
Copy link
Owner

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
Copy link

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

@dmurph
Copy link

dmurph commented Feb 17, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants