Open nfmohit opened 3 weeks ago
Thank you for the excellent IB here, @ankitrox !
One small point about the CTA link. We should use the getServiceURL
selector with the current publication ID passed to get the URL for the CTA. Could you please update it?
Thanks!
@nfmohit Thank you for reviewing the IB.
I've amended the suggested point. Assigning back to you.
Thanks @ankitrox ! IB LGTM 👍 ✅
Feature Description
A
<PublicationOnboardingStateNotice>
component should be implemented for the Reader Revenue Manager module that renders a notice based on the onboarding state of the current publication.Screenshot for reference
![image](https://github.com/google/site-kit-wp/assets/20284937/9bcf7fc9-f5b3-4ee7-b9e4-5d1b3a1c2329)Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
<PublicationOnboardingStateNotice>
component should be added to the Reader Revenue Manager module according to the Figma designs that renders a notice based on the onboarding state of the current publication.PENDING_VERIFICATION
.ONBOARDING_ACTION_REQUIRED
.Implementation Brief
Note:
PropertySelect
component in #8837 will be responsinble for setting the onboarding state in the settings using thesetPublicationOnboardingState
action. This has already described in IB for #8837.assets/js/module/reader-revenue-manager/components/common/PublicationOnboardingStateNotice
.useSelect
hook to check for thepublicationOnboardingState
and callgetPublicationOnboardingState
selector.PENDING_VERIFICATION
orONBOARDING_ACTION_REQUIRED
, return null.PENDING_VERIFICATION
orONBOARDING_ACTION_REQUIRED
, display the notice text and CTA text as per AC mentioned above.SettingsNotice
component to display the notice. Pass following props to it.Icon
- Passwarning
as we need to display the warning notice.notice
- This will be the notice text as per AC.OuterCTA
- This should be CTA which will open the publication center (https://publishercenter.google.com/) in a new tab. UseLink
component to display CTA link withexternal
prop set to true. We should usegetServiceURL
selector to get the URL for the CTA. Pass publication ID to the selector.PublicationOnboardingStateNotice
component to match the notice component with the design.Test Coverage
Add tests for component with different onboarding states.
QA Brief
Changelog entry