mozilla-b2g/gaia — pull request #22183 by jrburke (2014-07-25 21:22:48+00:00)
Title: Bug 989810 - [User Story] Email - Quick-to-Top action

Notes:

1) msg-list-topbar div is now message-list-topbar, in anticipation of converting message-list-topbar to a custom element later. message_list_topbar is laid out to be a custom element, but does not actually run as a custom element. It relies on explicit creation by message_list. Hopefully this can change once bug 1005446 lands.

2) The behavior of message_list_topbar is now different: it controls the Top arrow and the New Messages display, and has state toggles for those states. See notes in the module.

3) vscroll now tracks the last scrollTop change, so that the scroll changes observed by message_list_topbar do not do work if it was recently changed by vscroll code. In that case, the topbar should not be trying to show the up arrow.

4) You can manually trigger the new mail state by using the app-manager and pasting this in the console:

```javascript
require('mail_common').Cards._cardStack[0].cardImpl._topBar.showNewEmailCount(4)
```

5) unit/message_list_topbar_test.js was removed because the tests were very basic property value tests, and the new code relies heavily on CSS transitions to work, so the CSS code would need to be loaded. A targeted integration test, one that can scroll and have a VScroll instance would be a better type of test. However, holding off on new integration tests until the new test plumbing for the email tests lands.