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: lingo cleanup, visual cleanup, remove redundant messaging #1598
Conversation
@@ -153,9 +153,9 @@ <h2 class="config-section__title">Blocked URL Patterns</h2> | |||
<li class="subitem {{#if subItem.comingSoon}}--coming-soon{{/if}} {{#if (shouldShowHelpText subItem.score)}}--show-help{{/if}}"> | |||
|
|||
<p class="subitem__desc"> | |||
{{#unless ../../scored }} | |||
<!--{{#unless ../../scored }} |
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 left this in for now in case we want to bring it back some day. Also left the category in each audit.
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.
leaving category in is fine, I'm sure #1463 will have something to say about it anyways, but I'd say just delete this. We definitely don't want.
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.
Big improvement. I personally find the word choice a lot clearer in correspondence between ✘/✓ and audit description and avoiding double negatives, but it would be good to get everyone else's opinion on the change.
@@ -57,7 +57,7 @@ class ManifestDisplay extends Audit { | |||
rawValue: hasRecommendedValue, | |||
displayValue | |||
}; | |||
if (!hasRecommendedValue) { | |||
if (manifest && !hasRecommendedValue) { |
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 can't see this in your screenshot, but don't we want to keep this check so that if there wasn't a manifest it won't display Manifest display property should be set
?
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.
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.
oh, my brain is broken. Somehow I thought the diff was the reverse.
@@ -42,8 +42,7 @@ class ManifestIconsMin144 extends Audit { | |||
|
|||
if (icons.doExist(manifest) === false) { | |||
return ManifestIconsMin144.generateAuditResult({ | |||
rawValue: false, | |||
debugString: 'WARNING: No icons found in the manifest' | |||
rawValue: false |
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.
maybe remove the giant WARNING
from the debugString
below while you're fixing these?
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.
done
@@ -45,8 +45,7 @@ class ManifestIconsMin192 extends Audit { | |||
|
|||
if (icons.doExist(manifest) === false) { | |||
return ManifestIconsMin192.generateAuditResult({ | |||
rawValue: false, | |||
debugString: 'WARNING: No icons found in the manifest' | |||
rawValue: false |
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.
same thing with WARNING
below
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.
done
helpText: 'Remove unused rules from stylesheets to reduce unnecessary ' + | ||
'bytes consumed by network activity. [Learn more](https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery)', | ||
'bytes consumed by network activity. ' + |
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.
why did this line change?
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.
it was over 100 chars
lighthouse-core/audits/viewport.js
Outdated
@@ -27,7 +27,7 @@ class Viewport extends Audit { | |||
return { | |||
category: 'Mobile Friendly', | |||
name: 'viewport', | |||
description: 'HTML has a `<meta name="viewport">` tag containing `width` or `initial-scale`', | |||
description: 'Page contains a `<meta name="viewport">` tag with `width` or `initial-scale`', |
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.
if switching from HTML
to Page
that means tag
should become element
:)
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.
done
@@ -45,10 +45,6 @@ class Manifest extends Gatherer { | |||
let errorString; | |||
if (response.url) { | |||
errorString = `Unable to retrieve manifest at ${response.url}`; | |||
} else { | |||
// The driver will return an empty string for url and the data if |
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.
maybe retain comment above if (response.url) {
?
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.
done
@@ -153,9 +153,9 @@ <h2 class="config-section__title">Blocked URL Patterns</h2> | |||
<li class="subitem {{#if subItem.comingSoon}}--coming-soon{{/if}} {{#if (shouldShowHelpText subItem.score)}}--show-help{{/if}}"> | |||
|
|||
<p class="subitem__desc"> | |||
{{#unless ../../scored }} | |||
<!--{{#unless ../../scored }} |
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.
leaving category in is fine, I'm sure #1463 will have something to say about it anyways, but I'd say just delete this. We definitely don't want.
Well, while we're on the topic, since you removed "site", why not also remove "page"? LH always and only audits the current page, no? So using "page" implies some distinction that does not exist. |
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.
we're using "Avoids" instead of "Page avoids", so i'm thinking we should drop "Page" as well and go verb-first.
"Has a <viewport>
with ..."
"Opens external links with rel..."
"Uses HTTP/2 for its own resources"
"Has optimized images"
"Uses passive listeners..."
wdyt?
@@ -34,7 +34,7 @@ class LinkBlockingFirstPaintAudit extends Audit { | |||
return { | |||
category: 'Performance', | |||
name: 'link-blocking-first-paint', | |||
description: 'Site does not use <link> that delay first paint', | |||
description: 'Avoids `<link>` that delay first paint', |
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.
does this description also go through marked
now?
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.
you got it.
Dropping |
@@ -33,7 +33,7 @@ class Deprecations extends Audit { | |||
return { | |||
category: 'Deprecations', | |||
name: 'deprecations', | |||
description: 'Site does not use deprecated APIs', | |||
description: 'Avoids deprecated APIs', |
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'm all for nixing Site
, but Avoids
strikes me as vaguer than Does not use
. I suggest s/Avoid/Does not use/ throughout.
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.
The complaint we've been getting (and which this PR tries to address) is that "not" in "X" Does not use....
is confusing. The "X" icon + "not" appear to folks as a double negative.
I also think there could be something better than "avoids" . Any suggestions?
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.
Ah, OK. Hm... Well, we could drop the verb... E.g. Deprecated APIs
. Else it might require inversing the titles... E.g. Uses Up-To-Date APIs
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.
Yeah... given the constraints of the current UI, I don't see a better alternative to avoid
! Although something doesn't sit well with me about it.
Rides off grumbling into the sunset
K. Dropped "page" from the audit's that use positive assertions in their descriptions |
@@ -33,7 +33,7 @@ class ScriptBlockingFirstPaint extends Audit { | |||
return { | |||
category: 'Performance', | |||
name: 'script-blocking-first-paint', | |||
description: 'Site does not use <script> in head that delays first paint', | |||
description: 'Avoids `<script>` in head that delay first paint', |
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.
Why delay? <script>
is singular or referential to the idea of script, no?
"Avoids script in head that delays first paint" or
"Avoids scripts in head that delay first paint"
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 read "Avoids <script> in head...
as "Avoids scripts in head....", but I'll change it back to "Avoids <script>
in head that delays first paint"
maybe clean up the accessibility audits |
The |
actually maybe the whole |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
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.
these edits are so good. thanks!
I'll do the a11y cleanup in another pr |
R: all
Users get confused when an audit description says "Site does not use x API..." and there's a red "X" for the audit result. "X" means the audit failed, but the double negative is confusing. I've heard the complaint a few times in the last couple of days and decided to fix it.
This PR changes the lingo we use in the report to be consistent throughout:
Before:
Now: