Open nfmohit opened 1 month ago
Thank you for the IB, @ankitrox ! Please take a look at my comments below:
- Add
RRM_PUBLICATION_APPROVED_OVERLAY_NOTIFICATION
toassets/js/module/reader-revenue-manager/
with valuerrmPublicationApprovedOverlayNotification
.
We'd want to add this constant to the same component file and export it as well. For reference, see LINK_ANALYTICS_ADSENSE_OVERLAY_NOTIFICATION
in assets/js/components/OverlayNotification/LinkAnalyticsAndAdSenseAccountsOverlayNotification.js
.
- In the component check if the component is dismissed, if it is dismissed, pass
shouldShowNotification
prop toOverlayNotification
accordingly.
We should further expand on the conditions for the shouldShowNotification
prop. Please add the following criteria:
useViewOnly
hook). This requirement wasn't added in the ACs and I just added it, sorry!useDashboardType
hook). This requirement wasn't added in the ACs and I just added it, sorry!core/ui
store key mentioned in the AC is set to true
. We also need to add that key as a constant somewhere like assets/js/modules/reader-revenue-manager/datastore/constants.js
.Finally, we want to render this component in assets/js/components/OverlayNotification/OverlayNotificationsRenderer.js
, but only if the rrmModule
feature flag is enabled.
- Pass the different graphics for
GraphicDesktop
andGraphicMobile
according to the figma designs.
The link to the Figma designs here points to a different mock. It is sufficient to mention that the Figma designs from the ACs should be referenced.
Enable features
CTA should useButton
component withhref
prop passed to it. The link should behttps://publishercenter.google.com/reader-revenue-manager?publication={$publicationID}
where the$publicationID
is the approved publication ID.
Similar to other issues, the link should use the getServiceURL
selector with the publication ID passed to it.
Please let me know if you have any questions, thanks!
Thanks for the IB review @nfmohit . I've made the suggested changes in IB.
Assigning back to you for review.
Thank you for updating the IB, @ankitrox ! I've left a few follow-up comments:
- Add and export constant
RRM_PUBLICATION_APPROVED_OVERLAY_NOTIFICATION
toassets/js/modules/reader-revenue-manager/datastore/constants.js
with valuerrmPublicationApprovedOverlayNotification
.
Similar to other overlay notification components, I think this should reside in the component file itself, i.e. assets/js/module/reader-revenue-manager/components/PublicationApprovedOverlayNotification.js
.
- Rendering the banner/popup is handled here. It will be visible when the RRM feature is enabled.
I think this statement is no longer necessary as we're handling the rendering of the component in this issue.
RRM_PUBLICATION_APPROVED_OVERLAY_NOTIFICATION
key fromCORE_UI
store is set totrue
.
This constant doesn't currently exist, so it should be added to assets/js/modules/reader-revenue-manager/datastore/constants.js
as mentioned in the ACs.
Please let me know what you think, thank you!
Sorry @nfmohit , I was initially bit confused with both constants, but I've made it clear in IB now that one is for notification ID and other is for UI store.
Updated the IB according to suggestions.
Thank you.
Looks fantastic now, thank you @ankitrox ! IB LGTM 👍 ✅
Feature Description
A
<PublicationApprovedOverlayNotification>
component should be implemented for the Reader Revenue Manager module that renders an<OverlayNotification>
component in the Site Kit dashboard.Screenshot for reference
![image](https://github.com/google/site-kit-wp/assets/20284937/d12a5458-cf8c-4fdb-b892-23e37882b9ce)Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
<PublicationApprovedOverlayNotification>
component should be added for the Reader Revenue Manager module according to the Figma designs that renders an overlay notification that lets the user know that their publication was approved.rrmModule
feature flag is enabled AND a key in thecore/ui
store is set totrue
, e.g.show-rrm-publication-approved-notification
(with constantUI_KEY_SHOW_RRM_PUBLICATION_APPROVED_NOTIFICATION
).Implementation Brief
UI_KEY_SHOW_RRM_PUBLICATION_APPROVED_NOTIFICATION
toassets/js/modules/reader-revenue-manager/datastore/constants.js
with value'show-rrm-publication-approved-notification'
.assets/js/module/reader-revenue-manager/components/PublicationApprovedOverlayNotification.js
RRM_PUBLICATION_APPROVED_OVERLAY_NOTIFICATION
with valuerrmPublicationApprovedOverlayNotification
. This will be passed asnotificationID
toOverlayNotification
component.shouldShowNotification
according to following points. This prop will be passed toOverlayNotification
. Note that this should fulfill all of the following conditions to betrue
.RRM_PUBLICATION_APPROVED_OVERLAY_NOTIFICATION
to check this.useViewOnly
hook).useDashboardType
hook).UI_KEY_SHOW_RRM_PUBLICATION_APPROVED_NOTIFICATION
key fromCORE_UI
store is set totrue
. This will be set totrue
bysyncPublicationOnboardingState
action (refer #8796).GraphicDesktop
andGraphicMobile
according to the figma designs.useBreakpoint
hook do position the CTAs.dismissNotification
in componentMaybe later
should calleddismissOverlayNotification
fromCORE_UI
store. PassRRM_PUBLICATION_APPROVED_OVERLAY_NOTIFICATION
todismissOverlayNotification
.Enable features
CTA should useButton
component withhref
prop passed to it. The link should be be passed usinggetServiceURL
selector (#8848), pass publication ID to the selector.isDismissingItem
selector fromCORE_USER
store.assets/js/components/OverlayNotification/OverlayNotificationsRenderer.js
, renderrrmPublicationApprovedOverlayNotification
if RRM feature is enabled (referuseFeature
hook).Test Coverage
PublicationApprovedOverlayNotification
, also test dismissal behaviour.PublicationApprovedOverlayNotification
component.QA Brief
Make sure module is enabled in tester plugin.
Activate the module and go to
Site Kit > Dashboard
. Do not do any configuration as of now.Run the following command in browser console.
As soon as above command is run, it should display the overlay notification.
"Enable Features" should take to the publisher centre.
Changelog entry