-
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
Check for gathering data state in Search Console and Analytics before showing User Input notification. #7198
Conversation
… showing User Input notification.
Build files for 4bc8ad5 have been deleted. |
Size Change: +866 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
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 @tofumatt!
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.
@tofumatt, apologies as I hit approve and then noticed that the E2E tests are failing on a user input test. Please can you take a look?
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.
@@ -49,6 +50,18 @@ export function fetchMockSaveSettings() { | |||
); | |||
} | |||
|
|||
export function fetchMockSaveDataAvailable() { |
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 is added to prevent warnings in stories about POSTing to the data-available
endpoint once the gathering data state has been determined.
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.
Thank you for the brilliant work here, @tofumatt & @techanvil! 👍
@techanvil Regarding the tests and stories, I've left a couple of very nitpicky comments/questions which once addressed, this should be good to go.
Thank you!
body: JSON.stringify( | ||
getAnalytics4MockResponse( | ||
// Some of the keys are nested paths e.g. `metrics[0][name]`, so we need to convert the search params to a multi-dimensional object. | ||
getMultiDimensionalObjectFromParams( paramsObject ) | ||
) | ||
), |
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.
🏆 👍
assets/js/components/KeyMetrics/KeyMetricsSetupCTAWidget.stories.js
Outdated
Show resolved
Hide resolved
} ); | ||
|
||
it( 'does render the CTA when SC and GA4 are both connected', async () => { | ||
global._googlesitekitUserData.isUserInputCompleted = false; |
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 is no longer needed, just setting the flag via the action below now works.
invariant( | ||
isGatheringData !== true, | ||
"Analytics 4 gathering data's `true` state relies on the current authentication and selected property state so is unreliable to set from a helper, and therefore unsupported." | ||
); |
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.
🏆 👍
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.
Thank you for the brilliant work here, LGTM, 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.
Looks good—reviewing since the PR was re-done by Tom 🙂
Summary
Please note that @techanvil has picked up the implementation here, and as mentioned in this comment, the original change that Matt wrote needed to be redone anyway due to changes in
develop
. Therefore, please assign to @techanvil to address any code review feedback.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