When narrowing, we use the selected id in the home view as the anchor,
and if the user is new and hasn't selected any messages yet (or moved
the pointer since first using humbug), their home view selected message
will be -1. Rather than failing to get_old_messages for any narrows starting
from that point, return all matching messages.
(imported from commit 72cfe392d9ac01ed41abc8eadf0f47240e374665)
The new system, called blueslip, makes errors fatal when in debug
mode and only output a message when running in production. In the
future, it could also send user errors back to us automatically.
(imported from commit 1232607c0311e885c8b5a5e8a45ffb28822426e0)
This should substantially improve the repeat-rendering time for pages
with large numbers of tweets since we don't need to go all the way to
twitter.com, which can take like a second, to render tweets properly.
To deploy this commit properly, one needs to run
./manage.py createcachetable third_party_api_results
(imported from commit 01b528e61f9dde2ee718bdec0490088907b6017e)
The jQuery .data() documentation says: "Every attempt is made to
convert the string to a JavaScript value (this includes booleans,
numbers, objects, arrays, and null) otherwise it is left as a
string. To retrieve the value's attribute as a string without any
attempt to convert it, use the attr() method."
(imported from commit f47c1cbb94cb5a98ea9842b00f45c35cd21873f9)
This should hopefully cause the page not to scroll around when we load
a giant block of emoji, because now the size of the emoji is known
before it finishes loading.
(imported from commit f566437edd725f6084c6a10c6230fd36e8d12346)
Our mobile apps (which don't support in_home_view filtering) will move
the pointer to a message that isn't actually in the home view, so we
need to accept that sort of input for now (and maybe in general --
even if we fix our mobile apps, third-party clients may screw this up
too).
(imported from commit ce837e972f0581abd1df44fdb2dd5270dfb9afde)
This commit adds a dependency on python-twitter,
whose upstream is at https://github.com/bear/python-twitter,
and which for now needs to manually be installed on our
servers from the Debian package in sid.
(imported from commit 80cd9f4f59a6f0de6b75ac95e412c69e2a2e2490)
This should make their size totally known to the DOM,
which should prevent jumpiness when they load.
(imported from commit 564d920014f5bc52c217adf54c2f5bab6ba625e0)
We now clean up the stream subscription in more places, but some
historical tutorial streams are still around and if an error or page
reload happens during the tutorial it'll stick around.
(imported from commit 8cf0ebda26bf752c1a23296a4ba85d194bbb3004)
This uses the unauthed v1 of the Twitter API, which is going to go
away soon, but it's fine as an interim measure.
(imported from commit 709a250271321f5479854a363875c9da43e6382d)
For people who aren't on the @humbughq.com realm the tutorial bot showed
up in the create new stream modal but attempting to invite them failed.
This was most often noticed with the tutorial bot.
In the future we should figure out a really good cross-realm story, but
in the near-term we need to probably exclude other people outside your
realm rather than special-casing @humbughq.com.
This closes trac #1059.
(imported from commit df704df0c8ae84b23d9491ce6ab77300831cdd20)
We now add the my_fullname class to the entry for you in the sidebar so
that we can automatically update this element when changing your name.
This closes trac #979.
(imported from commit f1473d6bb6f18810311d42c85d4b57aab9966498)
We also grey out the box to prevent the user from clicking twice.
This closes trac #1030.
(imported from commit eec810e3fbc5b7c9350c2d91e448fb27d4c856f8)
This code also has the side effect of making it no longer possible to
click to the right of a name to start composing a message to them.
Fixes#931
(imported from commit 80e995ccc8ead18b80a39181c47cc94d6063f0f6)
Previously, if a narrowed view started out with no message selected,
one would never be selected unless you clicked on it.
(imported from commit 11c6a1a8d046ec33a3dbea4067c40896be137485)
The message list data structure never had the rendered_idx values
initiatized except via _maybe_rerender (called when a message is
selected). For the narrowed message list for streams with no messages
yet, we didn't select a message (as there was none to select); the end
result is that msg_list.append() will never rerender because it tries
to subtract undefined from undefined and gets NaN in its test for
whether it needs to rerender.
So fix this by initializing _min_rendered_idx and _max_rendered_idx to
valid values for the empty message list (the closed interval from 0 to -1).
(imported from commit 6afecb1569185a842a3a9108cedba7e88f8befad)
I find that I never use it, and I don't totally like our
experience in the app to be different from our users'.
Admittedly, this is a small way in which that's the case :)
Finally, since we do usability studies in @humbughq.com,
the link appears there too, and I'd like it not to.
(imported from commit 1225c4ae79de52fa98b21ce00a6542df76b667ea)
Use less technical subjects, and make them good examples of actual
topics you'd want to discuss (previous examples like 'jQuery' might
leave people wondering "jQuery is a technology, not a topic, why is
that a subject?")
(imported from commit 23b74fe145ed2d325daa94a46e63c42c005b1459)
Prior to this change, any stream message sent by internal_send_message
could only be in the realm of the sender.
This was a problem most notably for... the tutorial bot, with the
hilarious consequence that the tutorial worked fine in humbughq.com,
but failed to start anywhere else.
(imported from commit 33a904a28e3a57e1a2cf9172c2e2a75b50967a50)
Require POST method for /accounts/logout. This has the side effect of
automatically enabling Django's CSRF protection.
(imported from commit 44b1b6ebaadc1c03006e21ae54ac768e31234801)
The typeaheads take some time to open and changing focus on keydown
sometimes prevents them from doing so before the focus is changed.
(imported from commit a8153704e60f3d6c34af55a3de5bd43071a15baf)
This is in response to the following bug report by Evan Broder:
FYI, it looks like if I accidentally tab to the "Formatting" link and
hit enter, it erases the message (and replaces it with a reply to
whatever the selected message is, I think?)
This is subtle and here's why: Suppose you have the focus on a
stream name in your left sidebar. j and k will still move your
cursor up and down, but Enter won't reply -- it'll just trigger
the link on the sidebar! So you keep pressing enter over and
over again. Until you click somewhere or press r.
Net-net though, I think it's a change worth making, because
it's good for keyboard accessibility.
(imported from commit b65bcc0abbc751718bb03d418c03961b9ed9e42b)
I.e. if you sent a stream message, Tutorial bot will reply to that
stream, and if you sent a PM, Tutorial bot will reply with a PM.
(imported from commit 05b7d1848f6eb1f70dcd5fb365fba9daee52a5dd)
This simplifies a bunch of fragile resizing logic in our code,
and also addresses the Chrome Canary bug where clicking in the
searchbox causes the navbar to get huge.
This fixes Trac #764 and Trac #1039
(imported from commit fc8c3995109de384b71dfba2b986a8500ff7f08d)