Skip to content

Implement the RRM express setup dashboard entry point.#13107

Open
JakePT wants to merge 17 commits into
developfrom
enhancement/12947-rrm-express-setup-entry
Open

Implement the RRM express setup dashboard entry point.#13107
JakePT wants to merge 17 commits into
developfrom
enhancement/12947-rrm-express-setup-entry

Conversation

@JakePT

@JakePT JakePT commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

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.
  • 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.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

🤖 This comment is automatically updated by CI workflows. Each section is managed independently.

🎭 Playwright reports for af5343b:

📚 Storybook for af5343b:

📦 Build files for af5343b:

@JakePT
JakePT marked this pull request as ready for review July 14, 2026 07:10
@JakePT

JakePT commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Failing E2E tests are the usual suspects and VRT seems unrelated and passes locally.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Size Change: +12.5 kB (+0.34%)

Total Size: 3.72 MB

📦 View Changed
Filename Size Change
dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 68.2 kB +12.5 kB (+22.37%) 🚨
ℹ️ 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 0 B 0 B 🆕
dist/assets/blocks/reader-revenue-manager/block-editor-plugin/index.js 42.9 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 0 B 0 B 🆕
dist/assets/blocks/reader-revenue-manager/contribute-with-google/index.js 6.01 kB 0 B
dist/assets/blocks/reader-revenue-manager/contribute-with-google/non-site-kit-user.js 5.21 kB 0 B
dist/assets/blocks/reader-revenue-manager/subscribe-with-google/index.js 6.02 kB 0 B
dist/assets/blocks/reader-revenue-manager/subscribe-with-google/non-site-kit-user.js 5.21 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 0 B 0 B 🆕
dist/assets/blocks/sign-in-with-google/index.js 18.5 kB 0 B
dist/assets/css/googlesitekit-admin-css-********************.min.css 73.1 kB +260 B (+0.36%)
dist/assets/css/googlesitekit-adminbar-css-********************.min.css 12.7 kB 0 B
dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 851 B 0 B
dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 9.09 kB 0 B
dist/assets/js/46-********************.js 3.84 kB 0 B
dist/assets/js/65-********************.js 1.03 kB 0 B
dist/assets/js/187-********************.js 101 kB 0 B
dist/assets/js/308-********************.js 3 kB 0 B
dist/assets/js/315-********************.js 3.08 kB 0 B
dist/assets/js/397-********************.js 477 kB 0 B
dist/assets/js/403-********************.js 2.26 kB 0 B
dist/assets/js/509-********************.js 970 B 0 B
dist/assets/js/658-********************.js 52.7 kB 0 B
dist/assets/js/917-********************.js 2.41 kB 0 B
dist/assets/js/analytics-advanced-tracking-********************.js 404 B 0 B
dist/assets/js/googlesitekit-activation-********************.js 27.1 kB -167 B (-0.61%)
dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 65.6 kB -127 B (-0.19%)
dist/assets/js/googlesitekit-admin-pointers-tracking-********************.js 5.37 kB 0 B
dist/assets/js/googlesitekit-adminbar-********************.js 40.9 kB -111 B (-0.27%)
dist/assets/js/googlesitekit-api-********************.js 8.04 kB 0 B
dist/assets/js/googlesitekit-block-tracking-********************.js 5.56 kB 0 B
dist/assets/js/googlesitekit-components-********************.js 6.28 kB 0 B
dist/assets/js/googlesitekit-consent-mode-********************.js 26 kB 0 B
dist/assets/js/googlesitekit-data-********************.js 1.83 kB 0 B
dist/assets/js/googlesitekit-datastore-forms-********************.js 7.21 kB 0 B
dist/assets/js/googlesitekit-datastore-location-********************.js 1.6 kB 0 B
dist/assets/js/googlesitekit-datastore-pdf-********************.js 1.2 kB 0 B
dist/assets/js/googlesitekit-datastore-site-********************.js 19 kB 0 B
dist/assets/js/googlesitekit-datastore-ui-********************.js 7.37 kB 0 B
dist/assets/js/googlesitekit-datastore-user-********************.js 23.7 kB 0 B
dist/assets/js/googlesitekit-entity-dashboard-********************.js 79.5 kB -107 B (-0.13%)
dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 2.35 kB 0 B
dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 1.12 kB 0 B
dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 2.34 kB 0 B
dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 2.3 kB 0 B
dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 2.22 kB 0 B
dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 2.44 kB 0 B
dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 1.08 kB 0 B
dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 2.44 kB 0 B
dist/assets/js/googlesitekit-i18n-********************.js 4.43 kB 0 B
dist/assets/js/googlesitekit-key-metrics-setup-********************.js 59.5 kB -202 B (-0.34%)
dist/assets/js/googlesitekit-main-dashboard-********************.js 209 kB -231 B (-0.11%)
dist/assets/js/googlesitekit-metric-selection-********************.js 64.7 kB -103 B (-0.16%)
dist/assets/js/googlesitekit-modules-********************.js 28 kB +78 B (+0.28%)
dist/assets/js/googlesitekit-modules-ads-********************.js 49.7 kB -16 B (-0.03%)
dist/assets/js/googlesitekit-modules-adsense-********************.js 160 kB -66 B (-0.04%)
dist/assets/js/googlesitekit-modules-analytics-4-********************.js 280 kB -156 B (-0.06%)
dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 27.4 kB +47 B (+0.17%)
dist/assets/js/googlesitekit-modules-search-console-********************.js 75.8 kB -85 B (-0.11%)
dist/assets/js/googlesitekit-modules-sign-in-with-google-********************.js 35.1 kB -38 B (-0.11%)
dist/assets/js/googlesitekit-modules-tagmanager-********************.js 32 kB 0 B
dist/assets/js/googlesitekit-notifications-********************.js 85 kB -73 B (-0.09%)
dist/assets/js/googlesitekit-polyfills-********************.js 228 B 0 B
dist/assets/js/googlesitekit-settings-********************.js 167 kB -56 B (-0.03%)
dist/assets/js/googlesitekit-splash-********************.js 90.6 kB -154 B (-0.17%)
dist/assets/js/googlesitekit-user-input-********************.js 56.9 kB -99 B (-0.17%)
dist/assets/js/googlesitekit-vendor-********************.js 791 kB 0 B
dist/assets/js/googlesitekit-vendor-lazy-pdf-********************.js 19.1 kB 0 B
dist/assets/js/googlesitekit-widgets-********************.js 178 kB -28 B (-0.02%)
dist/assets/js/googlesitekit-wp-dashboard-********************.js 68.5 kB -139 B (-0.2%)
dist/assets/js/runtime-********************.js 1.94 kB 0 B
dist/assets/js/sign-in-with-google-********************.js 1.14 kB 0 B

