Skip to content

Conversation

eugene-manuilov
Copy link
Collaborator

@eugene-manuilov eugene-manuilov commented Sep 15, 2025

Summary

Addresses issue:

Relevant technical choices

  • Slightly deviated from IB to use pick as a string or an array of strings that are passed to lodash's pick function.

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.
  • Ensure there are no unexpected significant changes to file sizes.

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 Sep 15, 2025

Build files for 9cd400c are ready:

Copy link

github-actions bot commented Sep 15, 2025

Size Change: +1.22 kB (+0.06%)

Total Size: 1.98 MB

ℹ️ View Unchanged
Filename Size Change
./dist/assets/blocks/reader-revenue-manager/block-editor-plugin/editor-styles.css 124 B 0 B
./dist/assets/blocks/reader-revenue-manager/block-editor-plugin/editor-styles.js 20 B 0 B
./dist/assets/blocks/reader-revenue-manager/block-editor-plugin/index.js 42.7 kB 0 B
./dist/assets/blocks/reader-revenue-manager/common/editor-styles.css 307 B 0 B
./dist/assets/blocks/reader-revenue-manager/common/editor-styles.js 20 B 0 B
./dist/assets/blocks/reader-revenue-manager/contribute-with-google/index.js 5.88 kB 0 B
./dist/assets/blocks/reader-revenue-manager/contribute-with-google/non-site-kit-user.js 5.07 kB 0 B
./dist/assets/blocks/reader-revenue-manager/subscribe-with-google/index.js 5.88 kB 0 B
./dist/assets/blocks/reader-revenue-manager/subscribe-with-google/non-site-kit-user.js 5.07 kB 0 B
./dist/assets/blocks/sign-in-with-google/editor-styles.css 84 B 0 B
./dist/assets/blocks/sign-in-with-google/editor-styles.js 20 B 0 B
./dist/assets/blocks/sign-in-with-google/index.js 17.8 kB 0 B
./dist/assets/css/googlesitekit-admin-css-********************.min.css 62.3 kB 0 B
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.7 kB 0 B
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 846 B 0 B
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 8.43 kB 0 B
./dist/assets/js/146-********************.js 963 B 0 B
./dist/assets/js/201-********************.js 2.85 kB 0 B
./dist/assets/js/315-********************.js 3.08 kB 0 B
./dist/assets/js/379-********************.js 3.7 kB 0 B
./dist/assets/js/590-********************.js 1.89 kB 0 B
./dist/assets/js/640-********************.js 2.36 kB 0 B
./dist/assets/js/909-********************.js 1.01 kB 0 B
./dist/assets/js/analytics-advanced-tracking-********************.js 475 B 0 B
./dist/assets/js/googlesitekit-activation-********************.js 24 kB +49 B (+0.2%)
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 52.8 kB +44 B (+0.08%)
./dist/assets/js/googlesitekit-adminbar-********************.js 34.3 kB +55 B (+0.16%)
./dist/assets/js/googlesitekit-api-********************.js 7.76 kB 0 B
./dist/assets/js/googlesitekit-block-tracking-********************.js 5.5 kB 0 B
./dist/assets/js/googlesitekit-components-********************.js 5.64 kB 0 B
./dist/assets/js/googlesitekit-consent-mode-********************.js 25.5 kB 0 B
./dist/assets/js/googlesitekit-data-********************.js 1.68 kB 0 B
./dist/assets/js/googlesitekit-datastore-forms-********************.js 6.99 kB +52 B (+0.75%)
./dist/assets/js/googlesitekit-datastore-location-********************.js 1.51 kB 0 B
./dist/assets/js/googlesitekit-datastore-site-********************.js 16.9 kB +473 B (+2.88%)
./dist/assets/js/googlesitekit-datastore-ui-********************.js 7.11 kB +50 B (+0.71%)
./dist/assets/js/googlesitekit-datastore-user-********************.js 22.1 kB 0 B
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 54 kB +43 B (+0.08%)
./dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 1.25 kB 0 B
./dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 601 B 0 B
./dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 226 B 0 B
./dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 1.24 kB 0 B
./dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 267 B 0 B
./dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 1.31 kB 0 B
./dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 982 B 0 B
./dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 1.26 kB 0 B
./dist/assets/js/googlesitekit-i18n-********************.js 6.16 kB 0 B
./dist/assets/js/googlesitekit-main-dashboard-********************.js 126 kB +51 B (+0.04%)
./dist/assets/js/googlesitekit-metric-selection-********************.js 50.8 kB +46 B (+0.09%)
./dist/assets/js/googlesitekit-modules-********************.js 19.8 kB 0 B
./dist/assets/js/googlesitekit-modules-ads-********************.js 47.4 kB 0 B
./dist/assets/js/googlesitekit-modules-adsense-********************.js 122 kB 0 B
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 184 kB +51 B (+0.03%)
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 23.9 kB 0 B
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 43 kB 0 B
./dist/assets/js/googlesitekit-modules-search-console-********************.js 65.2 kB 0 B
./dist/assets/js/googlesitekit-modules-sign-in-with-google-********************.js 32.5 kB 0 B
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 29.9 kB +38 B (+0.13%)
./dist/assets/js/googlesitekit-notifications-********************.js 62.5 kB +57 B (+0.09%)
./dist/assets/js/googlesitekit-polyfills-********************.js 230 B 0 B
./dist/assets/js/googlesitekit-settings-********************.js 119 kB +51 B (+0.04%)
./dist/assets/js/googlesitekit-splash-********************.js 64 kB +50 B (+0.08%)
./dist/assets/js/googlesitekit-user-input-********************.js 44.2 kB +55 B (+0.12%)
./dist/assets/js/googlesitekit-vendor-********************.js 322 kB 0 B
./dist/assets/js/googlesitekit-widgets-********************.js 101 kB 0 B
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 59.1 kB +53 B (+0.09%)
./dist/assets/js/runtime-********************.js 1.9 kB 0 B

compressed-size-action

Copy link
Collaborator

@zutigrm zutigrm left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@tofumatt tofumatt left a comment

Choose a reason for hiding this comment

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

Can you add a QA brief for this issue so QA knows what to test here?

The code itself seems fine, though I think we can improve on the argument name.

* @return {Object} The snapshot store object.
*/
export function createSnapshotStore( storeName ) {
export function createSnapshotStore( storeName, { pick: pickPaths } = {} ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than using pick/pickPaths, can we have a more descriptive name for this argument? Calling it pick seems like the implementation detail of using lodash's pick() is bubbling up.

I'd call this keysToSnapshot or onlySnapshotKeys, etc. so it's a bit more clear to someone reading it.

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.

3 participants