-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
report: updates for devtools roll #5326
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
22b9565
short header for devtools
paulirish 5f1b788
whitespace tweaks.
paulirish a6c3c66
add margin on top
paulirish e8a9ecc
cleanup of displayValue
paulirish ddaa310
data tables can go narrow. tooltips stay on screen.
paulirish e074cba
sample json
paulirish e62e292
feedback. sticky. isDevTools
paulirish 2771b95
naming feedback.
paulirish 7681ff6
css sizing of table columns. gonna write a blog post about you.
paulirish a8c26ec
brendan feedback
paulirish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,13 @@ class DOM { | |
return this._document; | ||
} | ||
|
||
/** | ||
* @return {boolean} | ||
*/ | ||
isDevTools() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a TODO (maybe here?) for the future DT override cleanup? |
||
return !!this._document.querySelector('.lh-devtools'); | ||
} | ||
|
||
/** | ||
* Guaranteed context.querySelector. Always returns an element or throws if | ||
* nothing matches query. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,10 @@ | |
--lh-audit-group-vpadding: 8px; | ||
--lh-section-vpadding: 12px; | ||
--chevron-size: 12px; | ||
|
||
/* Voodoo magic here to get narrow columns. 0 doesn't size the column like our friend 1px does */ | ||
--bytes-col-width: 1px; | ||
|
||
--pass-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><title>check</title><path fill="hsl(139, 70%, 30%)" d="M24 4C12.95 4 4 12.95 4 24c0 11.04 8.95 20 20 20 11.04 0 20-8.96 20-20 0-11.05-8.96-20-20-20zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z"/></svg>'); | ||
--average-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><title>info</title><path fill="hsl(31, 100%, 45%)" d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 30h-4V22h4v12zm0-16h-4v-4h4v4z"/></svg>'); | ||
--fail-icon-url: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><title>warn</title><path fill="hsl(1, 73%, 45%)" d="M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z"/></svg>'); | ||
|
@@ -93,8 +97,8 @@ | |
--caption-font-size: 11px; | ||
--caption-line-height: 14px; | ||
--default-padding: 12px; | ||
--section-padding: 16px; | ||
--section-indent: 16px; | ||
--section-padding: 12px; | ||
--section-indent: 8px; | ||
--audit-group-indent: 16px; | ||
--audit-indent: 16px; | ||
--expandable-indent: 16px; | ||
|
@@ -105,7 +109,6 @@ | |
--lh-section-vpadding: 8px; | ||
} | ||
|
||
|
||
@keyframes fadeIn { | ||
0% { opacity: 0;} | ||
100% { opacity: 0.6;} | ||
|
@@ -610,6 +613,10 @@ | |
z-index: 2; | ||
will-change: transform; | ||
} | ||
.lh-header-plain { | ||
margin-top: var(--section-padding); | ||
} | ||
|
||
.lh-header-container { | ||
display: block; | ||
margin: 0 auto; | ||
|
@@ -696,6 +703,11 @@ | |
background-color: var(--fail-color); | ||
} | ||
|
||
/* Hide category score gauages if it's a single category report */ | ||
.lh-header--solo-category .lh-scores-wrapper { | ||
display: none; | ||
} | ||
|
||
|
||
.lh-categories { | ||
width: 100%; | ||
|
@@ -819,8 +831,6 @@ summary.lh-passed-audits-summary { | |
.lh-table { | ||
--image-preview-size: 24px; | ||
border-collapse: collapse; | ||
|
||
--url-col-max-width: 450px; | ||
} | ||
|
||
.lh-table thead { | ||
|
@@ -854,7 +864,13 @@ summary.lh-passed-audits-summary { | |
text-align: left; | ||
min-width: 250px; | ||
white-space: nowrap; | ||
max-width: var(--url-col-max-width); | ||
max-width: 0; | ||
} | ||
|
||
/* Keep bytes columns narrow if they follow the URL column */ | ||
.lh-table-column--url + th.lh-table-column--bytes, | ||
.lh-table-column--url + .lh-table-column--bytes + th.lh-table-column--bytes { | ||
width: var(--bytes-col-width); | ||
} | ||
|
||
.lh-table-column--code { | ||
|
@@ -938,13 +954,22 @@ summary.lh-passed-audits-summary { | |
position: absolute; | ||
display: none; /* Don't retain these layers when not needed */ | ||
opacity: 0; | ||
|
||
background: #ffffff; | ||
min-width: 23em; | ||
min-width: 246px; | ||
max-width: 275px; | ||
padding: 15px; | ||
border-radius: 5px; | ||
text-align: initial; | ||
} | ||
/* shrink tooltips to not be cutoff on left edge of narrow viewports | ||
45vw is chosen to be ~= width of the left column of metrics | ||
*/ | ||
@media screen and (max-width: 535px) { | ||
.tooltip { | ||
min-width: 45vw; | ||
padding: 3vw; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. feels a bit weird to scale the padding as well, looks pretty good though so 👍 |
||
} | ||
} | ||
|
||
.tooltip-boundary:hover { | ||
background-color: #F8F9FA; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
keep the 'were'?
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.
I deliberately omitted it for brevity. If it were a sentence i'd keep 'were' but it's just a lil string on the end of the line. wdyt
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.
I don't care much, but it is a little weird since the audit touched above keeps the verb :)