Skip to content
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

Setup completion tracking #9052

Merged
merged 15 commits into from
Jul 23, 2024
Merged

Conversation

zutigrm
Copy link
Collaborator

@zutigrm zutigrm commented Jul 22, 2024

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

Copy link

github-actions bot commented Jul 22, 2024

Build files for 715169e have been deleted.

Copy link

github-actions bot commented Jul 22, 2024

Size Change: +5.25 kB (+0.31%)

Total Size: 1.67 MB

Filename Size Change
./dist/assets/css/googlesitekit-admin-css-********************.min.css 54.8 kB +99 B (+0.18%)
./dist/assets/js/googlesitekit-activation-********************.js 23.7 kB -8 B (-0.03%)
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 59.8 kB +525 B (+0.89%)
./dist/assets/js/googlesitekit-adminbar-********************.js 34.5 kB +6 B (+0.02%)
./dist/assets/js/googlesitekit-api-********************.js 10 kB -5 B (-0.05%)
./dist/assets/js/googlesitekit-components-gm2-********************.js 5.88 kB +5 B (+0.09%)
./dist/assets/js/googlesitekit-components-gm3-********************.js 10.1 kB +4 B (+0.04%)
./dist/assets/js/googlesitekit-data-********************.js 2.35 kB -2 B (-0.08%)
./dist/assets/js/googlesitekit-datastore-forms-********************.js 9.03 kB -1 B (-0.01%)
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.08 kB +1 B (+0.05%)
./dist/assets/js/googlesitekit-datastore-site-********************.js 20.4 kB +84 B (+0.41%)
./dist/assets/js/googlesitekit-datastore-user-********************.js 25.1 kB -16 B (-0.06%)
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 77.3 kB +448 B (+0.58%)
./dist/assets/js/googlesitekit-main-dashboard-********************.js 142 kB +782 B (+0.55%)
./dist/assets/js/googlesitekit-modules-********************.js 22.1 kB +2 B (+0.01%)
./dist/assets/js/googlesitekit-modules-ads-********************.js 29.5 kB -10 B (-0.03%)
./dist/assets/js/googlesitekit-modules-adsense-********************.js 113 kB +459 B (+0.41%)
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 162 kB +340 B (+0.21%)
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 22.6 kB -22 B (-0.1%)
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 13.6 kB +724 B (+5.64%) 🔍
./dist/assets/js/googlesitekit-modules-search-console-********************.js 58 kB -10 B (-0.02%)
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 32 kB +13 B (+0.04%)
./dist/assets/js/googlesitekit-notifications-********************.js 3.63 kB -1 B (-0.03%)
./dist/assets/js/googlesitekit-settings-********************.js 74.2 kB +602 B (+0.82%)
./dist/assets/js/googlesitekit-splash-********************.js 73.8 kB +479 B (+0.65%)
./dist/assets/js/googlesitekit-user-input-********************.js 48.7 kB +477 B (+0.99%)
./dist/assets/js/googlesitekit-vendor-********************.js 321 kB -11 B (0%)
./dist/assets/js/googlesitekit-widgets-********************.js 78.9 kB +356 B (+0.45%)
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 61.3 kB -76 B (-0.12%)
./dist/assets/js/runtime-********************.js 1.3 kB +3 B (+0.23%)
ℹ️ View Unchanged
Filename Size
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11 kB
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 846 B
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 7.35 kB
./dist/assets/js/31-********************.js 2.76 kB
./dist/assets/js/32-********************.js 2.25 kB
./dist/assets/js/33-********************.js 3.64 kB
./dist/assets/js/34-********************.js 935 B
./dist/assets/js/35-********************.js 892 B
./dist/assets/js/36-********************.js 3.12 kB
./dist/assets/js/analytics-advanced-tracking-********************.js 901 B
./dist/assets/js/googlesitekit-consent-mode-********************.js 25.6 kB
./dist/assets/js/googlesitekit-datastore-ui-********************.js 9.98 kB
./dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 646 B
./dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 624 B
./dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 630 B
./dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 712 B
./dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 675 B
./dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 634 B
./dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 657 B
./dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 633 B
./dist/assets/js/googlesitekit-i18n-********************.js 3.93 kB
./dist/assets/js/googlesitekit-polyfills-********************.js 376 B

compressed-size-action

Copy link
Collaborator

@aaemnnosttv aaemnnosttv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zutigrm , this is quite close I think, just a few things to update and it should be good to go 👍

assets/js/hooks/useGlobalTrackingEffect.js Outdated Show resolved Hide resolved
assets/js/components/legacy-setup/SetupUsingGCP.js Outdated Show resolved Hide resolved
assets/js/hooks/useGlobalTrackingEffect.test.js Outdated Show resolved Hide resolved
assets/js/components/setup/SetupUsingProxyWithSignIn.js Outdated Show resolved Hide resolved
@zutigrm
Copy link
Collaborator Author

zutigrm commented Jul 23, 2024

@aaemnnosttv Thanks, I updated the PR

Copy link
Collaborator

@aaemnnosttv aaemnnosttv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zutigrm, just a few last things.

assets/js/components/ViewOnlyMenu/Description.js Outdated Show resolved Hide resolved
Comment on lines 40 to 42
beforeAll( () => {
setStorageOrder( [ 'localStorage', 'sessionStorage' ] );
} );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we setting this to prefer localStorage? I don't think it should be necessary to set/change.

Copy link
Collaborator Author

@zutigrm zutigrm Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since by default order it is setting sessionStorage for the storageBackend backend. And we are running this in test environment it made more sense to me to use localStorage for stability, even our storage mechanism prefers to use sessionStorage for some reason in these tests.

I wrote the tests to use localStorage in expect checks, but it was failing, and after digging I found that it was using sessionStorage instead, so I had to change the order to use localStorage

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both are mocked so one shouldn't be more stable than another. It sounds like it was failing from checking the wrong storage but we shouldn't even need to be specific about which one and instead use our getStorage utility.

assets/js/hooks/useGlobalTrackingEffect.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@aaemnnosttv aaemnnosttv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks @zutigrm 👍

@aaemnnosttv aaemnnosttv merged commit 95ffc8d into develop Jul 23, 2024
21 checks passed
@aaemnnosttv aaemnnosttv deleted the bug/9039-setup-completion-tracking branch July 23, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants