-
Notifications
You must be signed in to change notification settings - Fork 799
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
Tiled Gallery Block: allow in Offline Mode. #20534
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
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.
This works correctly for me, although I couldn't reproduce the offline issue on latest stable. I also noticed that the photon toggle is still toggle-able, which I feel like I'd expect not to be the case in offline mode?
Set offline by adding define( 'JETPACK_DEV_DEBUG', true ); to a JN's wp-config.
Could it be that Photon was active on your site before you switched on Offline mode? |
Nope, I didn't activate photon at all. Same for localhost and on a clean JN install, and before connecting to wpcom. Photon toggle is always available to be activated, and tiled gallery shows up. |
The Site Accelerator toggle is a custom toggle that works a bit differently from the standard ModuleToggle component. Since it handles 2 modules at once (Asset CDN and Photon), it needs to check if the 2 modules can actually be toggled on before to activate them. Until now, we checked if the Photon module had an override set via a filter, but we did not check if it was rendered unavailable via Offline mode. This changes that. This was brought up in #20534 (comment)
…y-block-offline-mode
Ah yes, I was able to reproduce. That's an issue with the toggle. I took care of this bug in #20555. |
Great news! One last step: head over to your WordPress.com diff, D65071-code, and commit it. Thank you! |
r229845-wpcom |
Changes proposed in this Pull Request:
Classic Tiled Galleries (created via the Classic editor or within a Classic block in the block editor) can be used even when the site is in Offline mode, ever since #521.
The Tiled Gallery block, however, behaves differently; it requires an active connection. Let's try to be consistent with the feature by:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
I would suggest testing on two different sites: