-
Notifications
You must be signed in to change notification settings - Fork 291
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
Conversation
…ot reliable for query params.
Build files for da3ec15 have been deleted. |
There was a problem hiding this 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.stories.js
Outdated
Show resolved
Hide resolved
}; | ||
WarningWithExternalCTA.scenario = {}; | ||
|
||
export default { |
There was a problem hiding this comment.
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?
assets/js/components/notifications/SubtleNotification.stories.js
Outdated
Show resolved
Hide resolved
) } | ||
onDismiss={ onDismiss } | ||
dismissLabel={ __( 'Maybe later', 'google-site-kit' ) } | ||
ctaLink={ serviceURL } |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for confirming, @nfmohit.
@kuasha420, it would be nice to have unit test coverage for the |
Size Change: +20.7 kB (+1.22%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
@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 Final note, the VRT is failing on completely unrelated components, and are passing locally. Thank you. |
.../js/modules/reader-revenue-manager/components/dashboard/RRMSetupSuccessSubtleNotification.js
Outdated
Show resolved
Hide resolved
.../js/modules/reader-revenue-manager/components/dashboard/RRMSetupSuccessSubtleNotification.js
Outdated
Show resolved
Hide resolved
...les/reader-revenue-manager/components/dashboard/RRMSetupSuccessSubtleNotification.stories.js
Outdated
Show resolved
Hide resolved
...les/reader-revenue-manager/components/dashboard/RRMSetupSuccessSubtleNotification.stories.js
Outdated
Show resolved
Hide resolved
...les/reader-revenue-manager/components/dashboard/RRMSetupSuccessSubtleNotification.stories.js
Outdated
Show resolved
Hide resolved
...les/reader-revenue-manager/components/dashboard/RRMSetupSuccessSubtleNotification.stories.js
Show resolved
Hide resolved
There was a problem hiding this 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:
ReaderRevenueManager/Dashboard/RRMSetupSuccessSubtleNotification
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!
There was a problem hiding this 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
.
Summary
Addresses issue:
Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist