Fixes to Automattic/martech#1718
Proposed Changes
This PR implements the requested changes in the linked issue above regarding the banner carousell in /stats
:
- Show the GA promo banner for sites on the Free plan and the Personal plan.
- Automatically rotate the banner by the given period. Currently I’ve anecdotally set it as 5 secs.
The automatical rotation mechanism is lifted into the underlying <DotPager>
component, since it’s a general functionality that the rest of the codebase can be benefited from as well.
Screencast:
2023-06-05.2.12.34.mov
Testing Instructions
- Logging into a Free site, visit
/stats
and confirm that the GA promo banner exists.
- Logging into a Personal site, visit
/stats
and confirm that the GA promo banner exists.
- Dismissing the GA promo banner by clickgin “hide this” should make the banner disappear even after refreshing.
- Confirm that the carousell rotates automatically. After manually navigating back-and-forth the banners, it should still advance automatically.
Pre-merge Checklist
- Has the general commit checklist been followed? (PCYsg-hS-p2)
- Have you written new tests for your changes?
- Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
- Have you checked for TypeScript, React or other console errors?
- Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
- Have we added the “[Status] String Freeze” label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
- For changes affecting Jetpack: Have we added the “[Status] Needs Privacy Updates” label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?
Unfortunately, no screenshots were provided by the developer.