Closed tofumatt closed 1 week ago
@tofumatt, this should be ready for review. Do you mind checking it? The only question that i have right now is which URL to use for the Learn More
link?
@eugene-manuilov IB looks good to meβwe don't have a URL for that yet, as it will need to be created on the Site Kit help/documentation pages.
I'm having trouble finding the document we have with all of those URLs, but for now it should just be a new URL we use to point users to that explains the Henhouse process and how Sign in with Google works π€
Can we create a new help URL on the service that just doesn't point to anywhere yet while we create that new help page? π€
Can we create a new help URL on the service that just doesn't point to anywhere yet while we create that new help page?
We can probably do that but we need to coordinate it with @jamesozzie or @adamdunnage. For now, I added a point to IB to use #
as the learn more URL. I think we can update it later when we know exactly what should be there.
IB β
@tofumatt @eugene-manuilov I added a mention of that in our documentation task for this epic. Good shout.
Tested on dev environment.
@zutigrm
Issue 1 : Title font size in Figma is 20px and Font weight is 500 where as under actual implementation font size is 22px and weight is 400.
Issue 2: 'Get your client ID' CTA font weight is 500 in Figma where as under actual implementation it is 400.
Issue 3 : Module is getting auto connect even if user clicks 'Cancel' or just refreshes the page.
Issue 4: In the Figma design, the "No ID entered" version includes an example client ID as a placeholder for the client ID field. However, in the actual implementation, we are not displaying any placeholder.
Issue 5 : The Client ID currently lacks validation, which can be complex due to its structure. However, we should implement basic validation. As it stands, the Complete CTA gets enabled and user can complete setup if the user only enters spaces or any random special characters in the field.
@mohitwp Thanks
Issue 1 : Title font size in Figma is 20px and Font weight is 500 where as under actual implementation font size is 22px and weight is 400.
I will follow up on this with Sigal, as this title is consistent/same for all modules. If this is going to be new size, I will file a follow up issue to update this for all modules.
Issue 2: 'Get your client ID' CTA font weight is 500 in Figma where as under actual implementation it is 400. Issue 3: Module is getting auto connect even if user clicks 'Cancel' or just refreshes the page. Issue 5 : The Client ID currently lacks validation, which can be complex due to its structure. However, we should implement basic validation. As it stands, the Complete CTA gets enabled and user can complete setup if the user only enters spaces or any random special characters in the field.
Fixed
Issue 4: In the Figma design, the "No ID entered" version includes an example client ID as a placeholder for the client ID field. However, in the actual implementation, we are not displaying any placeholder.
This is mentioned in QAB, the field we use from 3rd party lib does not support that kind of layout with both label and placeholder, so it is consistent with all other fileds we use on module setup. There is also my comment on FIgma under that field, to mention that implementation is consistent with other fields
signInWithGoogleModule
feature flag is enabled.Issue 2 : Fix
Issue 3 : Fix
Issue 5 : Fix
@zutigrm cc @wpdarren
Moving this back to execution. I missed this point before but as per AC - The module should only be allowed to be set up/activated on a site with HTTPS enabled. But, currently I'm able to activate and setup Sign in with Google on HTTP Site.
@mohitwp Thanks for your observation. Hm this issue was about adding a setup page, the https detection (or similar checks like ad blocker, etc) is usually done on the module connection settings screen. Let me check with @tofumatt what is planed here, if there is an issue for that separately, or we should include it as part of this one?
(This was answered on the stand-up call, but adding here for posterity.)
We should display a notice in the same way as the AdSense/RRM modules do when accessing these setup pages when the criteria for setup isn't met. It should look like: https://google.github.io/site-kit-wp/storybook/develop/?path=/story/modules-ads-setup-setupform--ad-blocker, with a message explaining that HTTPS is required to set up Sign in with Google.
Feature Description
The setup page for Sign in with Google should be created for when a user activates Sign in with Google.
It should be only visible when the
signInWithGoogleModule
feature flag is enabled.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
signInWithGoogleModule
feature flag is enabled.https://developers.google.com/web/site-kit?sitename=$URL_ENCODED_SITE_NAME&siteurl=$URL_ENCODED_SITE_URL
()Implementation Brief
assets/js/components/setup/ModuleSetupFooter.js
file:onComplete
of the function type.Complete Setup
button using theSpinnerButton
component as shown on the screenshot:canSubmitChanges
selector and set the button disabled state based on this value.isSaving
withfalse
as the default value.isSaving
totrue
, calls the providedonComplete
function, waits until it finishes execution and setsisSaving
back to `false.disabled
property to the button to disable it when either can't submit changes or is saving changes.isSaving
property to the button to show the spinner when saving changes.onClick
property to the button to call the new callback function on click.assets/js/components/setup/ModuleSetup.js
file:onCompleteSetup
property from themodule
object: https://github.com/google/site-kit-wp/blob/3a6fd17f736b293c5467d06b0bfac66f015823a3/assets/js/components/setup/ModuleSetup.js#L100onCompleteSetup
passingregistry
andfinishSetup
as arguments, and returns whateveronCompleteSetup
returns.ModuleSetupFooter
element viaonComplete
property if theonCompleteSetup
is a valid function. IfonCompleteSetup
is undefined or not a function, passundefined
instead.assets/js/modules/sign-in-with-google/components/common/ClientIDTextField.js
file:getClientID
selector and assign it to a variable, for example, toclientID
.onChange
that sets the client ID setting using thesetClientID
action.clientID
as the value of the text field andonChange
as theonChange
property callback.assets/js/modules/sign-in-with-google/components/setup/SetupForm.js
file:getSiteName
andgetHomeURL
selectors.StoreErrorNotices
component as other SetupForm components do.ClientIDTextField
component to display the input field.https://developers.google.com/web/site-kit?sitename=$URL_ENCODED_SITE_NAME&siteurl=$URL_ENCODED_SITE_URL
as the URL for theGet your Client ID
button where site name and URLs are used respectively.#
as the Learn More link for now.assets/js/modules/sign-in-with-google/components/setup/SetupMain.js
file:SetupMain
component from the Ads module to render the newSetupForm
element.assets/js/modules/sign-in-with-google/index.js
file:onCompleteSetup
callback function to the module that acceptsregistry
andfinishSetup
args.submitChanges
action to finish.submitChanges
call returns an object that doesn't have a non-emptyerror
property, then call thefinishSetup
callback.Test Coverage
QA Brief
signInWithGoogleModule
feature flag enabledSettings > Connect More Services
and click the CTA to setupSign In With Google module
Connected modules
settings tabChangelog entry