synnax icon indicating copy to clipboard operation
synnax copied to clipboard

Version dialog

Open emilbon99 opened this issue 10 months ago • 0 comments

The version display and update system we have right now in Delta is rudimentary. There are two issues:

  1. We use the built in Tauri auto-updater, which raises a dialog that blocks the UI interactivity until the user acknowledges it. This is dangerous if it occurs during test operations.
  2. The built in dialog doesn't match the Synnax aesthetic.

So, in order to improve the dialog, I'd like to augment the version indicator displayed in the bottom right corner to automatically check for an download updates. I'd also like the indicator to show some sort of status when a new version of the software is available. Then, the user should be able to click on the indicator to see a dialog with the following info:

  1. The latest version available, with a link to the release notes.
  2. A bar showing the update installation progress.
  3. A button that allows the user to relaunch the application when the update has finished installing.

Al

Steps for Success

All of the files you need for this ticket are held inside the delta/src/version folder.

  1. Add a new effect to the useLoadTauri hook inside tauriVersion.ts that runs the tauri checkForUpdate function on a configurable interval. API for function available here. Use a reasonable default interval (maybe 30 sec?).
  2. Add a new boolean field to the redux version slice called updateAvailable, and implement an action to set the boolean as well as a selector to query the boolean from the store.
  3. Update the effect configured in the previous effect to set the boolean when an update is available.
  4. Update the version badge in Badge.tsx to use the selector you configured in step #2, changing the style of the badge when a new update is available.

Once you've finished this, we can talk about next steps.

From SyncLinear.com | SY-129

emilbon99 avatar Aug 27 '23 14:08 emilbon99