Commit Graph

1763 Commits

Author SHA1 Message Date
Scott Feeney 8fcf208815 Use one template for all user presence rows
This will hopefully fix some lagginess when logging in on the Hacker
School realm, especially on Firefox, as the user presence rows are
populated (previously requiring hundreds of template renders).

(imported from commit 67e2d7f91ad62d8d7a2e212ee7c7121bd73f010b)
2013-07-11 16:48:23 -04:00
Leo Franchi 3525b88fa1 Add messages to all our message lists before calculating unread
(imported from commit e216246a045a3ed2de43076e89eb99648c8bac56)
2013-07-11 15:06:32 -04:00
Kevin Mehall 862f07c9d8 Update fade when returning to home view.
Fix a minor bug where if you return to the home view with a recipient
filled out, it would be unfaded.

(imported from commit d81d974dcb054c63d8a5dd5afec7b072c99d4e3f)
2013-07-11 15:00:10 -04:00
Kevin Mehall 5062a148df Don't fade when subject box is empty.
Otherwise it fades all messages.

Trac #1468

(imported from commit 393514f9f3b2b7f46945878d93e8c12e4685afeb)
2013-07-11 15:00:10 -04:00
Tim Abbott eaf3dbd902 Fix scroll position when unnarrowing after a reload when narrowed.
(imported from commit cc2f9f3f202d8331ee6cd7b9a73611d1f1f193d3)
2013-07-11 14:59:45 -04:00
Jessica McKellar dd57e0490d subs: Rearrange some of the color logic to make the linter happy.
(imported from commit dd4b8b446dae4fc12d817165f67deb423cf06166)
2013-07-11 14:42:45 -04:00
Jessica McKellar 0ad6d7ead1 Display the correct stream color in the color picker when (re-)subscribing.
(imported from commit 56d96799f3a049a0c64cef3bab7f82c9d6420cca)
2013-07-11 14:42:45 -04:00
Kevin Mehall 8df4857524 Revert to old mark as unread on view behavior.
Effectively reverts 185e865 and b67e52d.

(imported from commit e9b95f1fd9e2ab7926f15910044e9e9879ea085f)
2013-07-11 14:01:26 -04:00
Kevin Mehall 674152dae1 Show the recipient bar when the compose box is open, as long as
it's on a message that isn't faded.

Trac #1464

(imported from commit 7167ed0877d3885316b7d38af5f11ec5523d5f7d)
2013-07-11 13:41:49 -04:00
acrefoot eccdb9505b Add missing emoji, normalize {white,black}_square variants
(imported from commit 474db3fb2eeafc7bc59260d8641cfa56a84933d6)
2013-07-11 11:58:29 -04:00
Leo Franchi f0ca927fb2 Only match : preceded by a space for 😧 📝 autocomplete
(imported from commit c2a6a5be733f538b0c7dad61a1c8fdb625fcd03e)
2013-07-11 11:43:39 -04:00
Leo Franchi 8c7156acfa Don't autocomplete emoji until the 2nd letter 💻
(imported from commit 25986e2c3d939b61c4eb71596944748522d2cb54)
2013-07-11 11:41:10 -04:00
Leo Franchi b5273b4c25 Focus the next open textarea when starting a compose
Previously we had fancy logic to determine where to focus, but immediately
clobbered any focus choice we made and forced the stream selection to be in focus.
We also incorrectly determined what to focus in the case of clicking the new PM
button when in a stream narrow.

(imported from commit 01e2cec8eca068ee1d45d3cfb21607b981d5034e)
2013-07-10 17:43:46 -04:00
Steve Howell e736e393aa Show errors when deleting bots.
It's pretty unlikely these will come up in practice.

(imported from commit 6d809a8c98bfa09e69541d7dfd02094c16273c18)
2013-07-10 17:23:20 -04:00
Steve Howell 97994ea7a9 Shorten private operator (private-message -> private).
(imported from commit f938bd56de05cc8fc0da18348d4dec8a18c96bb9)
2013-07-10 16:58:17 -04:00
Steve Howell 43602b589f Shorten mentioned operator (mentioned-message -> mentioned).
(imported from commit 5104f75a7ed19f533ab5bca466d3e017c72bd1b8)
2013-07-10 16:58:16 -04:00
Steve Howell 600964b1de Animate removal of bot from the list.
(imported from commit 4c7e7aa07fa58c924ed78dbdc1d81c6e4bb28756)
2013-07-10 16:19:22 -04:00
Steve Howell c27e1105e5 Allow users to deactivate their bots from the website.
(The back end had been in place already.)

