The popup blocker is invoked for some users when the PDF takes too long to generate after a user clicks the print button. This is usually caused by slower network latency.
This is only occurring in cases where a data fetch is not required. When the data fetch is required, we pre-open the tab prior to generating the PDF, so no popup blocker is invoked.
When attempting to open a PDF tab results in a popup blocker, we alert the user with a Toast notification explaining that a popup blocker stopped it from opening, and providing a CTA to allow the user to open it anyways.
To reproduce the issue, you’ll need to simulate a slow network in Chrome developer tools.
Open the Network tab, click on the Online dropdown, and choose Add...
Click Add custom profile…
Create a profile name (i.e. “Slow”), and set the Latency to 1000
Go back to the Network tab, and ensure the new Slow profile is selected in the dropdown
Refresh, and generate a print view, changing the Basics and Daily charts to the 30-day presets.
This should slow the process down enough to trigger the popup blocker, and show the toast notification.
PR approved (it’s still running CI tests I think). As noted in the review, it’s probably worth documenting somewhere (confluence?) what the nature of the conflict was with the testing library(ies) was so we can work to prioritize upgrading/replacing them as necessary (or at least have the strategy written down/referenced for the next time a developer hits the same thing).
Agreed. I’ll document what I know re: the issue on Confluence (which is limited for now) and the next steps worth trying to resolve the testing lib conflicts.
Thanks for the quick turnaround on the review
I’ve scheduled this to deploy to qa2. The version will show as v1.39.1-rc.1 once it’s deployed.
Ghost Inspector Full Regression Tests Triggered on QA1 and QA2. Failure will show in qe-automated channel in slack within 15-20 minutes.
Testing Passed.
Tested with various latency settings from 1000ms to 5000ms and was able to either directly see the print view or , when blocked as a pop-up, received the newly implemented toast notification. great job with this!
product
dev
support
I have some screenshots in the test execution if needed
marketing