Skip to content

Check for IDE update at startup #797

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

Merged
merged 59 commits into from
Feb 15, 2022
Merged

Check for IDE update at startup #797

merged 59 commits into from
Feb 15, 2022

Conversation

AlbyIanna
Copy link
Contributor

Why

We want to let the user be informed when a newer version of the Arduino IDE is available, and if that is the case let them download and install it.

How

  • we use electron-updater to check if a newer version is available at every IDE start-up
  • when a newer version is available, we open a dialog with the update information and provide an option to download the update or not, or even skip this version entirely so that the dialog won't show up again until the next update
  • when a newer version is downloaded, the user can restart the application to apply the new changes, or just close the window; in the last case, the changes will be applied at the next start-up
  • it is possible to stop the download if it's not finished yet
  • to show what are the changes between the current version installed on the user machine and the latest one, we download a MarkDown file containing the release notes of every version and then remove the notes referring to older versions; we then make use of react-markdown in order to render the MarkDown text nicely in HTML
  • to remember if the user has skipped the latest version, we keep a value on the local storage ("skipIDEVersion") containing the last version they skipped

@per1234 per1234 linked an issue Feb 2, 2022 that may be closed by this pull request
@per1234 per1234 added the topic: code Related to content of the project itself label Feb 2, 2022
Comment on lines 87 to 88
enum: ['latest', 'nightly', 'none'],
default: 'none',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none means the IDE won't check for updates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now the channel is hard-coded, but I'm about to make a change to make use of this setting to know which channel to use when checking for updates.

I think I'll change this code like this:

Suggested change
enum: ['latest', 'nightly', 'none'],
default: 'none',
enum: ['latest', 'nightly'],
default: 'latest',

so that by default the user will check for the latest release. I'd remove none because it doesn't make any sense to me. Do you agree?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's perfect.

@per1234 per1234 self-requested a review February 2, 2022 14:49
msujew and others added 7 commits February 9, 2022 17:24
# Conflicts:
#	arduino-ide-extension/src/electron-main/theia/electron-main-application.ts
…te-startup

# Conflicts:
#	browser-app/package.json
#	electron/build/template-package.json
#	electron/packager/config.js
#	yarn.lock
@per1234 per1234 dismissed their stale review February 11, 2022 19:10

Suggested changes have all been resolved. I'll submit another review once the build is ready for testing.

@AlbyIanna AlbyIanna merged commit f660058 into main Feb 15, 2022
@AlbyIanna AlbyIanna deleted the check-update-startup branch February 15, 2022 17:01
@fstasi
Copy link
Contributor

fstasi commented Feb 15, 2022

we did some internal tests and seems to be working fine. Merging to proceed with tests on the nightly build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check for updates on startup
5 participants