(imported from commit ec4b7b3ea39d71d86b0bdc161740e494ce1e13f7)
2013-07-10 16:19:22 -04:00
Tim Abbott 227995e971 narrow: Don't crash computing then_select_offset for offscreen then_select_id.
Unlike the other cases where we do this sort of offset calculation,
we're working with a message which is not msg_list.selected_id() --
which means that this message might not actually be rendered at all.
Correct for this by just letting then_select_offset stay undefined in
that case.

(imported from commit ebb8a23bf34c52f9495aa88ceca8eb4458d50be1)
2013-07-10 13:21:08 -04:00
Kevin Mehall 4f68cf939e Don't show the subject typeahead when it's not helpful.
When it's not offering any other suggestions, suggesting what
you've typed is unnecessary and confusing and it should just
hide completely instead.

Trac #1476

(imported from commit ff69bb53c661e0a3a193dbddde6e7a4ff8b10031)
2013-07-10 11:41:12 -04:00
Jessica McKellar 6719854961 Make the tutorial popovers visible even in thin windows.
(imported from commit 0cec5db8b3a881ac1850210bd5ff4563ce2ad699)
2013-07-10 11:20:22 -04:00
Tim Abbott 98f6a20900 Fix selector when picking a custom color.
This seems to have been somehow introduced in the refactoring to move
the popovers into their own file
(36ad3c61e4d7eb05751f9b886d15edceab656d71).

(imported from commit f5f58844a9c2da4b4433489be1772263f3aba350)
2013-07-10 11:09:56 -04:00
Steve Howell 86930191ae Show up to 5 subjects in left sidebar (8 -> 5).
(imported from commit 78888034a2b71617dd6f639b4e7db4beedbb5fa5)
2013-07-09 22:30:28 -04:00
Tim Abbott ce365829f1 Fix traceback checking for new messages on empty narrows.
(imported from commit da0ba189f23fecdee376066db956e1320bca4deb)
2013-07-09 17:43:46 -04:00
Jessica McKellar 20a43706f4 When you change a stream color, also update the floating recipient bar if applicable.
(imported from commit 121f48887a18f22ec173ad5e540d040859f2bf62)
2013-07-09 14:22:42 -04:00
Jessica McKellar 2b10ccf03a When you change a stream color, also update the color in the crumb bar.
(imported from commit 187c1738f4a7bf3f888dfccca315feeeb2137f4d)
2013-07-09 14:22:38 -04:00
Jessica McKellar 3c1b59d840 Fix updating the stream color in messages.
(imported from commit 5d38cf7864ddeb489ca653ac568ee9c738577711)
2013-07-09 14:20:41 -04:00
Steve Howell 6347bdfcc8 Starring a message makes it read.
(imported from commit 80c1af9e34f4904266a64d89c57cd82e84c02b48)
2013-07-09 09:57:20 -04:00
Steve Howell 1edd9a1d9f Fix scroll-to-the-middle bug.
(imported from commit dcd102541c8ee2b341060def714c24b05f2db514)
2013-07-08 23:11:09 -04:00
Waseem Daher c89b662ce6 Give up on "pin tab" and instead push for "get app".
(imported from commit 2aacc547bbe4578c19bc6044183eb06005f2e666)
2013-07-08 23:02:56 -04:00
Tim Abbott 849cf69f61 Fix scroll position when updating messages.
(imported from commit 8d6eb0c1cb980f3d5ad46370ae0f05355bcbeb33)
2013-07-08 22:26:17 -04:00
Steve Howell f87b27a9c3 Bold @-mentions link when you click on it.
This fix also cleans up the search operators so that @-mentions
and Private messages have a more similar naming convention.

(imported from commit fb1a2119aab5aa9e179c6e321a8d2ef2e90290cf)
2013-07-08 22:04:28 -04:00
Waseem Daher 58e57d7462 Revert "Increase bottom_whitespace to be most of the viewport height."
This scrolling behavior is driving me crazy on staging.
Reverting until we come up with a better alternative.

This reverts commit 41954fecd9efb43820ed1ccb5210283c17752f51.

(imported from commit 2db602cf51ca734b00ec1bd454c39204468fa024)
2013-07-08 21:04:52 -04:00
Scott Feeney ba71013b7c Hide a popover when showing a different popover
This is one case I forgot from the last commit. For example, if the
message actions popover is open, and you open the user sidebar popover,
the message actions popover should close. It now does.

(imported from commit a241634cb1aabf8883cf95ebd5b8ba96f5ed9908)
2013-07-08 18:58:08 -04:00
Scott Feeney 6030abb888 Fix clicks not dismissing popovers (Trac #1435)
A cleaner, more general solution would be nice but this fixes at least
the most obvious cases for now.

(imported from commit fc7260e25a4f2172eee74af9c2d9384898947ad3)
2013-07-08 18:53:20 -04:00
Scott Feeney d23e8d8a30 Simplify and fix preventDefault -> stopPropagation
(imported from commit 3cb84804027b67662392e5a7c75bfb0603b9318d)
2013-07-08 18:53:03 -04:00
Scott Feeney c42bf9b9b2 Refactor popovers into their own file
(imported from commit 36ad3c61e4d7eb05751f9b886d15edceab656d71)
2013-07-08 18:53:03 -04:00
Tim Abbott 7540ad6234 Fix tracebacks from prepending messages after narrowing.
(imported from commit 6bed33975ee80c324270b518e0dcb807c1f1df41)
2013-07-08 18:18:48 -04:00
Tim Abbott 54c32992fd Fix hitting down-arrow at bottom of message list.
Previously the viewport.scrollTop() command that we ran in this case
would actually scroll far off the bottom of the site; it only did
something that looked reasonable because bottom_whitespace was small
and thus the scroll was truncated.

This version scrolls to 10% of the viewport away from the top.  We may
need to tweak that to instead be a fixed number of pixels or something.

(imported from commit 0176bf6e3662dfa24887f41b110b429bd8054cb0)
2013-07-08 17:32:18 -04:00
Tim Abbott 0e8c55395c Fix save/restoring scroll position when toggling in_home_view.
Previously the code to save/restore the scroll position when toggling
a stream in/out of the home view would only work if you were currently
not in the home tab -- because you used to only be able to do this
from other pages.

(imported from commit 4002a3980dfd87dabd570abee3ebc63417a78cc5)
2013-07-08 17:32:18 -04:00
Tim Abbott 641377e7e0 Add messages at bottom when message list is empty.
(imported from commit d15ff7ddb39e30ca08dd9d0eccf3dae75414a3ef)
2013-07-08 17:32:18 -04:00
Tim Abbott 43279b99ff message_list: Clear rendering window when clearing message list.
(imported from commit 5eefbced42e9ab987e4e2d60332f1d416df605af)
2013-07-08 17:32:18 -04:00
Tim Abbott 166a9c9635 Return the viewport to a corresponding position when unnarrowing.
(imported from commit d1cb35b175a23e18ed79537843ce7940ec370cf3)
2013-07-08 17:32:18 -04:00
Tim Abbott 0d5469f6ab Preserve the location of the selected message when narrowing.
(imported from commit 38230a79d3bb2c403e20ed9b40b04731c0312325)
2013-07-08 17:32:18 -04:00
Tim Abbott 9145246ace message_list: Don't leak date row headers when prepending messages.
(imported from commit 794c668dd79f89000e6559c0d96c78832e4e43d0)
2013-07-08 17:32:17 -04:00
Tim Abbott bdaacc5393 Don't call msg_list.append/prepend with empty arguments lists.
This can cause unnecessary work to be done.

(imported from commit a33d69598531b6a99520f92cbbac1fdb7eb9ee49)
2013-07-08 17:32:17 -04:00
Tim Abbott a158ee233a message_list: Preserve the scroll position when prepending.
Previously, we had some ugly complicated logic through which we
attempted to keep the selected message on screen when prepending
messages, but we didn't actually preserve the scroll position -- the
selected message would jump on the screen.  This fixes that, by just
saving/restoring the scroll position of the selected message.

This perhaps makes our model/view split even less clear, but at least
it's correct.

(imported from commit 0a01450bbbcdf1b45c891d0570c9fcfb11769315)
2013-07-08 17:32:17 -04:00
Tim Abbott 24055e894e message_list: Fix prepending of messages.
message_list.prepend() now actually only rerenders the new messages
when prepending using the where="top" functionality (previously it
would erroneously just adjust the message database and then wait for
message_list.append() to call _maybe_rerender(), determine that things
are awry, and rerender the whole message list).

(imported from commit c64b7b540a4f5332ad792de0fad9f20750e6db1c)
2013-07-08 17:32:17 -04:00
Tim Abbott e5c96fb3ad Increase bottom_whitespace to be most of the viewport height.
This has two benefits:

(1) Users can scroll their last message to near the top of the screen,
which decreases how often one needs to scroll down to track current
messages.

(2) It makes scrolling bugs near the bottom of the screen a lot easier
to find, because scrolling down too far isn't blocked by being unable
to scroll messages off the screen.

We should probably later convert this to some formula that varies
dynamically based on the height of the last message.

(imported from commit 41954fecd9efb43820ed1ccb5210283c17752f51)
2013-07-08 17:32:17 -04:00
Tim Abbott f48097b609 recenter_view: Always place the initial pointer at the center.
It turns out that this code tries to place the initial pointer 1/7
from the top; the only reason something reasonable happened
historically is that bottom_whitespace was only 40% of the screen, so
the pointer message ends up landing in the center anyway.

(imported from commit 56d4c2acd018d9a87551c82a43c214c6d80bfb90)
2013-07-08 17:32:17 -04:00