-
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
Implement RRM module setup success banner #8840
Comments
Thank you for the brilliant IB, @hussain-t ! Please take a look at my comments below:
Please let me know what you think, thank you! |
Thanks, @nfmohit. I initially included the copies in the IB to accommodate reviewers who prefer to have the text repeated for clarity. However, as suggested, I have updated the IB to reference the ACs directly. The source of truth for the copies should be the Figma design. |
Thanks @hussain-t ! IB LGTM 👍 ✅ |
QA Update ❌I've tested this and I will document down additional ITEMS here, starting to number it as from 3 and leave item 1 and 2 as what @nfmohit has highlighted in this comment. I am assigning this to @kuasha420 for fixes. Meanwhile, I am also tagging @nfmohit and @wpdarren in this because we did refer to @wpdarren 's observations under this document. I am not sure if we want to create additional tickets for those or which ones should sit within this issue as items 7 onwards. Would be great if you can review this so that we can track the issues better. ITEM 3: More context in the video below. Banner.disappears.if.go.to.another.page.but.reloading.it.s.there.movITEM 4: ITEM 5: ITEM 6: More context in the video below: subtle.notification.disappears.after.click.on.customize.mov |
Thank you @hussain-t @nfmohit and @kelvinballoo ! I've filed a follow up PR to fix most of the points raised. In addition- ITEM 3 - This is consistent with the Setup Success Notifications of other modules. So this can move ahead as is. However, I think we need to show a similar notification if the publication needs further attention, once this notification is no longer displayed. Is there a issue filed for that, @nfmohit? ITEM 5 - That's a good point, however, I couldn't find a design for tablet for Subtle Notification. Feel free to create a separate issue for this, and we can ask Sigal for a tablet design. ITEM 6 - This was decided during CR here. I think it makes sense to dismiss the notifications on both CTA, but doesn't have a strong opinion either way. Any thoughts @nfmohit @hussain-t @techanvil ? Thanks all! |
Hmm, actually I am not sure it's such a good idea to dismiss a notification when the CTA is an external link. There's no way of knowing for sure if the user successfully navigated to the link when clicking on the CTA, so it would be useful to keep the notification open in case they need to click on it again. That's my 2p on the issue, anyway. |
@techanvil I agree. In the follow-up PR, we've removed the dismissal from the primary CTA. Thank you! |
Top stuff, thanks @nfmohit. |
Hi @kelvinballoo ! This is now back with you as we've addressed your observations with a follow-up PR:
I think most of these concerns have been addressed, or Asana tasks have been created for them. Please let me know otherwise.
This is how the UX was defined. We will have notices in the module settings screens if the publication requires further setup/is pending verification. If you think it would be better to persist this notification until dismissed, could you please add this as a "Nice to Have" in the bug bash board? Thank you!
This has been addressed in a way such that if there is not enough space for the buttons (in extremely shrunk viewports), we'll stack the buttons so that one appears on top of another.
@kelvinballoo If you do open an issue about this, please let it be a general enhancement issue for all subtle notifications, not specific to RRM. Thanks!
We have changed this so that the banner is not dismissed anymore as part of the primary CTA. Please let me know if you have any other concerns, thank you! |
QA Update
|
Thank you @kelvinballoo. I would suggest creating a new general improvement issue for this so that we can put this suggestion for all subtle notifications. Thank you. |
QA Update ✅Thanks for checking @nfmohit . This is good to go. ITEM 1 ✅ ITEM 2 ✅ ITEM 3 ✅ ITEM 4 ✅ ITEM 5 ✅ Agreed. New ticket raised here: #9215 ITEM 6 ✅ primary.cta.ok.mov |
Feature Description
A subtle notification component should be used to implement the setup success banner for the Reader Revenue Manager module. The copy of the banner will vary depending on the onboarding state of the connected publication.
Screenshots for reference
Publication is awaiting review:
User needs to perform additional steps to complete publication setup:
Publication setup is complete:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Reusable
SubtleNotification
componentIn the
assets/js/components/notifications
directory, create a new component,SubtleNotification.js
:SubtleNotification
that renders a notification with the following props:title
: The title of the notification.description
: The description of the notification.icon
: The icon for the notification (optional).ctaLabel
: The label for the CTA button.ctaLink
: The URL for the CTA button.onCTAClick
: A callback function to handle the CTA button click.ctaLinkExternal
: A boolean to indicate if the CTA link should open in a new tab and show an external link icon.dismissLabel
: The label for the dismiss button.onDismiss
: A callback function to dismiss the notification.variant
: The variant of the notification (success or warning). By default, it should besuccess
.googlesitekit-subtle-notification--warning
class to the notification container if the variant iswarning
.check-fill.svg
icon if the variant issuccess
.warning.svg
icon if the variant iswarning
.icon
prop is provided, render the provided icon.googlesitekit-subtle-notification--warning
class styles and any other necessary styles for the component inassets/sass/components/dashboard/_googlesitekit-subtle-notification.scss
.RRMSetupSuccessSubtleNotification component
In
assets/js/modules/reader-revenue-manager/components
, add a newdashboard
directory and create a new component,RRMSetupSuccessSubtleNotification.js
:RRMSetupSuccessSubtleNotification
that renders the setup success notification for the Reader Revenue Manager module.READER_REVENUE_MANAGER_SETUP_SUCCESS_NOTIFICATION
ORRRM_SETUP_SUCCESS_NOTIFICATION
.isItemDismissed
selector.null
.getPublicationOnboardingState
selector.getPublicationID
selector.getServiceURL
selector and pass the publication ID as an argument.ONBOARDING_COMPLETE
, return theSubtleNotification
component with the following props:title
: As per the AC.description
: As per the AC.ctaLabel
: As per the AC.ctaLink
: The retrieved service URL.dismissLabel
: As per the AC.onDismiss
: A callback function that dispatches thedismissItem
action.ctaLinkExternal
:true
variant
:success
(optional).PENDING_VERIFICATION
, return theSubtleNotification
component with the following props:title
: As per the AC.description
: As per the AC.ctaLabel
: As per the AC.ctaLink
: The retrieved service URL.dismissLabel
: As per the AC.onDismiss
: A callback function that dispatches thedismissItem
action.ctaLinkExternal
:true
variant
:success
(optional).ONBOARDING_ACTION_REQUIRED
, return theSubtleNotification
component with the following props:title
: As per the AC.ctaLabel
: As per the AC.ctaLink
: The retrieved service URL.dismissLabel
: As per the AC.onDismiss
: A callback function that dispatches thedismissItem
action.ctaLinkExternal
:true
variant
:warning
.Add the notification to the Dashboard
In
assets/js/components/notifications/SubtleNotifications.js
:RRMSetupSuccessSubtleNotification
component only if therrmModule
feature flag is enabled.Test Coverage
SubtleNotification
component inassets/js/components/notifications/SubtleNotification.stories.js
.RRMSetupSuccessSubtleNotification
component inassets/js/modules/reader-revenue-manager/components/dashboard/RRMSetupSuccessSubtleNotification.stories.js
.SubtleNotification
component inassets/js/components/notifications/SubtleNotification.test.js
.QA Brief
Prerequisite
rrmModule
feature flag, go through the RRM setup flow. Once complete, the success notification should show up based on the status of the connected publication.Changelog entry
The text was updated successfully, but these errors were encountered: