Setup CTA Banner doesn't follow the multiple dismissal/settings tooltip pattern #9257
Closed
3 tasks done
Labels
Module: RRM
Reader Revenue Manager module related issues
P1
Medium priority
Team M
Issues for Squad 2
Type: Enhancement
Improvement of an existing feature
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
The text was updated successfully, but these errors were encountered: