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

fix: Fresh sync shows blank screen #417

Merged
merged 5 commits into from
Feb 11, 2019
Merged

fix: Fresh sync shows blank screen #417

merged 5 commits into from
Feb 11, 2019

Conversation

amaury1093
Copy link
Collaborator

@amaury1093 amaury1093 commented Feb 9, 2019

To test:

  • Fresh install rm -rf ~/Library{Application Support/{io.parity.ethereum | Electron | fether}
  • yarn electron

On master, #416 introduced a bug where, on fresh launch, a blank screen was shown (because of these lines).

This PR basically just replaces this null with a RequireHealthOverlay.

Moreover, <Health> and <HealthModal> (both can be rendered before api is defined) use light.js's chainName$ when syncing/synced, but we only allow calling this method when the api is connected.

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 been able to replicate the issue by running rm -rf ~/Library/Application\ Support/fether/ && rm -rf ~/Library/Application\ Support/Electron/.
    Where is that information stored in Linux and Windows so I can test it there too?

  • It works great if it doesn't run the "if statement" when isFirstRun is true. But if I comment out the code if (isFirstRun) { so it runs the code in that if statement (i.e. pretending that it's the first time I've run it), and then open Developer Tools and open it in Full Screen so I can choose the Application tab and clear Local Storage, then when I run yarn electron when it opens the Terms of Use page the "Accept" button doesn't work when I click it (not even after Parity Ethereum has downloaded).
    Also, why is it storing paritylight::firstRun with a value of false even though I've deleted everything in those directories and cleared local storage? Shouldn't it be recognising that it's my first run? (sorry haven't had time to investigate this myself yet)

  • Additionally, when I was testing, somehow I managed to get to the Accounts page, and when it showed Downloading Parity Ethereum... (100%) using the component (instead of the overlay) at 100% it caused that message to shift over to a new line (instead of on the same line as the small health icon (since 100 has one more character than 99).

@amaury1093
Copy link
Collaborator Author

amaury1093 commented Feb 10, 2019

I've been able to replicate the issue by running rm -rf ~/Library/Application\ Support/fether/ && rm -rf ~/Library/Application\ Support/Electron/. Where is that information stored in Linux and Windows so I can test it there too?

See appData here https://github.com/electron/electron/blob/master/docs/api/app.md#appgetpathname

the "Accept" button doesn't work when I click it

This is an expected behavior when you remove the line if (isFirstRun) {

Also, why is it storing paritylight::firstRun with a value of false even though I've deleted everything in those directories and cleared local storage? Shouldn't it be recognising that it's my first run? (sorry haven't had time to investigate this myself yet)

hmm, that's weird. Normally, if you run localStorage.clear(), then refresh the page, you should have paritylight::firstRun set to true. Once you click on the Accept button, paritylight::firstRun is set to false.

Side note: a better name for isFirstRun might actually be hasAcceptedT&C

(i.e. pretending that it's the first time I've run it)

The best way to achieve that is to do localStorage.clear() and refresh.

that message to shift over to a new line

Fixed, thanks.

Copy link
Contributor

@axelchalon axelchalon left a comment

Choose a reason for hiding this comment

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

Works well!

@amaury1093 amaury1093 merged commit 08fa743 into master Feb 11, 2019
@amaury1093 amaury1093 deleted the am-fix-fresh-sync branch February 11, 2019 15:41
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.

3 participants