We need to be able to let a user through if they are trying to sign up
for a completely open realm like CUSTOMER3.
(imported from commit 1e33ab0ce94545f217739d501e9227dfb48e1123)
It will have new callers soon and that's as fine a place as any to
avoid circular imports.
(imported from commit 089a724e9ad06cb5a51ffe80f1729d789238e5f6)
Summarized messages are not shown and cannot be selected. If
`opts.use_closest === false` and you try to select a summarized
message, we still have to use the closest instead of failing.
Eventually, we'll make summary rows selectable, but that would be
rather involved since selections are managed by ID, summaries exist only
in the DOM, and many parts of the code get the selection and expect
it to be a message.
(imported from commit 998c4f24aece84528cc9da53a47f9e4f5391702d)
On a page load or reload, the browser will, at an idle time, scroll to
the top of the page. We can't intercept this browser-induced scroll,
so to make sure it doesn't in interfere with our scrolling to the
correct place in your message feed, we let the browser scroll happen
before the work we do on page load.
(imported from commit f5f441ab90bcdb8404e05caea3c6da81a3a6fc1e)
This commit makes keep_pointer_in_view() less aggressive when
the pointer is toward the top of the screen. If the pointer is toward
the top of the screen, then as long as it's fully on the screen, we
don't pull the rug out from under the user and change the pointer.
An important benefit of this change is that we fix trac #1608,
which was a bug where autoscrolling interacted with
keep_pointer_in_view() to push messages past the top of the screen
before they were read.
(imported from commit e39926df99bfaedd5c0757f1241887ccd9b93fab)
The helper functions now return true when a message is on
screen, not when it's off screen, and the names have been
changed accordingly. I also eliminated the at_end parameter,
which was kind of abstract, by having message_is_far_enough_up
and message_is_far_enough_down handle those details.
(imported from commit cdb1543e430f49f23eb1b3a88d9aaff95ce7ca74)
This includes a hack to preserve humbug/backends.py as a symlink, so
that we don't need to regenerate all our old sessions.
(imported from commit b7918988b31c71ec01bbdc270db7017d4069221d)
* Move the state into a closure to duplicate it for multiple queues
* Use _.debounce instead of manual setTimeout fiddling
* Have it handle manipulating the message flags
(imported from commit 938f51fd666131a3cec5901d3f3fdd39e203b462)
Functions were supposed to check that messages were unread before
passing them to process_read_messages, but some didn't.
The `mark_messages_as_read` function was essentially that, so
take that name.
(imported from commit 2917fe30d2defb8a047ec32e1bc70d379779276b)
When you read messages in a narrow and then un-narrow, collapse
adjacent messages read in the narrow into a summary row that can
be clicked to expand those messages.
Scoped to staging with feature flags.
The implementation of this within our current MessageList is rather ugly.
(imported from commit bcb3a39d8c0c334136fe86318f18ead03f0f50bf)