compressed-size-action

padding-top: 0;
}

.googlesitekit-banner--rrm-setup {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I styled the banner in here with this class, rather than what's described in the IB, as it felt like more idiomatic BEM to me, being a variation of a banner.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd argue this is a consumer of Banner rather than a variation, so the class name should ideally be along the lines of googlesitekit-rrm-cta-banner, and thus, these styles should be relocated to its own stylesheet.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@nfmohit Have to say I really disagree with this. The banner is intimately tied to .googlesitekit-banner component because it needs to style the googlesitekit-banner__ elements anyway, and the styles are useless without the original component styles. In my mind it's a pretty textbook case for a BEM modifier class.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I get the BEM angle, but I still see this as a consumer of Banner rather than a Banner variation.

--setup-cta makes sense as a shared modifier because it’s reused across several setup CTAs and only tweaks the shared look. What’s in --rrm-setup is RRM-specific (gradient, typography, spacing, widget border-radius) and isn’t meant to be reused elsewhere, so I’d keep it out of the Banner stylesheet.

We’ve done this before with feature-specific Banner consumers. e.g. ConnectGA4CTAWidget uses googlesitekit-banner--setup-cta for the shared bits, then googlesitekit-km-connect-ga4-cta for the one-off overrides, with those styles living in _googlesitekit-key-metrics-setup-cta.scss (still targeting .googlesitekit-banner__* from there).

I do acknowledge your reasoning; your approach is more strictly BEM, but I’d rather stick with how we usually handle this in Site Kit, i.e., feature-specific overrides living with the feature under its own class.

So, I’d lean toward something like googlesitekit-rrm-cta-banner, even if it reaches into Banner’s elements. Happy to discuss further if you feel strongly otherwise.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@nfmohit I've moved the styles into a .googlesitekit-rrm-setup-cta-banner class in its own file in the module. It required an ugly &.googlesitekit-banner { to fix specificity issues that it caused, which is another reason I'm not a big fan, but I understand the need for consistency and feature ownership reasoning.


@media (min-width: $width-tablet + 1 + px) {
p.googlesitekit-banner__title {
@include googlesitekit-typography(headline, small);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I thought a mixin like this would be useful for re-using typography styles on elements that aren't using the Typography component, like the banner heading, and need to switch between styles at different breakpoints.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks clean, fantastic work!

Applying this mixin means overriding more styles than we need to, because the Banner component by default matches most of the Figma designs, but it does look much cleaner, easier to read, and more referable to the Figma designs.

RRM_EXPRESS_SETUP_TRAFFIC_CTA_WIDGET_SLUG,
} from '@/js/modules/reader-revenue-manager/constants';

// @ts-expect-error TODO: Add type for `widgets` when googlesitekit-widgets is migrated to TypeScript.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@nfmohit nfmohit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Brilliant work on this, thanks @JakePT!

I've left a number of comments for your consideration. Please let me know if you have any questions or concerns, thank you!

Comment thread assets/js/modules/reader-revenue-manager/notifications/index.js Outdated
padding-top: 0;
}

.googlesitekit-banner--rrm-setup {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd argue this is a consumer of Banner rather than a variation, so the class name should ideally be along the lines of googlesitekit-rrm-cta-banner, and thus, these styles should be relocated to its own stylesheet.

Comment thread assets/sass/components/banner/_googlesitekit-banner.scss Outdated

@media (min-width: $width-tablet + 1 + px) {
p.googlesitekit-banner__title {
@include googlesitekit-typography(headline, small);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks clean, fantastic work!

Applying this mixin means overriding more styles than we need to, because the Banner component by default matches most of the Figma designs, but it does look much cleaner, easier to read, and more referable to the Figma designs.

}
}

@media (min-width: $width-tablet + 1 + px) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why don't we use $bp-tablet here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@nfmohit I was just matching the media queries used for the styles being overwritten, but I can update both to $bp-nonTablet, which includes the 1px.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@nfmohit I've replaced $width-tablet + 1 + px with $bp-nonMobile and $width-desktop + 1 + px with $bp-nonTablet throughout this file.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! I didn't realize that this stylesheet was already using the width + 1 pattern, so we could've stuck with that too. Either is fine in that case, thank you!

}
}

