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

Enhancement/9335 SiWG Setup Banner CTA #9560

Merged
merged 45 commits into from
Nov 5, 2024

Conversation

jimmymadon
Copy link
Collaborator

@jimmymadon jimmymadon commented Oct 25, 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.
  • 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.

@jimmymadon jimmymadon marked this pull request as ready for review October 28, 2024 09:23
Copy link

github-actions bot commented Oct 28, 2024

Build files for 3a3caf2 have been deleted.

Copy link

github-actions bot commented Oct 28, 2024

Size Change: +5.21 kB (+0.28%)

Total Size: 1.85 MB

Filename Size Change
./dist/assets/css/googlesitekit-admin-css-********************.min.css 59.5 kB +72 B (+0.12%)
./dist/assets/js/42-********************.js 3.12 kB +1 B (+0.03%)
./dist/assets/js/googlesitekit-activation-********************.js 24 kB +15 B (+0.06%)
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 54.9 kB -40 B (-0.07%)
./dist/assets/js/googlesitekit-adminbar-********************.js 34.6 kB -1 B (0%)
./dist/assets/js/googlesitekit-data-********************.js 2.37 kB -2 B (-0.08%)
./dist/assets/js/googlesitekit-datastore-forms-********************.js 8.96 kB +3 B (+0.03%)
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.08 kB -3 B (-0.14%)
./dist/assets/js/googlesitekit-datastore-user-********************.js 27.2 kB +3 B (+0.01%)
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 81.4 kB -162 B (-0.2%)
./dist/assets/js/googlesitekit-main-dashboard-********************.js 158 kB -39 B (-0.02%)
./dist/assets/js/googlesitekit-modules-ads-********************.js 33.4 kB -26 B (-0.08%)
./dist/assets/js/googlesitekit-modules-adsense-********************.js 111 kB -21 B (-0.02%)
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 180 kB -85 B (-0.05%)
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 22.7 kB -4 B (-0.02%)
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 40.6 kB +5 B (+0.01%)
./dist/assets/js/googlesitekit-modules-search-console-********************.js 59.9 kB +2 B (0%)
./dist/assets/js/googlesitekit-modules-sign-in-with-google-********************.js 24.2 kB +5.16 kB (+27.11%) 🚨
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 32.1 kB +11 B (+0.03%)
./dist/assets/js/googlesitekit-notifications-********************.js 22.7 kB +35 B (+0.15%)
./dist/assets/js/googlesitekit-settings-********************.js 121 kB +93 B (+0.08%)
./dist/assets/js/googlesitekit-splash-********************.js 69 kB +66 B (+0.1%)
./dist/assets/js/googlesitekit-user-input-********************.js 43.6 kB -22 B (-0.05%)
./dist/assets/js/googlesitekit-vendor-********************.js 322 kB +19 B (+0.01%)
./dist/assets/js/googlesitekit-widgets-********************.js 92.1 kB +111 B (+0.12%)
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 62.6 kB +19 B (+0.03%)
./dist/assets/js/runtime-********************.js 1.4 kB +2 B (+0.14%)
ℹ️ View Unchanged
Filename Size
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.8 kB
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 846 B
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 8.2 kB
./dist/assets/js/32-********************.js 2.76 kB
./dist/assets/js/33-********************.js 2.25 kB
./dist/assets/js/34-********************.js 3.64 kB
./dist/assets/js/35-********************.js 935 B
./dist/assets/js/36-********************.js 893 B
./dist/assets/js/37-********************.js 1.61 kB
./dist/assets/js/38-********************.js 1.57 kB
./dist/assets/js/39-********************.js 1.61 kB
./dist/assets/js/40-********************.js 1.59 kB
./dist/assets/js/41-********************.js 1.64 kB
./dist/assets/js/analytics-advanced-tracking-********************.js 901 B
./dist/assets/js/googlesitekit-api-********************.js 10.1 kB
./dist/assets/js/googlesitekit-components-gm2-********************.js 6.08 kB
./dist/assets/js/googlesitekit-components-gm3-********************.js 10.1 kB
./dist/assets/js/googlesitekit-consent-mode-********************.js 25.6 kB
./dist/assets/js/googlesitekit-datastore-site-********************.js 20.5 kB
./dist/assets/js/googlesitekit-datastore-ui-********************.js 10.1 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-modules-********************.js 22.2 kB
./dist/assets/js/googlesitekit-polyfills-********************.js 377 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.

Thanks @jimmymadon LGTM

Although I think refactoring the description paragraph could have been better as a separate issue, since it includes additional changes, they are fairly small so I think it is fine to be included as part of the PR

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.

A few questions/small comments but otherwise looks good 👍🏻

Copy link
Collaborator

Choose a reason for hiding this comment

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

The consent mode changes in this PR are intentional, right? I don't see any notes about them in the PR description, but I'm guessing it's just some HTML element updates that were needed?

Just making sure they should be here…

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So to reuse the same <Description> component within the new layout - I had to make it similar to the way it is being used in existing layouts. This meant wrapping the p in a div. Alternatively, I could've created YET another set of unique styles for this banner compared to the others which would eventually have to be refactored in the future. So I just decided to make minor modifications to the ConsentModeSetupCTAWidget as well as AdsModuleSetupCTAWidget as these use the same description styles.


return (
<div className="googlesitekit-publisher-win__actions">
<div className={ className }>
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't allow developers to replace the existing class name, I'd think… so we should do this instead:

Suggested change
<div className={ className }>
<div className={ classnames( 'googlesitekit-publisher-win__actions', className ) }>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I understand, but here, the class name is essentially a flag for the version we need to use for this component. Unfortunately, googlesitekit-publisher-win__actions and googlesitekit-setup-cta-banner__actions-wrapper are conflicting with each other - so we can either apply one or the other. If we were to use classnames, we would have to create another flag like type or something solely for styling. Type could then be banner-notification or setup-cta. And then we'd have to switch the classname based on the type. Ideally, we should be refactoring the legacy banner notifications (viz. all classes with googlesitekit-publisher-win*) soon.

So is this worth add the whole type flag, etc or should I leave this as is?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess in that case we can leave it as-is, fair enough.

return (
<div className="googlesitekit-publisher-win__desc">
<div className={ className }>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here; let's use classnames()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same reasoning as above.

title,
description,
actions,
SVG,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Capital prop names are a bit odd. I'm guessing it's done so you can use <SVG /> below…

Looks like we do this elsewhere too, so no need to change it, but I guess leaving my comment here so it's recognised 😆

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, this just clearly screams that we need a component as a prop here - similar to how we use pass Widget, WidgetNull, Notification, etc as well.

@@ -0,0 +1,37 @@
/**
* Sign In With Google Setup CTA Banner styles.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Sign In With Google Setup CTA Banner styles.
* Sign in with Google Setup CTA Banner styles.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tofumatt Just to clarify, these changes are actually standardising the fonts of the description for existing components on certain viewports.

@tofumatt
Copy link
Collaborator

tofumatt commented Nov 5, 2024

Thanks for the explanations/clarifications, this is good-to-go 👍🏻

@tofumatt tofumatt merged commit 5ebbb60 into develop Nov 5, 2024
19 of 23 checks passed
@tofumatt tofumatt deleted the enhancement/9335-siwg-banner-cta branch November 5, 2024 19:53
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