site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Selection panel loading state

Open zutigrm opened this issue 1 year ago • 2 comments

Summary

Addresses issue:

  • #8162

Relevant technical choices

I ended up diverging from the IB, and taking a simplified different route, since:

  • The initial approach outlined in the IB isn't working, since adding intersection observer to the panel which is fixed position, located at the top - will always return true. So I changed the approach to use open state of the panel, to detect when panel is opened for the first time to trigger the re-sync.
  • The usage of hasFinishedResolution on reports is not working for loading state, as re-sync does not reset it, it makes straight fetch and updates the data. So I used isFetching* on re-sync action for reliable checking.
  • The last part about cleared audiences isn't needed, as the preview block is distributed instead of audience item, which is automatically correctly positioned between the groups, or just plainly depending if some groups are selected, or not. So this part is omitted.

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.
  • [x] I have added a QA Brief on the issue linked above.
  • [x] 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.

zutigrm avatar Jul 03 '24 11:07 zutigrm

Build files for fb818b7f753ab62562651a1d028648e8243d72f9 have been deleted.

github-actions[bot] avatar Jul 03 '24 11:07 github-actions[bot]

Size Change: +2.72 kB (+0.17%)

Total Size: 1.57 MB

Filename Size Change
./dist/assets/css/googlesitekit-admin-css-********************.min.css 55.1 kB +40 B (+0.07%)
./dist/assets/js/35-********************.js 3.11 kB -1 B (-0.03%)
./dist/assets/js/googlesitekit-activation-********************.js 24 kB -1 B (0%)
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 59.5 kB +11 B (+0.02%)
./dist/assets/js/googlesitekit-adminbar-********************.js 34.8 kB +11 B (+0.03%)
./dist/assets/js/googlesitekit-api-********************.js 10.2 kB +1 B (+0.01%)
./dist/assets/js/googlesitekit-components-gm2-********************.js 5.88 kB -1 B (-0.02%)
./dist/assets/js/googlesitekit-data-********************.js 2.36 kB -1 B (-0.04%)
./dist/assets/js/googlesitekit-datastore-forms-********************.js 9.14 kB +1 B (+0.01%)
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.08 kB +2 B (+0.1%)
./dist/assets/js/googlesitekit-datastore-site-********************.js 19.9 kB -2 B (-0.01%)
./dist/assets/js/googlesitekit-datastore-ui-********************.js 10.1 kB -2 B (-0.02%)
./dist/assets/js/googlesitekit-datastore-user-********************.js 25.1 kB -2 B (-0.01%)
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 74.1 kB +5 B (+0.01%)
./dist/assets/js/googlesitekit-main-dashboard-********************.js 125 kB +820 B (+0.66%)
./dist/assets/js/googlesitekit-modules-ads-********************.js 29.5 kB +2 B (+0.01%)
./dist/assets/js/googlesitekit-modules-adsense-********************.js 113 kB +14 B (+0.01%)
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 145 kB +855 B (+0.59%)
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 22.6 kB -6 B (-0.03%)
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 11.3 kB +4 B (+0.04%)
./dist/assets/js/googlesitekit-modules-search-console-********************.js 58.4 kB +6 B (+0.01%)
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 31.9 kB +1 B (0%)
./dist/assets/js/googlesitekit-settings-********************.js 61.7 kB +7 B (+0.01%)
./dist/assets/js/googlesitekit-splash-********************.js 73.4 kB +3 B (0%)
./dist/assets/js/googlesitekit-user-input-********************.js 48.3 kB -4 B (-0.01%)
./dist/assets/js/googlesitekit-vendor-********************.js 320 kB +1 B (0%)
./dist/assets/js/googlesitekit-widgets-********************.js 63 kB +954 B (+1.54%)
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 61.6 kB +3 B (0%)
ℹ️ View Unchanged
Filename Size
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.2 kB
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 770 B
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 7.47 kB
./dist/assets/js/30-********************.js 2.76 kB
./dist/assets/js/31-********************.js 2.25 kB
./dist/assets/js/32-********************.js 3.64 kB
./dist/assets/js/33-********************.js 935 B
./dist/assets/js/34-********************.js 892 B
./dist/assets/js/analytics-advanced-tracking-********************.js 776 B
./dist/assets/js/googlesitekit-components-gm3-********************.js 10.1 kB
./dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 645 B
./dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 615 B
./dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 629 B
./dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 727 B
./dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 673 B
./dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 634 B
./dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 652 B
./dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 632 B
./dist/assets/js/googlesitekit-i18n-********************.js 3.92 kB
./dist/assets/js/googlesitekit-modules-********************.js 22.1 kB
./dist/assets/js/googlesitekit-polyfills-********************.js 377 B
./dist/assets/js/runtime-********************.js 1.3 kB

compressed-size-action

github-actions[bot] avatar Jul 03 '24 11:07 github-actions[bot]