Some cache keys used by Django (like sessions) will not have the key
prefixes, but those values shouldn't change across most restarts.
(imported from commit 2fe61028111fe9d5700432214a611b3341412654)
We are moving back to a barnowl-ish scrolling algorithm for
the arrow keys, where when you have a message selected toward
the bottom of the screen, hitting down arrow and up arrow
effectively puts the originally selected message at the center
of the screen. In order to avoid unnecessary scrolls, we
are making it so that you can move the pointer closer to the
edges.
(imported from commit c08233d6d2034a04469b8f424b39d94a230cafe0)
This is the patch described here:
https://github.com/twitter/bootstrap/issues/271592189b87ad
That commit has not been upstreamed to bootstrap due to bureaucracy issues.
(imported from commit 3c4a109b58f403569a41f5048ab347a800f029c2)
I removed references to the following:
on_custom
custom_message
current_message
show_custom_message()
clear_customer_message()
(They were not being used anywhere.) Also, show() does not
receive a msg parameter any more.
(imported from commit 8ec347b40fc9fa582317d68e85c98258cf3fba2f)
Diff Match Patch provides more human-readable diffs. For example,
try replacing "mouse" with "sofas".
(imported from commit 7ced81202ce85d5ef69888c59912e3e44c38cfc8)
I didn't use red and green for fear of it not being visible to
color-blind users. We may need to tweak the colors.
(imported from commit 59c4f1dac549a248783e4c3b3ec472d8cb690df5)
I would really like to parse the HTML we produce from the library to
ensure that we don't generate malformed-HTML. This is unfortunately
hard because we both want pretty strict parsing and we want to parse
html5 fragments. For now, we just do a basic sanity check.
We also may want to switch to Google Diff-Match-Patch, as that can
clean up the resulting diffs.
(imported from commit 3772f92135cfd7423c335335f861f2c11462a8db)
We could get into this situation when someone is doing a search and
someone else edits a message while the results are still loading.
(imported from commit 99e371fd75c7ae7dc98a0c03bc434e434da44b94)
`current_msg_list.get(id)` and `rows.get(id,
current_msg_list.table_name)` are not interchangable in terms of
checking for whether we have a message. The former checks whether
the message is in the current message list while the latter checks
whether the message is in the current message list and currently
rendered. `message_edit.end` only operates on rendered messages.
(imported from commit 203ee612bfd0aa94571dde9b601e948b3c6f6cbb)
Previously, if you didn't have a message that someone else had edited
in your message list, you would get an exception because we weren't
checking whether we actually had the message or not.
(imported from commit 33a5c6e7fe95b5397a32df5c7b5f6714d71e1e5f)
When determining if desktop notifications are enabled, we can check whether
there is a "window.bridge" element.
Now when it comes time to actually send out notifications, we can just test
again for the existence of "window.bridge" and if so, shunt the data over
it.
(imported from commit 8104c91ea9da7bc485c86a3c21edc88905d2f47b)
Before this fix, the code would restrict the pointer to be above
either the 1/2 mark or 2/3 mark of the page, depending on your
scrolling direction. This fix makes it so that the system leaves
your scroll and pointer alone when between the 1/5 mark and 4/5
mark. This means the user can read more messages on the screen
at a time before getting paginated.
(imported from commit 98f6319bf63181dd331e037ac20a0c15518725ea)
When you make a call to set_message_position(), you already
know that the pointer is gonna be onscreen, so set the flag
to suppress scroll pointer updates. This should be faster and
also avoid future confusing bugs where recenter_view() and
keep_pointer_in_view() run for the same event.
(Both callers to recenter_view pass in the selected message,
and then the calls to set_message_position() set the scrollTop
so that the selected message shows onscreen.)
(imported from commit f1a6f189b7899b280a6316ea7eb03f015d3d4ae3)
This also changes the color for the blink effect when you
get private messages. For simplicity sake, we use the
same color for private messages and mentions.
(imported from commit 46b0f7af1dccefe575004e7676990e5c854a3dcc)
Previously it could return an array or boolean, and this inconsistent
interface had several latent bugs where consumers of the API only
considered it returning one or the other type.
This also fixes a specific bug a user triggered by being narrowed to
nothing (/#narrow) and clicking in the compose box.
(imported from commit 64ca2a37a9f288066f89b0ddec6638e010704eb0)
Re-focuses on the compose box after a send, under these conditions:
1) narrowed to stream+subject -or- responding to PM/huddle
2) compose was initiated by clicking on a message or hitting "r"/"enter"
3) cursor has not moved since you've started the composition
Additionally, if you are thus narrowed, we will move your cursor when you've sent
a message to that message, assuming that such a message initially appears visible.
(imported from commit 373c858081694e6fc9994639340a847d66edb566)
This change fixes the barnowl scrolling so that the ratios of
1/5, 1/2, and 2/3 are all relative to the visible viewport.
The core part of the fix is that we need to call
ui.message_viewport_info() to get the correct offsets for
the top/height of the actually visible viewport Because
this function is fairly expensive, I didn't want the
helper functions needlessly re-calling it. I could
have passed the helper functions the structure, but at
that point it was simpler to inline their functionality.
(imported from commit fb10d99313d568e85acfa70703c4651466acbc21)
Now that this functionality is accessible from the right sidebar, we
don't really need it here.
(imported from commit 34eaef4e1200f9fc673a681f0be87d8008033e83)
Currently, this is accessed by clicking anywhere in the sidebar region
other than the text of the person's name itself, which does the
existing narrow behaviour. Later we can make it do something clever
with hovering pulling out the popover or something, but that's
potentially a significant design project I think this is good enough
to be useful.
(imported from commit a2cc5dc851661117a6d438ca48a1ce7585d4eb63)