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

core(renderer): do not attempt fireworks for devtools #7090

Merged
merged 2 commits into from
Jan 28, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions lighthouse-core/report/html/renderer/report-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,14 @@ class ReportRenderer {
}

// Fireworks
const scoresAll100 = report.reportCategories.every(cat => cat.score === 1);
if (scoresAll100) {
headerContainer.classList.add('score100');
this._dom.find('.lh-header', headerContainer).addEventListener('click', _ => {
headerContainer.classList.toggle('fireworks-paused');
});
if (!this._dom.isDevTools()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this a pavel-reaction undoing? 😆

or do we just not want to deal with the differences right now getting it to work in a smaller header?

Copy link
Collaborator Author

@connorjclark connorjclark Jan 24, 2019

Choose a reason for hiding this comment

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

we are brushing up on the release deadline for next chrome, so quick is good, and I just wanted to toss in the same hotfix here. but also we don't even have a design for fireworks in DT. @exterkamp should totes look into that

Copy link
Member

Choose a reason for hiding this comment

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

I like this more simply as

if (!this._dom.isDevTools() && scoresAll100) {

to be more flat, but it wfm either way.

const scoresAll100 = report.reportCategories.every(cat => cat.score === 1);
if (scoresAll100) {
headerContainer.classList.add('score100');
this._dom.find('.lh-header', headerContainer).addEventListener('click', _ => {
headerContainer.classList.toggle('fireworks-paused');
});
}
}

if (scoreHeader) {
Expand Down