There's now quite a lot of shared javascript e.g. around deciding whether to show the banner or not. We should split this out into a shared template for easier maintenance.
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Pcoombe | T241829 Split out more shared banner javascript | |||
Declined | None | T241854 Separate out JS for Mobile banners | |||
Declined | None | T241857 Establish naming convention for shared banner UI elements | |||
Declined | None | T241855 Separate out JS for Desktop Banners | |||
Declined | None | T241856 Separate out JS for iPad/Tablet banners |
Event Timeline
I'm a big fan of this idea. It'll be easier to maintain + easier to test, and I think we'll want to try different hide durations and conditions in 2020.
This one will definitely be discussed in our code review meetings, will add it to the list
Worked on this in preparation for potential new hide cases. I moved the show/hide logic into an frb.shouldShowBanner() function in CoreJS: diff
Changes for the bundle banners: dsk lg diff, dsk sm diff, m lg diff, m sm diff
I also merged alterImpressionData.js into CoreJS, so there's no need to load that separately.
These changes are done for the bundle and upcoming NL pre-test.
The main remaining duplication is RML, which has its own task: T162937: Fundraising banner "remind me later" code should be more re-usable