typebytes / angular-checklist

🔥 Curated list of common mistakes made when developing Angular applications
https://angular-checklist.dev
MIT License
316 stars 66 forks source link

15 feature/pwa (Progressive Web App Functionality) #39

Closed tayambamwanza closed 2 years ago

tayambamwanza commented 5 years ago

This pull request lays the foundation for implementing progressive web app functionality.

Due to issues that might arise with cache-busting we have to make sure everything works out the box, and can't really work in stages.

I included a service for automatically/manually updating the app, I haven't actually called these methods anywhere yet as I was thinking the code will be reviewed first.

The automatic update will be used in the app.component.ts

The manual update should be triggered by the user, so I'm leaving it up to the maintainers discretion as to where the button should be located in the interface, all you have to do is call the method from the service when the button is clicked.

I recommend running this on the dev version of the website first.

Let me know where I can make adjustments.

d3lm commented 5 years ago

Yay! This is awesome. I'll have a look and review the code. Thanks for sending the PR @tayambamwanza 👏

d3lm commented 5 years ago

Hey @tayambamwanza, let's pick this up. So sorry for letting you hang here for so long. I really want this feature to be merged.

Can you quickly give me an update on what's left? Is there anything that needs to be implemented or can I go ahead and review the code again and test it out on my machine, and most importantly on staging.

tayambamwanza commented 5 years ago

Hey @d3lm no stress we all have so much on our plates. Just glad that you have some time for this again. As far as I know I'm happy with this so go ahead. :+1:

d3lm commented 5 years ago

Alright, thanks. I ll look at the code and give it a spin on staging.

d3lm commented 4 years ago

Sooooo, finally found some time to look at this. At first glimpse it looks great. But it's not finished right? Cause the automatic updates are not working and I am also wondering if the logic for when the app is stable is needed to make it more reliable or if the latest and greatest is somewhat reliable by default. @tayambamwanza Curious to hear your thoughts on this. I would also suggest that you finish up this PR and then I ll give it a spin on develop / staging. How does that sound?

tayambamwanza commented 4 years ago

Sooooo, finally found some time to look at this. At first glimpse it looks great. But it's not finished right? Cause the automatic updates are not working and I am also wondering if the logic for when the app is stable is needed to make it more reliable or if the latest and greatest is somewhat reliable by default. @tayambamwanza Curious to hear your thoughts on this. I would also suggest that you finish up this PR and then I ll give it a spin on develop / staging. How does that sound?

Glad to hear you're taking time to look at this again, a lot's changed since I made this plull request, an individual wrote a service which does the pwa features but also added a splash screen component, that displays while the app is initially checking for service worker updates, I've really enjoyed using, I don't know if you want to see the implementation? I'm using it as a module so I can just drop it in and you can have a look, is angular checklist a universal app?

d3lm commented 4 years ago

But a PWA already has a splash screen, right?

For the module you mentioned, you can definitely show me the implementation and I ll have a look. Not sure if we need all that tho. I mean a basic PWA setup would suffice. By basic I mean all essential features, such as fail-safe (in case something goes wrong with the SW), automatic updates, icons for different devices, and a splash screen. Did I forget something?

Yes, the Checklist is a Universal app. However, it's pre-rendered statically at build-time.

d3lm commented 2 years ago

Hey again 👋 I just wanted to check if we want to move forward with this? Otherwise I'd either close this PR because it's been a while and there was no activity or we can get this merged. Thought, I'd like to update this project to Angular v13 first and maybe then we can convert this into a PWA. WDYT?

tayambamwanza commented 2 years ago

@d3lm thanks, good idea, I think do Angular 13 update first, I actually have a custom button component for this now so will use that, but you can close this and I will open a new issue in the future.