-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Store state of lighthouse in extension while running. #1185
Conversation
When extension popup is closed & lighthouse is still running we show the state lighthouse is running in instead of showing the startup screen.
e5a0776
to
3ac3baa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
@@ -128,6 +128,10 @@ document.addEventListener('DOMContentLoaded', _ => { | |||
return frag; | |||
} | |||
|
|||
if (background.isRunning()) { | |||
startSpinner(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not super familiar with the code here, but i'm assuming we're already stopping the spinner everywhere we need to? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes whenever runner fails promise then or catch than we do a stopSpinner. Not sure if Start and Stop spinner is still a good name for it. Maybe something a long the lines of showProcessPage or just showProcess?
@@ -213,7 +227,20 @@ window.loadSelectedAggregations = function() { | |||
}; | |||
|
|||
window.listenForStatus = function(callback) { | |||
log.events.addListener('status', callback); | |||
log.events.addListener('status', function(args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe just log
or something other than args
? staring at it a bit assuming it was a list ala arguments
and not just the one input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks :) sounds better indeed 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally. Really great addition!
This is killer. nice work @wardpeet |
When extension popup is closed & lighthouse is still running we show the state lighthouse is running in instead of showing the startup screen.
![schermopname](https://cloud.githubusercontent.com/assets/1120926/21368356/9a8e313a-c702-11e6-9de4-29416f7b2c4b.gif)