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

Updated report styles #2297

Merged
merged 13 commits into from
Jul 19, 2017
Merged

Updated report styles #2297

merged 13 commits into from
Jul 19, 2017

Conversation

chowse
Copy link
Contributor

@chowse chowse commented May 18, 2017

Updated the Lighthouse report's styling to better match the DevTools UI (with options to restyle it using CSS variables).

@paulirish
Copy link
Member

Before and after

image

@chowse
Copy link
Contributor Author

chowse commented May 18, 2017

I'm using a 12px baseline font for this design. For the standalone report, I'd prefer to use a 14px baseline (should only require tweaking a few CSS variables). Just let me know how we'll differentiate a DevTools- and CLI-generated report and I can make the adjustments.

@paulirish
Copy link
Member

paulirish commented May 18, 2017

Just let me know how we'll differentiate a DevTools- and CLI-generated report

@chowse we have .lh-devtools on the lh-root container in devtools.

Also the .lh-narrow i mentioned before? It's only applied in standalone report. So probably not as useful as I indicated before. :)

@patrickhulce
Copy link
Collaborator

Also the .lh-narrow i mentioned before? It's only applied in standalone report. So probably not as useful as I indicated before. :)

Adding it to devtools is just a few line change though if we need it

@paulirish
Copy link
Member

And fwiw here's this PR applied within devtools:

image

@chowse
Copy link
Contributor Author

chowse commented May 18, 2017

The same report without the dense DevTools styling:

image

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

looks reaaaaaal nice 👌


const sparklineBarEl = this._dom.find('.lh-sparkline__bar', tmpl);
sparklineBarEl.style.width = `${audit.result.rawValue / scale * 100}%`;
/*
Copy link
Collaborator

Choose a reason for hiding this comment

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

leftover comment?

passedSummary.textContent = `View ${elements.length} passed items`;
const passedElem = this._renderAuditGroup({
title: `${elements.length} Passed Audits`,
description: '',
Copy link
Collaborator

Choose a reason for hiding this comment

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

can probably just not set this now that we've made it optional

}
const nonPassedElem = this._renderAuditGroup({
title: `${nonPassedAudits.length} failed audits`,
description: '',
Copy link
Collaborator

Choose a reason for hiding this comment

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

same

padding-left: var(--expandable-indent);
}

.lh-audit-group[open] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this have any content?

@@ -639,24 +750,20 @@ span.lh-node:hover {
}

.lh-category .lh-audit {
margin-left: calc(var(--default-padding) * 2);
Copy link
Collaborator

Choose a reason for hiding this comment

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

are none of these rules needed anymore then?

--inset-size: calc(var(--circle-size) - var(--circle-border-width));
--circle-background: #ccc;
--circle-border-width: 2px;
--inset-size: calc(var(--circle-size) - 2* var(--circle-border-width));
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: 2 *

@paulirish
Copy link
Member

one thing I lose from the previous design is the green encoding of the passing group

image

in this view i'd love to more clearly see that we do have passing items in the group there.. maybe two overlapping green checks on the right of "8 Passed Audits" ?

@evenstensberg
Copy link
Contributor

I can submit a fix to #2385 once this gets merged

@GoogleChrome GoogleChrome deleted a comment from googlebot Jun 22, 2017
@brendankenny
Copy link
Member

@paulirish do you have a sense of remaining things to resolve? Can we make a list?

@paulirish
Copy link
Member

Yah. I have a branch pushed with some more work. I'll prep a list of remaining work tonight.

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.

A bit delayed but we're ready to add this in!

Thanks @chowse for all the work!

On top of this goes #2706

@paulirish paulirish merged commit a9867d5 into GoogleChrome:master Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants