Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

PWA Generator Option #417

Open
daftspaniel opened this issue May 26, 2017 · 4 comments
Open

PWA Generator Option #417

daftspaniel opened this issue May 26, 2017 · 4 comments

Comments

@daftspaniel
Copy link

Progressive Web Apps are becoming more important and it would be great to write them in Dart with a nice template to get started via Stagehand

This would set up a core manifest.json.

Material design might be an option?

@kwalrath
Copy link
Contributor

@filiph what do you think of adding pwa functionality to web-angular?

@filiph
Copy link
Contributor

filiph commented May 26, 2017

Great suggestion, @daftspaniel!

We now have the pwa package that makes it really easy to make web apps into PWAs (at least the offline part). But the experience is not 100% yet (for example, IntelliJ IDEA has a bug that I haven't filed yet that makes it really confusing to serve a project using pkg:pwa).

Stagehand should always be a bit behind the curve, comfortably in the stable land. But we'll get there with pkg:pwa and then all AngularDart apps will be offline-capable PWAs by default, from the start.

cc @isoos, @ferhatb

In the short term, we definitely should think about adding manifest.json. That's "for free" and doesn't break anyone.

To get startup namer to 100/100 Lighthouse PWA (last week's methodology) I needed only these 2 commits on top of pkg:pwa:

So, my short-term proposal:

  • Create AngularDart icons in the required sizes
  • Add <link rel="manifest" href="manifest.json"> to index.html
  • Add <meta name="theme-color" content="#2196F3"> to index.html
  • Add manifest.json itself (example), filling in short_name and name with something meaningful.

WDYT?

@daftspaniel
Copy link
Author

Thanks for pointing out the PWA package - looks really useful!

The above sounds great for Angular apps. I'd also suggest something like ''Bare-bones PWA" for those who want to use other frameworks or just want a minimal base.

@isoos
Copy link

isoos commented May 28, 2017

pwa's code generator does create a manifest.json now, but I am still undecided how to balance reasonable defaults:
https://github.com/isoos/pwa/blob/master/examples/additional_offline_urls/web/manifest.json

While some of it comes from pubspec.yaml, others, like the theme_color is entirely arbitrary, and I've left a placeholder for the icons. If stagehand would do it differently, I'd change the pwa to follow the same pattern.

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

No branches or pull requests

4 participants