-
-
Notifications
You must be signed in to change notification settings - Fork 151
Enhancement: UI notification when a new timetagger version is available #573
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
Enhancement: UI notification when a new timetagger version is available #573
Conversation
c30778c to
7c49c97
Compare
- Add pscript routine to fetch latest release version from Github API - Update menu dialog to display new release info & link to new release
- shows red notification dot in `Whats new` section when new version available
- Shows notification dot on hamburger menu when new release available
7c49c97 to
75f234d
Compare
|
Have you also seen the similar logic in |
|
@almarklein thanks for the note. I've taken a look at the code you referenced in My PR on the other hand is for release notifications, telling users that a new release is available and that they should update the deployment. These are complementary features, not overlapping ones: My PR notifies users to update their deployment to the latest version. The service worker code ensures that PWA content is propagated to user's end devices, when new releases are deployed. |
|
The callback on 'controllerchange' serves a different purpose, but the lines further down, below "// Auto-update each several hours" are there to check for updates, so that when a user never refreshes, it happens automatically. Your method is better, so I'd like to use that instead. But then let's disable the lines in |
|
I might still be missing something, but I still believe my point from earlier still stands:
The existing service worker logic in My PR on the other hand, just checks whether there exists a new timetagger version on github, and reminds users to update their self-hosted deployment. Again, I believe the existing service worker logic is complementary to my additions, and doesn't need cleaning up. On the contrary, it still offers the same helpful functionality as it did before - making sure that after a server update the clients update their PWA assets. ...Admittedly, I might be misunderstanding your point, in which case please let me know! Maybe I'm just missing something about how the service worker logic works...? But as far as I can tell, it does not check for new available releases for the timetagger server, like my PR does... |
Ah, that's the point I was missing. Thanks for the clarification! |
Summary
This PR notifies users in the UI about new release versions. For that, the frontend queries the public Github API for the latest release tag of the
timettagerproject.If the current release tag does not match the latest release tag, a notification-dot appears on the hamburger menu button, inviting the user to open the menu. Inside the app menu the
Whats new...section also sports notification-dot, and explicitly informs the user about the new available version.The change gracefully handles network errors when querying the github API. If the latest release version cannot be fetched, the application simply behaves as usual.
Screenshots
Changes
tools.py)window.latest_release_versionfor UI comparisonfront.py)_draw_button()to draw notification dot on canvas when update availabledialogs.py).icon-wrapperwhen notification neededapp.scss)_style_embed.scss,front.py)$notificationSCSS variable andCOLORS.notification_dotconstant