-
Notifications
You must be signed in to change notification settings - Fork 295
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
Encourage users to enable auto-updates for Site Kit #5853
Comments
@aaemnnosttv Have added some preliminary ACs here based on our discussion. The notification text, time after setup to display the notification and whether to re-show the notification after dismissal need to be finalised. c.c. @marrrmarrr @felixarntz |
Thanks @jimmymadon – this is almost there I think; a few points to iterate on: "SiteKit" -> "Site Kit" 😉
Let's mention the specific minimum version of WP we need for this. Also, we should only prompt users who have the necessary core capability to make this change as well. Apart from that, I wonder if a dashboard notification is the best form for this. Maybe we should add it to the splash page next to the telemetry opt-in? Thoughts @marrrmarrr ? |
@aaemnnosttv Dug a bit deeper into this one and have updated the ACs with links to relevant docs. The only purpose of keeping this a Banner Notification is that we want to show this to older users who have already connected/set up Site Kit. Maybe we can add a delay for new users (similar to the delay in the new TwG Supporter Wall widget prompt notification) so they don't get multiple stacked notifications after setup which can be overwhelming. |
Thanks @jimmymadon
I don't think we need to add a particular delay to it. User's already won't see it as the main thing after connecting immediately as there would be other higher-priority banners they would see – at least the success/congrats banner. Why not also add a CTA to the ActivationNotice? The user should have just activated the plugin so it would be a reasonable time to suggest it I think. I'm not saying instead of the banner here, but as an additional message.
Yes, we shouldn't nag them on a regular basis about it. It's just a nice to have 👍
We can always revise the wording while we're in motion, just thinking this could be simplified a little bit. Perhaps: Apart from that, I feel like there might be a little more we need to consider after reviewing the intro blog post you shared. I.e. users could have auto-updates enabled for all plugins ("Blanket auto-update opt-in") or interface elements disabled. The AC can be a bit loose about this as high level criteria but we should be sure this is covered in the IB so it might be worth noting somewhere. |
@aaemnnosttv Thanks for clarifying some of those questions.
Did you mean to add a |
Ah no, I meant as part of |
@marrrmarrr @felixarntz In @aaemnnosttv's absence, could one of you please have a look if the ACs here look alright? Have incorporated all of Evan's suggestions and our review of this issue a while back. Thanks! |
@aaemnnosttv Based on our AC sync today, we decided to make this as simple as possible and only stick to creating the banner which would be shown soon after someone activates and sets up the plugin. I have created another issue #6092 for modifying the |
@aaemnnosttv @jimmymadon Adding to the above that the same banner should be used for existing users. It shouldn't show right away when having completed the initial setup flow, but any time after, e.g. a few minutes later or so. For users that already had configured the plugin, it can show at any point. |
@felixarntz I am guessing your issue with showing the banner immediately after setup is that there will potentially be three banners back-to-back after setup ( |
@jimmymadon I think we can use a client-side cache value to manage the delay as it's a rather short duration. I imagine this could work similar to how we handle the feature tour cooldown. |
QA Update: ✅On a existing Site Kit setup:
On an new Site:
Additional QA: Tested the above for a multisite and the checks above pass. The banner appears on the multisites when auto updates is disabled. QA notes for future reference:For InstaWp sites the auto updates are disabled by default so you have to alter code in the wp-config file. Search for The plugin I used to disable auto update was |
Feature Description
As a plugin which is very actively maintained and updated regularly, it makes sense to always keep Site Kit up to date on the latest version. While some users likely already have this enabled for Site Kit, this would be an easy thing we could encourage users to enable, e.g. right after activating the plugin in the success banner. This should help users to enjoy the latest features and fixes for Site Kit with less manual intervention on their part.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
update_plugins
core capability.wp_is_auto_update_enabled_for_type()
and so should the new user interface elements - seeDisable the auto-update user interface elements
.Implementation Brief
PHP part:
update_plugins
capability a few new parameters should be passed to JS (to_googlesitekitBaseData
) from WP:/includes/Core/Authentication/Authentication.php
locateinline_js_base_data
func and if WP version >= 5.5 add to$data
following properties:$data['updatePluginCapacity']
to be result ofcurrent_user_can( 'update_plugins' )
$data['autoUpdatesEnabled']
to be result ofwp_is_auto_update_enabled_for_type( 'plugin' )
JS part:
Get new data from JS:
datastore/site/info.js
introduce new actions to getupdatePluginCapacity
andautoUpdatesEnabled
from_googlesitekitBaseData
:getUpdatePluginCapacity: getSiteInfoProperty('updatePluginCapacity')
getAutoUpdatesEnabled: getSiteInfoProperty('autoUpdatesEnabled')
*getSiteInfo()
in order toyield
that data to actionsCreate a new banner component:
/assets/js/components/notifications
create a new component (eg:EnableAutoUpdateBannerNotification
)BannerNotification
component insideEnableAutoUpdateBannerNotification
and configure it withtitle
,description
, andCTAs
from ACBannerNotification
withdismiss={ __( 'Dismiss', 'google-site-kit' ) }
,isDismissable: true
andexpires: 0
in order to make it dismissableselect( CORE_SITE ).getUpdatePluginCapacity()
to accessupdatePluginCapacity
select( CORE_SITE ).getAutoUpdatesEnabled()
to accessautoUpdatesEnabled
select( CORE_SITE ).wpVersion()
to access WP version dataEnableAutoUpdateBannerNotification
according to ACapiFetch
method POST to callwp-admin/admin-ajax.php
with{action: toggle-auto-updates, state: enable, type: plugin, asset: google-site-kit/google-site-kit.php}
in Primary CTA callback in order to enable auto-updates (same as on the plugins page in WP)notification=authentication_success
is present while the query paramslug
is not present.setItem
with attl
of600
seconds (10 minutes) to set a flag, and returnnull
.getItem
, and if it's not set, returnnull
.Render
EnableAutoUpdateBannerNotification
inside/assets/js/components/notifications/BannerNotifications.js
underSetupSuccessBannerNotification
Test Coverage
EnableAutoUpdateBannerNotification
with Jest testsEnableAutoUpdateBannerNotification
to react storybookAuthentication.php
QA Brief
EnableAutoUpdateBannerNotification
story in storybook looks as described./wp-admin/plugins.php
, enable auto updates for Site Kit/wp-admin/plugins.php
, disable auto updates for Site KitEnable auto-updates
CTA Button./wp-admin/plugins.php
, verify the auto-updates are enabled for Site Kit.Changelog entry
The text was updated successfully, but these errors were encountered: