Treat "mentioned" messages like "starred" messages for narrowing.
Lots of ugly copy/paste here. There might be opportunity for
some cleanup in places.
(imported from commit e7629890d42643c0000e1cc85422b2a0690f2cc4)
The bug we experienced here was that if you loaded the page in a
narrowed view, and then un-narrowed before the first block of messages
for the home view arrived via load_old_messages, then
narrow.deactivate() would re-select ID -1 in home_msg_list. This ends
up calling recenter_view() on the message, which in turn tries to
access the message with message id -1, which fails.
We do sometimes re-select a message ID in order to recenter the view
properly when we prepend messages to a message list, so we can't make
this always a nop; instead we add a check for id -1 in the
message_selected.zephyr event handler.
(imported from commit 66f84a586e59d99aaf0e4ba2cda9fe597b033145)
There was an off-by-one error in how we determine when
the message list was scrolled all the way to the bottom,
and this undermined our handlers for page down and scrolling
to get the pointer all the way to the bottom.
(imported from commit f80d11582b40726246e69c817a502b311081c730)
This reverts commit 13fb245f86ab84b1d2faea9d2a1f2145cd4aa907.
(Waseem wanted to hold off on adding more hot keys.)
(imported from commit 97c25ffa01fd7058fc90a278887d85b7d82a268a)
Re-focuses on the compose box after a send, but only if
the compose-box was opened by responding to the message
at the cursor (by hitting "r", enter, or clicking on the message)
(imported from commit 8e7560c8ea31397b57b2bc3e2e7d9dd996226a6f)
The reply-to autoscroll was using a flag that was redundant
to suppress_scroll_pointer_update and then updating it prematurely,
which caused the pointer to move when you clicked on a message to
reply to it. Now the pointer goes to the message you replied to.
(imported from commit e2f49fd6bd0da9a3f4b58c0eb08192ef0ee9abf0)
Now that we sometimes call message_edit.end() twice, we need to check
if we've already cleaned it up.
(imported from commit 4e0efa14ba78df0a86b2ae97b99fa1be6197df88)
The main point of this fix is to move some more scroll-related code
into viewport.js, but it also fixes a bug where the size of #main_div
was not accurately representing the full height of the message list.
Making the calculation more accurate narrows the window where we
do pointer adjustements on mousewheel moves.
(imported from commit 5d821f459284c4dbd5ff8056001e54caf4355f1d)
Fix min-height before doing the calculation of how much a
replied-to message is being covered by the compose box. This
change also removes an outdated call to slideDown.
(imported from commit e5a3f35bbacff16dffae62c9e9f6bbc7978a13c1)
The logic for this already existed, but start() was getting called
twice, once from compose.set_mode and once from the click handler, and
the result was the focus always being in the stream input box.
(imported from commit 9a832a118856b5705524975a4412b7e6e547ef5c)
This parallels clicking on a stream name, which narrows you to that
stream. This also gives you a discoverable way to narrow to PMs with a
particular person.
(imported from commit 6c706f0643f6a8ec20ac38360153227ec2f645ae)
This sets up the keys t and b to anchor your pointer to the top
and bottom of the viewport. It empowers keyboard users who
are otherwise at the mercy of Barnowl recentering, but of
course it doesn't affect users who don't want to opt in.
(imported from commit 13fb245f86ab84b1d2faea9d2a1f2145cd4aa907)
The functional change here is that our code to stop
autoscrolling on certain events, particularly mousemove,
now only runs during system initiated autoscroll events.
If the user had been replying to a message, then the feature
to stop autoscroll was too aggressive.
This patch also starts to put more scrolling-related code
into viewport.js, which will hopefully prevent some code
duplication and give us a single place to control things like
stopping animated scrolls.
(imported from commit e7d5946b0ac7fcfda2eff1d0e2b58a78b44ecc1a)
We also record the historical edits to the message in this JSON format:
[{"prev_content": "new test message 14", "timestamp": 1369157249},
{"prev_content": "new test message 13", "timestamp": 1369157118}]
but we don't actually do anything with the information as of yet.
(imported from commit 2d5ca449b87b33ad035ab0e076a22e150c8e7267)
* Modify the narrow icon in FontAwesome to make it better align to the pixel grid and display well on Windows+Chrome.
* Move the message controls to the right
* Hide the message info icon until the message is hovered / selected
* Switch the star to a gray version
* Increase the size of the gravatar
* Adjust the spacing
* Add the right-side message pointer
* Fix private message background colors and mention colors
* Modify star count test to account for new stars
* Bug fixes for stream subscription messages and other miscellanea.
(imported from commit 3d3d9de7e03f3658c5c78b492051b2b7f795487d)
This goes back to only scrolling by the size of the new
message, and it avoids scrolling in certain use cases.
(imported from commit f9e6380b779bb21283ba889715712b6b51633838)
Previously, we were referencing the mixpanel objects only once, at
page load time, which meant that there was a race between metrics.js
loading and mixpanel completely loading. Mixpanel starts with stub
methods and then replaces them once it fully loads, asynchronously.
If metrics.js ran before mixpanel loaded, we'd end up wrapping the
stub methods instead of the real versions. Adding a layer of
indirection ensures that we always get the right method.
(imported from commit 6a8cfbf249168443956895b7a7e29bf7bb4222aa)
This reverts commit 87226d857845c6f16cb3bc0d6ab5bb748aca5987.
This meant that if for some reason there's a server error or network
failure trying to send in your edit, your changes are silently lost.
(imported from commit 2b5d19716fef1565b061a2b6c7cecc54f183b6f3)
Currently, some browsers don't seem to be sending metrics information
to mixpanel. This commit will make said browsers noisy, but should
help debug what's going on.
(imported from commit c5050f66d985eb76e38117b2668594fedfc10702)
Use tab_bar_underpadding to find out the top of viewport
that we can view. Also, eliminate effective_page_size().
(imported from commit 0e2d777790552e77d635989e496f3446cefccb1e)
This will make it automatically work if we add new tab
bar like things. The current version of ui.message_viewport_info()
is slightly broken; that's a separate fix.
(imported from commit fa1906b738433223831250e3191dfd8e87d67daf)
Most of the model logic pertaining to unread counts had been in
zephyr.js, along with a couple global variables. Now the code
is encapsulated in unread.js. It was a pretty straightforward
extraction with some minor method name changes. Also, a small
bit of the logic had also been in stream_list.js.
Conflicts:
tools/jslint/check-all.js
(imported from commit f0abdd48f26ab20c5beaef203479eb5a70dacfff)
Set the background behind "Private messages" to green whenever
a user's unread count goes up for private messages. Remove
the background after 3s. Advanced browsers will fade the
green in and out over 6s (3s up, 3s down).
(imported from commit 80ed9661d9eec1d697f3259854037d7e145615cd)