-
Notifications
You must be signed in to change notification settings - Fork 794
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
Blaze: introduce Blaze module #31479
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
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:
|
62665cc
to
d00bb53
Compare
d00bb53
to
3b6c631
Compare
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 tested well for me 👍
My only question was regarding the Calypso side of things, is there plan to take into account the module/filter setting there (wordpress.com/posts/example.com)? Or should that always show the "Promote with Blaze" option?
That's a good point. I had initially thought that this should always appear, given that the Advertising menu in there always appears, but after your account I'm starting to have my doubts. Maybe the whole thing should disappear then? If it does, we have 2 options to do that:
diff --git a/projects/plugins/jetpack/_inc/client/traffic/blaze.jsx b/projects/plugins/jetpack/_inc/client/traffic/blaze.jsx
index 3befd68308..acc51f70fb 100644
--- a/projects/plugins/jetpack/_inc/client/traffic/blaze.jsx
+++ b/projects/plugins/jetpack/_inc/client/traffic/blaze.jsx
@@ -57,15 +57,6 @@ function Blaze( props ) {
};
const blazeToggle = () => {
- if ( ! blazeAvailable ) {
- return (
- <ToggleControl
- disabled={ true }
- label={ __( 'Blaze is not available on your site.', 'jetpack' ) }
- />
- );
- }
-
return (
<ModuleToggle
slug="blaze"
What do you think? |
Coming back to this discussion, I committed 06f80b0 to hide the card on WoA sites, where we'll want the feature to be available by default, like the WordPress.com toolbar. In parallel to that, I've opened 1416-gh-Automattic/wpcomsh to ensure the feature is available on WoA sites. |
Related PR: Automattic/jetpack#31479 On self-hosted sites, folks can use the Blaze module to toggle the feature on and off. We consequently need to take this into account when we want to display Blaze UI elements in Calypso. However, we must take a few things into account: - On WordPress.com simple sites, the module will always be on. - On older versions of Jetpack, the module will not exist.
fixes #29294 Instead of loading Blaze automatically and only providing a code snippet to disable it, let's make it a module (automatically enabled upon connection to WordPress.com) that can be disabled via the modules page.
They are not needed yet, the new dashboard is not yet ready to promote.
c529ecc
to
06f80b0
Compare
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.
We could merge this PR as is, and then update Calypso to add a check for the module on top of the eligibility check
I like this approach more 👍
I committed 06f80b0 to hide the card on WoA sites
Makes sense and tested well for me.
Fixes #29294
Proposed changes:
Instead of loading Blaze automatically and only providing a code snippet to disable it, let's make it a module (automatically enabled upon connection to WordPress.com) that can be disabled via the modules as well as the Settings page.
This will be especially important once #30103 will be merged and the new dashboard will be enabled, since the Blaze feature will then have its own menu in the dashboard, and will thus become more prominent in WordPress dashboards.
Since the feature becomes a module, we do not need to include it in the Config package anymore. It will be initialized when the module is activated.
UI Changes
This PR introduces UI changes in 2 different interfaces:
wp-admin/admin.php?page=jetpack_modules
, where you'll see a new "Blaze" item.Screenshots
Here are some screenshots of the different use-cases you may find in Jetpack > Settings > Traffic:
Offline mode
Feature disabled on the site
for example via
add_filter( 'jetpack_blaze_enabled', '__return_false' );
Inactive
Active with the new Dashboard enabled
via
add_filter( 'jetpack_blaze_dashboard_enable', '__return_true' );
Active with the new Dashboard not active yet
This should be the default, does not require any filter:
Site connected, but user not connected
Other information:
Jetpack product discussion
Related PRs:
Does this pull request change what data or activity we track or use?
Testing instructions:
Here are some basic tests:
For more advanced tests, I would recommend playing with the filters I mentioned above.