@media (min-width: $width-desktop + 1 + px) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why don't we use $bp-desktop here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@nfmohit I was just matching the media queries used for the styles being overwritten, but I can update both to $bp-nonTablet, which includes the 1px.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@nfmohit I've replaced $width-tablet + 1 + px with $bp-nonMobile and $width-desktop + 1 + px with $bp-nonTablet throughout this file.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! I didn't realize that this stylesheet was already using the width + 1 pattern, so we could've stuck with that too. Either is fine in that case, thank you!

@nfmohit nfmohit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for addressing my feedback, @JakePT. I've left some additional comments and responded to some of yours. Please let me know what you think, thanks!

Comment on lines +50 to +52
export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could we fix the type errors here? We'd have to declare a type for Default.

Suggested change
export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {};
export const Default = Template.bind( {} ) as Story< WidgetComponentProps >;
Default.storyName = 'Default';
Default.scenario = {};

Comment thread assets/js/googlesitekit/widgets/register-defaults.js Outdated
Comment thread assets/js/components/PoweredBy.tsx Outdated
Comment thread assets/js/components/PoweredBy.tsx Outdated

export default function PoweredByReaderRevenueManager() {
return (
<div className="googlesitekit-powered-by googlesitekit-powered-by--reader-revenue-manager">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks okay to me. There is indeed a name property if you use the getModule( slug ) selector. See:

If we go with the module definition approach, we should probably rename the component to PoweredByModule or something along those lines, WDYT?

Comment thread assets/js/components/PoweredBy.tsx Outdated
Comment thread assets/js/components/PoweredBy.stories.js Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's use TS for this file too please.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@nfmohit Done.

}
}

@media (min-width: $width-tablet + 1 + px) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! I didn't realize that this stylesheet was already using the width + 1 pattern, so we could've stuck with that too. Either is fine in that case, thank you!

}
}

@media (min-width: $width-desktop + 1 + px) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! I didn't realize that this stylesheet was already using the width + 1 pattern, so we could've stuck with that too. Either is fine in that case, thank you!

padding-top: 0;
}

.googlesitekit-banner--rrm-setup {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I get the BEM angle, but I still see this as a consumer of Banner rather than a Banner variation.

--setup-cta makes sense as a shared modifier because it’s reused across several setup CTAs and only tweaks the shared look. What’s in --rrm-setup is RRM-specific (gradient, typography, spacing, widget border-radius) and isn’t meant to be reused elsewhere, so I’d keep it out of the Banner stylesheet.

We’ve done this before with feature-specific Banner consumers. e.g. ConnectGA4CTAWidget uses googlesitekit-banner--setup-cta for the shared bits, then googlesitekit-km-connect-ga4-cta for the one-off overrides, with those styles living in _googlesitekit-key-metrics-setup-cta.scss (still targeting .googlesitekit-banner__* from there).

I do acknowledge your reasoning; your approach is more strictly BEM, but I’d rather stick with how we usually handle this in Site Kit, i.e., feature-specific overrides living with the feature under its own class.

So, I’d lean toward something like googlesitekit-rrm-cta-banner, even if it reaches into Banner’s elements. Happy to discuss further if you feel strongly otherwise.

@JakePT

JakePT commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

@nfmohit GitHub's threads are becoming unwieldy but I think I've responded to or fixed everything.

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