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

RRM Setup Success Notification #9117

Merged
merged 15 commits into from
Aug 7, 2024

Conversation

kuasha420
Copy link
Contributor

@kuasha420 kuasha420 commented Aug 2, 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.

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.

@kuasha420 kuasha420 marked this pull request as ready for review August 6, 2024 03:36
Copy link

github-actions bot commented Aug 6, 2024

Build files for da3ec15 have been deleted.

Copy link
Collaborator

@hussain-t hussain-t left a comment

Choose a reason for hiding this comment

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

Great work, @kuasha420. The changes almost look good. However, I've left a few comments. Please take a look at them.

assets/js/components/notifications/SubtleNotification.js Outdated Show resolved Hide resolved
assets/js/components/notifications/SubtleNotification.js Outdated Show resolved Hide resolved
assets/js/components/notifications/SubtleNotification.js Outdated Show resolved Hide resolved
assets/js/components/notifications/SubtleNotification.js Outdated Show resolved Hide resolved
};
WarningWithExternalCTA.scenario = {};

export default {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add a story that passes a custom Icon prop?

) }
onDismiss={ onDismiss }
dismissLabel={ __( 'Maybe later', 'google-site-kit' ) }
ctaLink={ serviceURL }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to dismiss the notification when clicking the CTA? cc: @nfmohit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so, but I'll let @nfmohit to confirm.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If so, we can simply pass the onDismiss callback to the onCTAClick prop.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, I think that would make sense. Let's do it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for confirming, @nfmohit.

@hussain-t
Copy link
Collaborator

@kuasha420, it would be nice to have unit test coverage for the RRMSetupSuccessSubtleNotification component.

Copy link

github-actions bot commented Aug 7, 2024

Size Change: +20.7 kB (+1.22%)

Total Size: 1.72 MB

Filename Size Change
./dist/assets/css/googlesitekit-admin-css-********************.min.css 57 kB +240 B (+0.42%)
./dist/assets/js/36-********************.js 3.12 kB -1 B (-0.03%)
./dist/assets/js/googlesitekit-activation-********************.js 23.8 kB +85 B (+0.36%)
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 63.6 kB +3.77 kB (+6.3%) 🔍
./dist/assets/js/googlesitekit-adminbar-********************.js 34.6 kB +33 B (+0.1%)
./dist/assets/js/googlesitekit-api-********************.js 10 kB +1 B (+0.01%)
./dist/assets/js/googlesitekit-components-gm2-********************.js 5.97 kB +6 B (+0.1%)
./dist/assets/js/googlesitekit-components-gm3-********************.js 10.1 kB +3 B (+0.03%)
./dist/assets/js/googlesitekit-data-********************.js 2.35 kB -1 B (-0.04%)
./dist/assets/js/googlesitekit-datastore-forms-********************.js 9.03 kB -1 B (-0.01%)
./dist/assets/js/googlesitekit-datastore-site-********************.js 20.4 kB -4 B (-0.02%)
./dist/assets/js/googlesitekit-datastore-user-********************.js 25.3 kB +5 B (+0.02%)
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 78.9 kB -389 B (-0.49%)
./dist/assets/js/googlesitekit-main-dashboard-********************.js 153 kB +1.3 kB (+0.86%)
./dist/assets/js/googlesitekit-modules-********************.js 22.3 kB +165 B (+0.74%)
./dist/assets/js/googlesitekit-modules-ads-********************.js 29.6 kB +83 B (+0.28%)
./dist/assets/js/googlesitekit-modules-adsense-********************.js 117 kB +3.48 kB (+3.06%)
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 165 kB -30 B (-0.02%)
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 22.7 kB +89 B (+0.39%)
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 20.5 kB -8 B (-0.04%)
./dist/assets/js/googlesitekit-modules-search-console-********************.js 58.6 kB -321 B (-0.54%)
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 32.1 kB +19 B (+0.06%)
./dist/assets/js/googlesitekit-notifications-********************.js 4.04 kB -2 B (-0.05%)
./dist/assets/js/googlesitekit-polyfills-********************.js 376 B -1 B (-0.27%)
./dist/assets/js/googlesitekit-settings-********************.js 77.8 kB +3.42 kB (+4.6%) 🔍
./dist/assets/js/googlesitekit-splash-********************.js 78.4 kB +4.3 kB (+5.8%) 🔍
./dist/assets/js/googlesitekit-user-input-********************.js 53.2 kB +4.35 kB (+8.91%) 🔍
./dist/assets/js/googlesitekit-vendor-********************.js 321 kB +54 B (+0.02%)
./dist/assets/js/googlesitekit-widgets-********************.js 81.7 kB +65 B (+0.08%)
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 61.8 kB +21 B (+0.03%)
./dist/assets/js/runtime-********************.js 1.3 kB +1 B (+0.08%)
ℹ️ 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/31-********************.js 2.76 kB
./dist/assets/js/32-********************.js 2.25 kB
./dist/assets/js/33-********************.js 3.64 kB
./dist/assets/js/34-********************.js 935 B
./dist/assets/js/35-********************.js 892 B
./dist/assets/js/analytics-advanced-tracking-********************.js 901 B
./dist/assets/js/googlesitekit-consent-mode-********************.js 25.6 kB
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.08 kB
./dist/assets/js/googlesitekit-datastore-ui-********************.js 9.98 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

compressed-size-action

@kuasha420
Copy link
Contributor Author

@hussain-t Thank you for your thorough code review on this. I've address all of them. Please, have a look.

I tried to add tests for the RRMSetupSuccessSubtleNotification but faced some issues with the query args, hence I added the VRTs for it instead as discussed internally.

Final note, the VRT is failing on completely unrelated components, and are passing locally.

Thank you.

Copy link
Collaborator

@hussain-t hussain-t left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the feedback, @kuasha420. I've made a few minor changes, as noted in my comments. Besides that, after pulling the latest develop, I noticed some inconsistencies in the Storybook stories folder structure:

  1. ReaderRevenueManager/Dashboard/RRMSetupSuccessSubtleNotification
  2. ReaderRevenueManager/Components/Dashboard/ReaderRevenueManagerSetupCTABanner

We should maintain a consistent structure for the dashboard components. I'm fine with either of the above options, so I'll leave the decision to you.

Additionally, @nfmohit suggested dismissing the notification when clicking the CTA. Let's incorporate this change as well. We can pass the onDismiss callback to the onCTAClick prop.

Thanks!

Copy link
Collaborator

@hussain-t hussain-t left a comment

Choose a reason for hiding this comment

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

Excellent work, @kuasha420. LGTM 👍

So that you know, I've slightly updated the QAB.

Note: As discussed on Slack, let's create a new ticket to implement unit tests and reuse this components/notifications/SubtleNotification.js component instead of modules/analytics-4/components/SubtleNotification.js.

@hussain-t hussain-t merged commit cf403e9 into develop Aug 7, 2024
21 checks passed
@hussain-t hussain-t deleted the enhance/8840-rrm-success-notification branch August 7, 2024 15:49
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