-
Notifications
You must be signed in to change notification settings - Fork 75
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
fix: catch Google Translate DOM errors #7096
base: master
Are you sure you want to change the base?
fix: catch Google Translate DOM errors #7096
Conversation
b882de0
to
71fb470
Compare
Monkey-patch `node.removeChild` and `node.insertBefore` to catch crashing errors generated by Google Translate. This should make projects usable in Chrome, in other languages, until the underlying bug is fixed. See facebook/react#11538 (comment)
82bd528
to
23068a8
Compare
From Dan Abramov's original comment:
|
(Copy-pasting our follow up from our discussion from Slack) Update on the "Chrome's Translate feature crashes PFE" bug , post-dev standup.
(Please see the Slack thread for additional comments on performance.) |
Here's a couple of tools you can use, not just for this PR but to measure the performance of your code in general:
Here's a couple of example page speed tests for live Zooniverse projects: Here are the performance scores from Page Speed Insights for both those pages. To be honest, both Zooniverse React apps are so slow that I suspect any additional slowness introduced by Dan Abramov's patch will be negligible by comparison. The DOM size is reasonably small for both, too.
Also: kind of interesting that the new classifier is significantly slower to run on both desktop and mobile. I would have expected it to be faster. |
Monkey-patch
node.removeChild
andnode.insertBefore
to catch crashing errors generated by Google Translate. This should make projects usable in Chrome, in other languages, until the underlying bug is fixed.See facebook/react#11538 (comment)
Staging branch URL: None at this time (external PR contributor)
Describe your changes.
Required Manual Testing
Review Checklist
npm ci
and app works as expected?Optional
ChangeListener
orPromiseRenderer
components with code that updates component state?