-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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: make v5 renderer compatible with v3 and v4 LHRs #8822
Conversation
@@ -61,9 +61,6 @@ class DetailsRenderer { | |||
case 'screenshot': | |||
case 'debugdata': | |||
return null; | |||
// Fallback for old LHRs, where no type meant don't render. | |||
case undefined: | |||
return null; |
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.
moved into util.prepareReportResult()
so all the backwards compat stuff is in one place
@@ -62,24 +64,45 @@ class Util { | |||
if (!clone.configSettings.locale) { | |||
clone.configSettings.locale = 'en'; | |||
} | |||
Util.setNumberDateLocale(clone.configSettings.locale); |
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 are just rearranged so backward compatibility stuff, report locale setting, and smooshing aren't all interleaved
i've been seeing these but wasn't sure the source issue. what switch you talkin about? |
switching from our old displayValue string replacement to the i18n ICU message version, I believe |
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.
LGTM
actually, I guess this is at least a limited issue for LHRs up until 4.0 when #6767 landed and finished off the old It's just 3.1 where the perf section moved to the modern i18n system and so the above the fold content is correct from then on. We could add the old |
fixes #8598
In addition to the
diagnostic
->debug
update that needed to be done, #8299 also meant we needed to update the <5.0 filmstrip screenshots to be able to render in the report.Tested LHRs back to 3.1, everything is 👍 .
However: turns out even the 3.1 viewer isn't compatible with 3.0 LHRs because of the i18n switch. Not sure what we want to do about that, though at least 5.0 isn't a regression on this front :)
https://googlechrome.github.io/lighthouse/viewer/?gist=86d005fa4297bdefacd01b7228ab47fa