Open tofumatt opened 1 month ago
For
checkRequirements
:
- If
signInWithGoogleModule
feature flag is not enabled return early- Check if site is using HTTPS, using
isURLUsingHTTPS
helper function, and pass it a home URL, obtained fromgetHomeURL
selector fromCORE_SITE
datastore
@zutigrm, the following requirement is missing:
A new notification banner should appear for users that have not connected the Sign in with Google module.
@eugene-manuilov ah indeed! Thanks, IB updated
- Check if
clientID
setting from Sign in with google module is empty, to return early
@zutigrm, we should use isModuleConnected
to check whether or not the module is connected.
@eugene-manuilov Updated
Thanks, IB ✔
Hi @jimmymadon , I've set up a site but the banner isn't showing at all. Video is attached for reference.
@kelvinballoo I should've just seen the video first! You've got the Zero Data Notification banner showing! So in this case, if you dismiss or action that banner, the Sign in with Google banner should then appear. This behaviour will change after #9568 is merged though as the Notification Banners and Setup CTA banners will have their own "queue"!
Thanks @jimmymadon . The banner showed up after dismissing it the Zero data banner. I had a first round of testing and I have some observations/queries below:
ITEM 1: The 'Set up Sign in with Google' button text should have been 'Google Sans Display' based on Figma. Currently, it's 'Google Sans Text'. If this is standardise with other CTAs of the plugin, that's fine and this can be ignored.
ITEM 2: When viewed on mobile, the image layout is smaller than what is on Figma on the same breakpoint width. The 'Maybe later' button is also sitting below the 'Set up Sign in with Google' button currently. On Figma, it's next to each other. Photos attached for reference.
ITEM 3: Similar observation on tablet. The graphic is smaller compared to figma on the same breakpoint width. Photos attached for reference.
ITEM 4: On desktop Safari, the graphic is not showing up at all. Tested on Safari Version 17.6 (19618.3.11.11.5), MacOS Sonoma 14.6.1 It appears for Edge, Firefox and Chrome.
ITEM 5: This is a query around the AC:
The notification should not reappear if the module is already set up and connected, or if the notification was dismissed
or if the site does not use HTTPS.
Feature Description
A banner prompting users to enable Sign in with Google should be added to Site Kit. See the Figma design/screenshot below for the banner and its contents.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
signInWithGoogleModule
feature flag is enabled.Implementation Brief
assets/js/components/notifications/SignInWithGoogleModuleSetupCTAWidget.js
GatheringDataNotification
component for an example of using this new Notifications infrastructureid
andNotification
Notification
component passed as the propassets/js/components/notifications/NotificationWithSVG.js
BannerNotification
,you can re-using the logic aroundWinImageSVG
assets/js/googlesitekit/notifications/components/layout/NotificationWithSmallSVG.js
for example. It should contain only the needed layout including the passed SVG,title
,description
andactions
Set up Sign in with Google
CTA callback should redirect to the module setup pageuseActivateModuleCallback( 'sign-in-with-google' )
as the callbackMaybe later
CTA should dismiss notification,ActionsCTALinkDismiss
component should be used for both CTA's, and for dismiss it is enough to providedismissLabel
prop.dismissExpires
is0
by default, which is correct value for this case, where we are dismissing it permanently.assets/js/googlesitekit/notifications/register-defaults.js
checkRequirements
:signInWithGoogleModule
feature flag is not enabled return earlyisURLUsingHTTPS
helper function, and pass it a home URL, obtained fromgetHomeURL
selector fromCORE_SITE
datastoresign-in-with-google
module is connected usingisModuleConnected
fromCORE_MODULES
datastore, and return early if it is not connected10
from the last added banner notification (not including error ones, which start from150
, the regular ones start from300
).NOTIFICATION_AREAS.BANNERS_BELOW_NAV
forareaSlug
isDismissible
property withtrue
for valueTest Coverage
QA Brief
confirm_notification
,dismiss_notification
,view_notification
andclick_learn_more_link
.Changelog entry