Feature: Progress bar for download of Specter binary in Electron #2257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The download of the Specter binary (specterd) can take several minutes. To improve the UX of this lengthy process, this PR implements a progress bar of the download.
Architectural / UI choices:
This makes a lot of sense for our use case, since the user cannot do anything else before specterd is downloaded.
This choice led to the need to implement a Force Quit menu item in the dock for MacOS, since the default Quit item cannot be changed or replaced and it doesn't trigger the "before-quit" event if a child window is still open on MacOS. The
Force Quit during download
item gives the (MacOS) user the opportunity to also quit the app from the dock. The item disappears again if the download is finished.Note: Main.js should be made much more modular and the download code should probably be seperated out to a dedicated file. This should be done in a different PR, though, since this feature should ideally be available asap.
Visuals
Startup
Screen.Recording.2023-02-24.at.15.20.03.mov
Download finished
Screen.Recording.2023-02-24.at.15.27.52.mov
Dock
Screen.Recording.2023-02-23.at.19.57.05.mov
Logging of the download progress