Commit Graph

5109 Commits

Author SHA1 Message Date
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 54d85c68e2 Avoid the focus border around modals.
(imported from commit 9f0111f9d858ab2f058e2c75c8cb00a3716cdfed)
2013-07-10 12:31:32 -04:00
Kevin Mehall c190be38fe Make modals shrink to keep buttons on the screen.
This works down to about 330px height, and is probably about the
best you can do with current browsers in pure CSS.

See also: http://caniuse.com/#feat=viewport-units

Trac #786, Trac #1416

(imported from commit eeb931bb34aa6414fdf1b61db68c6aede1808a58)
2013-07-10 12:31:32 -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
Allen Rabinovich 2176ca0977 Fix unread indicator in FF by moving the pseudoselector to an inner div that supports relative positioning. Position the indicator based on whether the sender avatar and name are included in the message or not.
(imported from commit 305343bceb8656c380afd2100220afc0d0777540)
2013-07-09 15:12:51 -07:00
Tim Abbott b8c40119a2 Don't 500 when users try to make their name super long.
(imported from commit 0c5e8baa421ed8cbff431bc5085ffe78b0a8fc1e)
2013-07-09 17:43:47 -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
Kevin Mehall d284f6e91f Preliminary stress testing tool.
(imported from commit a94bb7798788870d90423af10959e6a145dc8e85)
2013-07-09 15:56:57 -04:00
Waseem Daher 7d7330df03 Bring the floating recipient bar closer to the tab bar.
I feel bad about this commit because it really only exists
to fix a math error elsewhere -- it's basically a hacky solution
to Trac #1426 that doesn't involve actually fixing the math
that exists in the app somewhere, but instead makes our app
conform to that math.

(imported from commit ad43bf9440b80fd768c5fa1cbe5cb4a683415c02)
2013-07-09 15:36:20 -04:00
Tim Abbott 493d8276e5 update-deployment: Fix buffering argument.
(imported from commit 7a62af4727384d4c1c0f87513aa62c25ab075569)
2013-07-09 14:41:06 -04:00
Tim Abbott 9cb2cb07d5 populate_db: Tweak the humbughq.com realm's default streams.
(imported from commit c13e68e4e3de9d689eb494709c7de54c5a063060)
2013-07-09 14:35:02 -04:00
Tim Abbott 679f29ddf7 populate_db: Clear memcached when deleting database.
(imported from commit 58f01a6922cf8b20c08ca9157d08f3c553764da5)
2013-07-09 14:35:02 -04:00
Tim Abbott 9ddf6b0295 do-destroy-rebuild-database: Default to randomly generated message data.
And use only 1 thread, to work around pylibmc multithreading issues on
OSX.

(imported from commit bb065b611cb67133f727747cec4a0ff568513788)
2013-07-09 14:35:02 -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 ca3f2f4c4d Do not buffer deployment output.
(imported from commit a4ffde1096cc8eb5ca64b0feafd33063e6a159d1)
2013-07-09 12:39:21 -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 cf710708df Add a little space between startup checkboxes and their options.
(imported from commit 0168e9ba4173e92d0c0c01250c8f63e25918a016)
2013-07-08 23:02:56 -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
Allen Rabinovich c999019ae3 Add highlights to selected filters and streams/subjects in the left sidebars, as well as a pointer arrow
(imported from commit 5c799a19c5bde52705c60e1b9fdae832bd5474f0)
2013-07-08 19:09:52 -07: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
Allen Rabinovich 9c81056962 Remove gradient from unread messages
(imported from commit 1dbf0d81884bb45f3f67453e75acbc77aea43293)
2013-07-08 17:26:00 -07: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
Luke Faraone cfe9e268f4 Do not specify cascade=True in deactivate_user_backend.
This was mistakenly included from a previous iteration of the do_deactivate()
function's interface.

(imported from commit 0a6ddc5ba1dfe944f2cc0087c590046da6a73531)
2013-07-08 15:44:01 -07:00
Tim Abbott 7540ad6234 Fix tracebacks from prepending messages after narrowing.
(imported from commit 6bed33975ee80c324270b518e0dcb807c1f1df41)
2013-07-08 18:18:48 -04:00
Luke Faraone 2c83d015a9 Refactor bot deactivation view to cover all users and expose via REST
(imported from commit 9f7afb3b43ed14db0bb4217dbae4114846bb840b)
2013-07-08 18:00:28 -04:00
Allen Rabinovich d4da8570bd Change the unread message style to a top-left corner marker and a full messagebox diagonal overlay gradient
(imported from commit dd171437bdd40219584774bc38c77798fa1568e2)
2013-07-08 14:36:55 -07: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
Tim Abbott f10d3d5517 Only autoscroll for messages that arrived via get_updates.
Previously we incorrectly would sometimes trigger autoscroll when
messages arrived via get_old_messages (i.e. we loaded some historical
messages from the server).  This resulted in some confusing and
erroneous scrolling behavior.

I kinda hate the fact that we need to pass these values all the way
through the rendering process, but fundamentally there's no other way
for _render to find out, and pushing the autoscrolling higher up in
the stack is hard since we don't return anything like the block of new
messages.

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