mozilla-b2g/gaia — pull request #23525 by jrburke (2014-08-30 01:25:22+00:00)
Title: Bug 1059499 - [Email][QuickToTop] New message banner hides when untouched

This fixes three issues:

* [Bug 1059499](https://bugzilla.mozilla.org/show_bug.cgi?id=1059499): the "N New Messages" should stay around until the user scrolls down or taps on it. This was not in accordance with the UX spec. The old "auto hide after N seconds" logic via _hideNewMessage was kept in there by mistake.
* [Bug 1056518](https://bugzilla.mozilla.org/show_bug.cgi?id=1056518): use "N New Messages" instead of "N New Emails" to also match spec. l10n ID was changed to reflect the change in messaging.
* [Bug 1056515](https://bugzilla.mozilla.org/show_bug.cgi?id=1056515): "N New Messages" was not centered on the first showing of it, particularly when the Top Arrow was also shown at first.

The last one was the trickiest of them. It was caused by the l10n mutation stuff changing the size later, and also, the full size was not known until it became visible. So I went with the left:50%, transformX -50% solution, so that explicit sizes did not need to be calculated. However for that to work, I had to turn off animation to change the horizontal position then show it.

The end result is much better than before. However, I do notice about a 2px jump at the end of the N New Messages transition. Also, if the Top Arrow is not showing, the animation is not smooth, the N New Messages just pops in. On desktop, it is smooth, so this suggest some sort of animation drop on the device. That pop in effect happened before this changeset though too, so overall this is a better experience, and we can file follow up bugs to get it better. Most importantly, those follow up bugs do not need new l10n strings, so they could land later.