-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Jetpack: Handle disconnected site case #47121
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~1946 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
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.
It tests well and code looks good. Nice job!
It takes a little while to see the connection error message. Maybe a further improvement could be to show the loading state.
There are some unit tests failing, but I'm not sure it's related to your PR. Maybe a rebase will fix it?
8a10d2b
to
665c353
Compare
You're right. That's definitely an improvement we should do in the future.
I rebased the PR and those failing tests now are passing. Thanks! |
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/5127264 Thank you @rcanepa for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
When either
sites-rewind
orsites-scan
endpoint returns a response object withno_connected_jetpack
code and412
status, we know there is some issue with the Jetpack Connection. Currently, we are not handling this case, and we show users a blank screen that tells them nothing.Changes proposed in this Pull Request
Testing instructions
Prerequisites: Jetpack Site, and WPCOM sandbox.
/wp-content/rest-api-plugins/endpoints/sites-rewind.php
and/wpcom-sandbox/wp-content/rest-api-plugins/endpoints/sites-scan.php
from your sandbox to make these endpoints return a 412. In the first file, on line number 72, you will have to remove the!
from the if condition. In the other file, do the same but on line number 290. Please reach out to me if you need help with this.public-api.wordpress.com
.Fixes 1164141197617539-as-1198191229840349
Demo
WPCOM - Backup
WPCOM - Scan
Jetpack Cloud - Backup
Jetpack Cloud - Scan