Open daftspaniel opened 7 years ago
@filiph what do you think of adding pwa functionality to web-angular?
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:
<link rel="manifest" href="manifest.json">
to index.html<meta name="theme-color" content="#2196F3">
to index.htmlshort_name
and name
with something meaningful.WDYT?
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.
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.
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?