Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Check for new Fether release & prompt user on startup#427

Merged
ltfschoen merged 5 commits intomasterfrom
ac-fether-update
Feb 23, 2019
Merged

Check for new Fether release & prompt user on startup#427
ltfschoen merged 5 commits intomasterfrom
ac-fether-update

Conversation

@axelchalon
Copy link
Contributor

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.

</Router>
<Modal
title='New version available'
description={`${this.state.newRelease.name &&
Copy link
Contributor

@ltfschoen ltfschoen Feb 17, 2019

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@ltfschoen ltfschoen Feb 21, 2019

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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!

Copy link
Contributor

@ltfschoen ltfschoen left a comment

Choose a reason for hiding this comment

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

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

Copy link
Collaborator

@Tbaut Tbaut left a comment

Choose a reason for hiding this comment

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

awesome, I tested the same way Luke did, by changing the version in the severalpackage.json and lerna.json it's working well :)

@axelchalon axelchalon requested a review from ltfschoen February 20, 2019 15:22
Copy link
Contributor

@ltfschoen ltfschoen left a comment

Choose a reason for hiding this comment

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

I've made one final comment suggesting changes since when newRelease.name is undefined then it'll display "undefined was released!"

@Tbaut
Copy link
Collaborator

Tbaut commented Feb 22, 2019

Are you good with the changes @ltfschoen? Please ✔️ and merge if so.

@ltfschoen ltfschoen merged commit 5ceb26d into master Feb 23, 2019
@ltfschoen ltfschoen deleted the ac-fether-update branch February 23, 2019 15:07
@Tbaut Tbaut mentioned this pull request Feb 25, 2019
6 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prompt users for a new releases with a link (update Fether)

3 participants