Banner hiding is currently done using a small number of javascript files. If we replace this system with “preload” mixin code, an immediate win is that we can prevent injection of banner HTML into the DOM when hide logic is triggered. Other wins worth noting are that we get visibility and code review on tricky hiding logic.
TODO: discussion and rewrite of existing hide logic
Deployment
https://gerrit.wikimedia.org/r/#/c/182107/
https://gerrit.wikimedia.org/r/#/c/181240/
https://gerrit.wikimedia.org/r/182897
https://gerrit.wikimedia.org/r/#/c/181244/
https://gerrit.wikimedia.org/r/#/c/181239/
To convert a banner to use this mixin,
Go to the banner edit page.
Remove the BannerShowHideCount template from the banner content, make a note of your parameter values.
Check the BannerShowHideCount mixin and save the banner.
Banner message fields should appear for the four parameters. Enter the old values into these fields and save again. Note that the parameter names have been changed to protect your sanity.