FXVPN-337 Return of the loading screen #180
Open
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.
If you look closely on the Screen Recording Shared with QA, you see the Red dot on the Icon not appearing for quite a while.
This indicates firefox takes it's time inizializing the background script.
You can easily replicate that by dropping
await new Promise((r) => setTimeout(r, Math.round(Math.random() * 5000)));
somewhere inmain::init()
.Currently if we open the message port before the background script is done inizializing we are screaming into the void.
Sooo, let's allow ipc.js to close and re-open ports if there is noone answering on the other side.
For that ofc we need to show "Something" so i'm bringing back the loading screen we added and then removed. 🙈
Here is a demo with a random delay.