Check for new Fether release & prompt user on startup#427
Conversation
packages/fether-react/src/App/App.js
Outdated
| </Router> | ||
| <Modal | ||
| title='New version available' | ||
| description={`${this.state.newRelease.name && |
There was a problem hiding this comment.
change to this.state.newRelease && this.state.newRelease.name && this.state.newRelease.name
or if you add const { newRelease } = this.state; to the render method then change the value of this line to newRelease && newRelease.name && newRelease.name
There was a problem hiding this comment.
if newRelease.name is undefined, then it'll display "undefined was released!".
perhaps we should change this to the following, which doesn't show the description if the release doesn't have a name, but the user still knows there's a new version available since it still displays "New version available" that prompts them to click the link and view the releases page:
description={newRelease && newRelease.name
? `${newRelease && newRelease.name} was released!`
: ''
}
apart from that, no further issues, LTGM
There was a problem hiding this comment.
We have visible={newRelease && !newRelease.ignore} just after so we're assured that if the modal shows up, then newRelease is true-ish (and if newRelease is true-ish then newRelease.name is defined) ; made a change all the same!
packages/fether-react/src/assets/sass/components/_alert-screen.scss
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
LGTM, but i've left some comments requesting some changes
FYI Below are the QA steps I followed:
- Checked that works when user has older version with new installation. Replicated as follows:
-
Change "version" in package.json, and fether-react/package.json, and fether-electron/package.json to "0.1.0"
-
Delete Fether development version installation and settings
rm -rf ~/Library/Application Support/Electron -
Show tags
git tag -l; -
Switch to branch ac-fether-update
git checkout master git pull --rebase origin master; git fetch origin ac-fether-update:ac-fether-update; git checkout ac-fether-update; git merge master; -
Start Fether Method 1
yarn; yarn electron; -
Start Fether Method 2
yarn; yarn start; -
Note: If the user clicks "Download" it takes them to https://github.com/paritytech/fether/releases/tag/v0.2.0-beta
-
Checked that it works when building and running a production release on macOS
-
ltfschoen
left a comment
There was a problem hiding this comment.
I've made one final comment suggesting changes since when newRelease.name is undefined then it'll display "undefined was released!"
|
Are you good with the changes @ltfschoen? Please ✔️ and merge if so. |
closes #313
On startup, if there is a GitHub release with a version more recent than the current version, display a modal with a link to the GitHub release.