Page MenuHomePhabricator

Split out more shared banner javascript
Closed, ResolvedPublic

Description

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.

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.