-
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(psi): retire prepareLabData, reuse standard report rendering #13229
Conversation
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.
lovely PR
(not sure when @connorjclark will be back but feel free to disregard the LGTM if you'd rather wait for his check)
/** | ||
* @param {Document} doc | ||
*/ | ||
function getRenderer(doc) { |
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.
any reason for this to be a function? just going for a regular
const dom = new lighthouseRenderer.DOM(reportContainer.ownerDocument);
const renderer = new lighthouseRenderer.ReportRenderer(dom);
seems more straightforward
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 am mirroring some internal impl structure used elsewhere. ;)
thats why this indirection is added. :)
report/test/clients/bundle-test.js
Outdated
// Check that the report exists and has some content. | ||
expect(reportContainer instanceof document.defaultView.Element).toBeTruthy(); | ||
expect(reportContainer.outerHTML.length).toBeGreaterThan(50000); | ||
// fs.writeFileSync('./supp.html', reportContainer.outerHTML, 'utf-8'); |
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.
yah nah?
Co-authored-by: Brendan Kenny <[email protected]>
with v8.6.0 shipped we can now land our breaking report changes.
(legacy) PSI frontend may get updated to 8.6.0 but nothing further.
This PR removes the hacks-upon-hacks that is
prepareLabData()
. Yay for deleting some serious debt. 🎉Now, the faux-psi sample report will adopt the standard report rendering approach currently used by psi-next. But otherwise it has tabs.
With this done, there are a few 'broken' items in faux-psi that I'll be addressing in followups.