-
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
core(audit): add options param to make{Table,Opportunity}Details #14753
Conversation
@@ -215,12 +228,12 @@ class Audit { | |||
/** | |||
* @param {LH.Audit.Details.Opportunity['headings']} headings | |||
* @param {LH.Audit.Details.Opportunity['items']} items | |||
* @param {number} overallSavingsMs |
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 mandating the time savings for opportunities. I've maintained previous expectation now, but may be this is something to consider. We could relax this and default to 0
when savings aren't supplied.
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.
overallSavingsMs
should be required because opportunities have to be able to quantify their savings to be opportunities. We should maybe leave a comment on it to that effect so it's clearer.
(uses-rel-preload
is the only exception because it always marks itself as not applicable to remove itself from the report while it's buggy and needs to be fixed)
|
for future blame/debugging, it would be helpful to include the object shape this is preparing for and/or link to discussion of that in the other PRs |
One interesting thing is that
-- /**
* @param {LH.Audit.Details.Table['headings']} headings
* @param {LH.Audit.Details.Table['items']} results
* @param {{wastedMs?: number, wastedBytes?: number}} [options]
* @return {LH.Audit.Details.Table}
*/
static makeTableDetails(headings, results, options = {}) {} won't move everything to a single Meanwhile technically anyone can use |
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.
Looks good, thanks for iterating!
Might make sense to include in
10.0
per our discussion re: stabilizing API changes.Quoting @connorjclark: