-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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(third party): filter out third party urls #6351
Conversation
I still need to add a global checkbox to select/unselect all checkboxes. We might also want to show a label on marked elements like @hwikyounglee suggested. |
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.
nice!! slick solution to the even background colors too :)
Two sticking points I still see I think we'll need to wrestle with:
-
Skipping this in certain audits (like preconnect to 3rd party origins, it doesn't make any sense to hide the list of 100% third party origins, image aspect ratios audit also doesn't have any connection to the origin of the resource)
-
Super obviously marking that there's information in the table that's missing when filtered. I still kinda like the idea of inserting a summary placeholder row to further indicate that there's information in the table that's being hidden, but open to other ideas of course if @hwikyounglee has some awesome tricks hidden up her sleeve for us :)
Taking all things out of my sleeve, hmm, not much hidden! But made up a few things now. Open for suggestions.
|
|
22ef255
to
c4d9b64
Compare
c4d9b64
to
7e23d46
Compare
I'm having an issue with the tests because the initFeatures is ran on the report template which does not contain the strings. I could combine the files with a string replace but other errors occur so not sure what to do here? I'm thinking of moving the report-ui-feature-test.js to end to end tests with puppeteer WDYT? |
there's definitely value in having it be a unit test.
Which strings do you mean? The travis failure doesn't give much of a clue |
https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/report/html/reporttemplate.html is used in the report features test which means there are no tags to clone. |
ah, I see. I thought maybe you were talking about the i18n strings and was worried :)
|
@brendankenny fixed the issue by changing Please let me know what is left to move forward. |
:) (sorry) |
done. caught a bug :) |
continue; | ||
} | ||
const datasetUrl = urlItem.dataset.url || ''; | ||
const isThirdParty = Util.getRootDomain(datasetUrl) !== rootDomain; |
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.
@wardpeet this ok?
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!
over to you, @paulirish
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.
🎊 🎊 🎊 |
Woo hoooooooooooo!!!!!!!
|
@hoten thanks for getting this out the door! 🙏 |
Summary
Hides 3th party urls from our tables when the checkbox is marked. This do not changes scores, just hides it in the UI.
A request is marked as third party when the TLD + 1 can not be found in the url.
pageTLDPlusOne = new URL(this.json.finalUrl).origin.split('.').slice(-2).join('.');
Demo:
http://wardpeet-filestorage.surge.sh/lh-store/pr-6351/report.html
Related Issues/PRs
#4516
need upgraded jsdom:
#6411