Skip to content

Issue 119: Implement toast notification for app updates#153

Merged
RLiNREL merged 5 commits intodevelopfrom
issue-119
Dec 2, 2025
Merged

Issue 119: Implement toast notification for app updates#153
RLiNREL merged 5 commits intodevelopfrom
issue-119

Conversation

@rmroot
Copy link
Copy Markdown
Member

@rmroot rmroot commented Dec 2, 2025

connects #119

This pull request adds support for Progressive Web App (PWA) features to the Angular application, including service worker integration for offline capability and update notifications. It introduces a manifest file for PWA configuration, registers the Angular service worker, and adds UI components and services to notify users when updates are available.

PWA Integration and Service Worker Setup

  • Added @angular/service-worker dependency and registered the service worker in app.module.ts for production builds, using a delayed registration strategy to ensure stability. (package.json [1] src/app/app.module.ts [2] [3]
  • Created ngsw-config.json to configure caching strategies for application files and assets, enabling offline support. (ngsw-config.json ngsw-config.jsonR1-R30)
  • Updated angular.json to include the manifest file in assets and reference the service worker config for production builds. (angular.json [1] [2] [3]

Manifest and PWA Metadata

  • Added manifest.webmanifest with app name, icons, display mode, and start URL for PWA installation and theming. (src/manifest.webmanifest src/manifest.webmanifestR1-R33)
  • Linked the manifest file in index.html to enable browser PWA features. (src/index.html src/index.htmlR21-R26)

Update Notification Feature

  • Implemented UpdateCheckService to listen for service worker updates and periodically check for new versions, triggering update notifications. (src/app/core-components/update-check/update-check.service.ts src/app/core-components/update-check/update-check.service.tsR1-R44)
  • Added UpdateCheckComponent to display a toast notification when an update is available, allowing users to reload the page to apply updates. (src/app/core-components/update-check/update-check.component.ts [1] src/app/core-components/update-check/update-check.component.html [2] src/app/core-components/update-check/update-check.component.css [3]
  • Integrated the update notification component into the main app layout and declared it in the module. (src/app/app.component.html [1] src/app/app.module.ts [2]

Testing

  • Added basic unit tests for the new update check service and component to ensure their creation and integration. (src/app/core-components/update-check/update-check.service.spec.ts [1] src/app/core-components/update-check/update-check.component.spec.ts [2]

@rmroot rmroot requested a review from nbintertech December 2, 2025 14:14
@RLiNREL RLiNREL merged commit d0a5737 into develop Dec 2, 2025
1 check passed
@RLiNREL RLiNREL deleted the issue-119 branch December 2, 2025 15:44
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

Successfully merging this pull request may close these issues.

2 participants