Skip to content

Add CTAPreview component shell.#13136

Open
ankitrox wants to merge 4 commits into
developfrom
enhancement/13025-cta-preview-shell
Open

Add CTAPreview component shell.#13136
ankitrox wants to merge 4 commits into
developfrom
enhancement/13025-cta-preview-shell

Conversation

@ankitrox

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 17, 2026

Copy link
Copy Markdown

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

📚 Storybook for 85afb59:

📦 Build files for 85afb59:

🎭 Playwright reports for 85afb59:

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

Size Change: +5.54 kB (+0.15%)

Total Size: 3.67 MB

📦 View Changed
Filename Size Change
dist/assets/css/googlesitekit-admin-css-********************.min.css 78.4 kB +5.54 kB (+7.6%) 🔍
ℹ️ 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-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.3 kB 0 B
dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 65.7 kB 0 B
dist/assets/js/googlesitekit-admin-pointers-tracking-********************.js 5.37 kB 0 B
dist/assets/js/googlesitekit-adminbar-********************.js 41 kB 0 B
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.6 kB 0 B
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.7 kB 0 B
dist/assets/js/googlesitekit-main-dashboard-********************.js 209 kB 0 B
dist/assets/js/googlesitekit-metric-selection-********************.js 64.8 kB 0 B
dist/assets/js/googlesitekit-modules-********************.js 27.9 kB 0 B
dist/assets/js/googlesitekit-modules-ads-********************.js 49.7 kB 0 B
dist/assets/js/googlesitekit-modules-adsense-********************.js 160 kB 0 B
dist/assets/js/googlesitekit-modules-analytics-4-********************.js 279 kB 0 B
dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 27.4 kB 0 B
dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 55.3 kB +13 B (+0.02%)
dist/assets/js/googlesitekit-modules-search-console-********************.js 75.1 kB 0 B
dist/assets/js/googlesitekit-modules-sign-in-with-google-********************.js 35.1 kB 0 B
dist/assets/js/googlesitekit-modules-tagmanager-********************.js 32 kB 0 B
dist/assets/js/googlesitekit-notifications-********************.js 85.1 kB 0 B
dist/assets/js/googlesitekit-polyfills-********************.js 228 B 0 B
dist/assets/js/googlesitekit-settings-********************.js 167 kB 0 B
dist/assets/js/googlesitekit-splash-********************.js 90.7 kB 0 B
dist/assets/js/googlesitekit-user-input-********************.js 57 kB 0 B
dist/assets/js/googlesitekit-vendor-********************.js 791 kB 0 B
dist/assets/js/googlesitekit-vendor-lazy-pdf-********************.js 18.5 kB 0 B
dist/assets/js/googlesitekit-widgets-********************.js 132 kB 0 B
dist/assets/js/googlesitekit-wp-dashboard-********************.js 68.6 kB 0 B
dist/assets/js/runtime-********************.js 1.95 kB 0 B
dist/assets/js/sign-in-with-google-********************.js 1.14 kB 0 B

compressed-size-action

@hussain-t hussain-t 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.

Thanks, @ankitrox! This is a good start. I've left a few comments for you to take a look at.


export { default as SetupForm } from './SetupForm';
export { default as SetupMain } from './SetupMain';
export * as SetupMainExpress from './SetupMainExpress';

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.

The develop branch already has it. Please pull the latest and resolve any conflicts.

const CTA_PREVIEW_TAB_POPUP = 0;
const CTA_PREVIEW_TAB_INLINE = 1;

export default function CTAPreview( {

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.

Since this is a new component, could we implement it in TypeScript?

);
}

CTAPreview.propTypes = {

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.

Please use the interface with TS.

@@ -0,0 +1,19 @@
/**
* Reader Revenue Manager SetupMainExpress components.

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.

develop already has SetupMainExpress/index.tsx. This barrel should be removed; CTAPreview can be imported from its own path (SetupMainExpress/CTAPreview).

@@ -0,0 +1,39 @@
/**
* Reader Revenue Manager CTAPreview component stories.

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.

Please migrate it to TypeScript.

/**
* Reader Revenue Manager CTAPreview component tests.
*
* Site Kit by Google, Copyright 2025 Google LLC

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.

Suggested change
* Site Kit by Google, Copyright 2025 Google LLC
* Site Kit by Google, Copyright 2026 Google LLC

/**
* Reader Revenue Manager CTA Preview styles.
*
* Site Kit by Google, Copyright 2025 Google LLC

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.

Suggested change
* Site Kit by Google, Copyright 2025 Google LLC
* Site Kit by Google, Copyright 2026 Google LLC

Comment on lines +42 to +44
.googlesitekit-rrm-cta-preview__description {
text-align: left;
}

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.

Nit: a few lines here (42-44, 81-83, 91-93) are space-indented while the rest of the file uses tabs. Can we make it consistent?

}
}

.mdc-tab__ripple {

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.

Hiding .mdc-tab__ripple also removes the visible keyboard focus state. Could we keep it or add a :focus-visible style?


.googlesitekit-plugin {

.googlesitekit-rrm-cta-preview {

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.

The IB calls for a rounded card, but the container has no border radius. Could we add the appropriate border radius? As per the Figma design, the container should have an 8px border-radius.

Image

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