-
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
Enhancement/5451 twg widget #5577
Conversation
…tly for the supporter widget preview.
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.
Hi @eugene-manuilov, code-wise this is looking good with just a couple of minor comments from me.
However when it comes to testing it, I'm unable to follow the QAB as specified. The reason being, although the QAB mentions simply activating the TwG module, in fact the module needs to be connected in order for the widget to be registered:
site-kit-wp/includes/Modules/Thank_With_Google.php
Lines 56 to 58 in def2970
if ( ! $this->is_connected() ) { | |
return; | |
} |
At the moment it's not possibly to get as far as connecting the TwG module, unless I am missing something?
So at the moment when I add a Legacy Widget it doesn't give me the option for the TwG: Supporter Wall widget. Whereas if I comment out that check for is_connected()
, it does show up. Not sure if I have missed something here, or if the QAB needs a rethink, or possibly this should be tested once TwG can be fully connected...
public function __construct() { | ||
parent::__construct( | ||
self::WIDGET_ID, | ||
sprintf( 'Thank with Google: %s', __( 'Supporter Wall', 'google-site-kit' ) ) |
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.
The "Thank with Google" string here also needs to be translated...
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.
I am not sure about this... As far as I know product names are not translated since they are "international" names. For example, take a look at https://www.thinkwithgoogle.com/ - you can switch between different languages and see that "Think with Google" remains untranslated.
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.
From what I can see we are translating the service names, for example -
'name' => _x( 'Thank with Google', 'Service name', 'google-site-kit' ), |
This can be also seen for other modules and in JS too...
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.
Fair point, I'll update 👍
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.
Updated, should be good now.
I have added one step to QAB to use a snippet from another ticket to fake TwG setup. Does it help? |
Thanks @eugene-manuilov, that did help and I've been able to connect TwG. One thing to note, though is that as well as inserting the PHP snippet I also had to run the JS snippet from the issue's QA Brief, so it might be worth a mention of this. E.g. -Add a snippet from the https://github.com/google/site-kit-wp/issues/5450 to fake TwG setup into the functions.php file or into a mu-plugin.
+Follow the Setup instructions in the QA Brief for https://github.com/google/site-kit-wp/issues/5450 to connect the TwG module. |
Yep, sounds good to me. Updated. Thanks. |
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.
LGTM! Nice one @eugene-manuilov
Summary
Addresses issue:
Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist