The Setup CTA banner has a "Maybe later" dismissal CTA. Pressing this dismisses the banner permanently without further information as to where the feature can be set up later. It would be good for the banner to follow the pattern we've introduced whereby: The banner is reshown after a delay (e.g. two weeks), either two or three times, with the dismissal CTA changing to "Don't show again" on the final showing. Upon pressing the dismissal CTA, a tooltip is shown pointing to the Settings menu item advising the user they can set up the feature later in Settings.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
When the RRM Setup CTA Banner's "Maybe later" dismissal CTA is clicked:
The banner should be dismissed for two weeks.
A tooltip should appear pointing to the Settings menu item with the following copy:
You can always set up Reader Revenue Manager from Settings later
The tooltip should have the same look and feel as other similar tooltips, for example the corresponding Consent Mode tooltip:
After two weeks has elapsed, the banner should be shown again, this time with "Don’t show again" for the dismissal CTA text. Upon clicking the CTA:
The banner should be dismissed permanently.
The tooltip pointing to the Settings menu item should appear again, as described above.
Implementation Brief
[x] In assets/js/modules/reader-revenue-manager/components/dashboard/ReaderRevenueManagerSetupCTABanner.js.
[x] Use of prompts infrastructure.
Use dismissPrompt and remove use of dismissItem as the banner needs to be shown again after two weeks.
Use getPromptDismissCount selector to get the dismiss count.
Use hasFinishedResolution( 'getDismissedPrompts', [] ) to check if dismissed prompts have been loaded or not. This is necessary in order to avoid glitches in banner when it shows Maybe later at first, but immediately change it to Don't show again text once the dismissed prompts data is available.
In onDismiss function, inside finally block, if dismissCount is less than 1, dismiss the banner using dismissPrompt by passing slug as READER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY and expiration as two week in seconds. A similar implementation can be seen here.
[x] Tooltip after dismissal.
Import AdminMenuTooltip, useShowTooltip and useTooltipState from AdminMenuTooltip component.
Check if tooltip should be visible using useTooltipState hook and pass READER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY to it. This will return isTooltipVisible, a boolean.
Use useShowTooltip hook which will return a function that would be used to display the tooltip. Receive it in a constant showTooltip.
In onDismiss function before dismissing the banner in finally block, call showTooltip(). This will set isTooltipVisible to true.
Inside the component, check if isTooltipVisible is true, if it is, return AdminTooltip component.
Title should be empty.
Content would be: You can always enable reader revenue manager from Settings later
dismiss label as Got it
tooltipStateKey set to READER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY.
Test coverage
In assets/js/modules/reader-revenue-manager/components/dashboard/ReaderRevenueManagerSetupCTABanner.test.js
Fix any failing tests.
Add tests for prompt behaviour.
Add test for tooltip behaviour.
QA Brief
Enable RRM feature in the tester plugin and make sure to disable RRM module in Site Kit settings.
Go to dashboard, it should display the setup CTA banner.
Click on Maybe later, it will dismiss the banner and will display the tooltip with the text as mentioned in IB.
Install Time Travel extension in chrome and set the date to 15 days or 1 month later. Reload the page.
The banner should be visible again. Dismiss the banner again using Maybe later CTA, it would again display the tooltip.
Change the date in extension further to 1 month and reload the page, the banner should not be visible anymore.
Changelog entry
Show the Reader Revenue Manager module's setup banner again two weeks after being dismissed, and show a tooltip to let the user know it can be set up later in Settings.
Bug Description
The Setup CTA banner has a "Maybe later" dismissal CTA. Pressing this dismisses the banner permanently without further information as to where the feature can be set up later. It would be good for the banner to follow the pattern we've introduced whereby: The banner is reshown after a delay (e.g. two weeks), either two or three times, with the dismissal CTA changing to "Don't show again" on the final showing. Upon pressing the dismissal CTA, a tooltip is shown pointing to the Settings menu item advising the user they can set up the feature later in Settings.
Asana ticket can be found here
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/modules/reader-revenue-manager/components/dashboard/ReaderRevenueManagerSetupCTABanner.js
.dismissPrompt
and remove use ofdismissItem
as the banner needs to be shown again after two weeks.getPromptDismissCount
selector to get the dismiss count.hasFinishedResolution( 'getDismissedPrompts', [] )
to check if dismissed prompts have been loaded or not. This is necessary in order to avoid glitches in banner when it showsMaybe later
at first, but immediately change it toDon't show again
text once the dismissed prompts data is available.onDismiss
function, insidefinally
block, ifdismissCount
is less than1
, dismiss the banner usingdismissPrompt
by passing slug asREADER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY
and expiration as two week in seconds. A similar implementation can be seen here.AdminMenuTooltip
,useShowTooltip
anduseTooltipState
fromAdminMenuTooltip
component.useTooltipState
hook and passREADER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY
to it. This will returnisTooltipVisible
, a boolean.useShowTooltip
hook which will return a function that would be used to display the tooltip. Receive it in a constantshowTooltip
.onDismiss
function before dismissing the banner infinally
block, callshowTooltip()
. This will setisTooltipVisible
to true.isTooltipVisible
istrue
, if it is, returnAdminTooltip
component.You can always enable reader revenue manager from Settings later
Got it
tooltipStateKey
set toREADER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY
.Test coverage
assets/js/modules/reader-revenue-manager/components/dashboard/ReaderRevenueManagerSetupCTABanner.test.js
QA Brief
Enable RRM feature in the tester plugin and make sure to disable RRM module in Site Kit settings.
Go to dashboard, it should display the setup CTA banner.
Click on
Maybe later
, it will dismiss the banner and will display the tooltip with the text as mentioned in IB.Install Time Travel extension in chrome and set the date to 15 days or 1 month later. Reload the page.
The banner should be visible again. Dismiss the banner again using
Maybe later
CTA, it would again display the tooltip.Change the date in extension further to 1 month and reload the page, the banner should not be visible anymore.
Changelog entry