Skip to content
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

Update extension badge text when LH is running #1367

Merged
merged 4 commits into from
Jan 4, 2017
Merged

Update extension badge text when LH is running #1367

merged 4 commits into from
Jan 4, 2017

Conversation

ebidel
Copy link
Contributor

@ebidel ebidel commented Dec 30, 2016

R: @paulirish @wardpeet all

This expands on #1185 by updating the tooltip and badge text when LH is testing a page. Makes it more obvious something is going on if the popup has been dismissed.

screen shot 2016-12-30 at 3 20 46 pm

screen shot 2016-12-30 at 3 20 52 pm

@@ -90,17 +109,16 @@ window.runLighthouseForConnection = function(connection, url, options, requested
// Add url and config to fresh options object.
const runOptions = Object.assign({}, options, {url, config});

lighthouseIsRunning = true;
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer to keep the explicit lighthouseIsRunning = true; inline here and below but call a updateBadgeUI() immediately after each.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

function updateBadgeUI(optUrl) {
if (window.chrome && chrome.runtime) {
const manifest = chrome.runtime.getManifest();
const title = optUrl ? `Testing ${optUrl}` : manifest.browser_action.default_title;
Copy link
Member

Choose a reason for hiding this comment

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

now we can use lighthouseIsRunning for these conditionals. that work for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

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

ace. thx!

@ebidel ebidel merged commit 71b633f into master Jan 4, 2017
@ebidel ebidel deleted the badgetext branch January 4, 2017 02:38
@wardpeet
Copy link
Collaborator

wardpeet commented Jan 4, 2017

thanks for merging, sorry wasn't available:)

andrewrota pushed a commit to andrewrota/lighthouse that referenced this pull request Jan 13, 2017
* Update extension badge text when LH is running

* feedback

* update method name

* Use lighthouseIsRunning var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants