The inactive flag wasn't really supported, and the
activation_toggle_button class was misleading, since
we don't yet toggle in both directions.
(imported from commit 0c8511021dd580c86df4e80092a6dd49e32773f9)
We had people_list-related code left over from before we
started using realm_people_dict.
(imported from commit f77c441269f07db2a8998c2184de81f9d0c053d6)
Aborting a xhr actually calls the error callback, which was
restarting the get_events loop, and we were also restarting it
manually in restart_get_updates.
(imported from commit dcdb4a27539ce35ecd83c2ade5b4edca3fb848e1)
If you used the mousewheel in certain page sub-elements, scrolling
to the bottom would sometimes turn into scrolling the main page.
We had code to make that not happen, but it was sensitive to
integer rounding, so I added a one pixel fudge factor.
(imported from commit 5ed1f4e717e5f9ce3316383812dee27913afdd49)
When GROUP PMs are in the right sidebar, and when there are
lots of users, we set max heights so that both USERS and
GROUP PMs show up.
(imported from commit 4a5a16a8cf03d853769b3a690ac5b0338a2c8461)
When a user squishes the browser window enough to move users
to the left sidebar, we need to move user groups as well. More
importantly, when they widen again, we move both of them back
in a way that users stay on top of groups.
(imported from commit d80722b58190d42a2dfc5247bfffaa7708cde21a)
Leo and I were looking over this code and I couldn't remember what it
was doing. So after I re-derived its purpose, we figured that an
explanatory comment was in order.
(imported from commit ce984362e2b504b40f3d3586777bd73691ad5ea7)
If a user types "/me runs to the store", we put "runs to the store"
in bold after their name.
(imported from commit fbc11e99244e1c8fa1c03e4753e706957fcd449e)
The function show_actions_popover() actually toggles the
message action menu open and closed. I renamed the method
to toggle_actions_popover(), and I check to make sure the
menu is open before trying to focus its first item.
(imported from commit b2c32b6c4e0be6066cd1d41463457b7e991df0ec)
Every time we re-render the huddles section, we need to
update the unread count. We do this is in very similar
fashion to how we update individual users.
(imported from commit 2419365bc602ddaebc609090e119c0dcfad35bb7)
This fixes a mild regression in 6bd2a0315ff56a20027074d65ccaa094bd35e63f,
which fixed a bigger bug. That change added the event parameter to
add_alert_word(); this change updates one of the callers to now
supply it.
(imported from commit c6375abb8bd22d12c538cd7439462aae4665ee38)
Show up to 10 of your recent group PM conversations in the right
sidebar. Clicking on the links narrows to the huddle and opens the
compose box for the huddle. The green circles have opacity
proportional to the number of users present in the huddle.
This is feature flagged to staging only.
Some of this code was written by Allen before commits were squashed.
Known issue: unread counts disappear on certain refresh events.
(imported from commit 3b44665150ba20594d8b0295cb30df03601c1d52)
Add a method that lets us know what percentage of a huddle is
present. (We can use this later to set the opacity of huddles
in the UI.)
(imported from commit 8a2383951807d7bfbf9d730a8980d977cf23b379)
This should substantially mitigate the get_updates failures that we've
been seeing, since users will experience a 2s-slow send, not a 0-60
second slow send.
We should revert this once we resolve the root problem.
(imported from commit b665d0dfe674e1113bdd62cef50e3d9c52758e4c)
The global in question was `event`, set to:
MouseEvent {dataTransfer: null,
toElement: button.btn btn-mini add-alert-word,
fromElement: null, y: 442, x: 763…}
in Chrome. This does seem to be the correct event.
In Chrome, this global variable existed, so the code path didn't error
out. In Firefox, the global variable didn't exist, causing adding
alert words to fail.
(imported from commit 6bd2a0315ff56a20027074d65ccaa094bd35e63f)
This will hopefully help with the send dialog being stuck on
"sending" as well as allowing us to not show errors to the user on
reconnect.
(imported from commit 31ee889853f348e486863073dc130cdfb4e1338d)
Clients can only have one connection at a time, anyway, so we can
just keep track of a client id, instead. This makes reconnections
easier.
It's a little funny to use queue ids for the client id, but we know
they should exist by the time the client is connecting and they are
guaranteed to already be unique and authenticatable. We will also
eventually be integrating the event system and the socket code closer
anyway.
(imported from commit 1f60e06fb16d31d6c121deafd493fb304d19a6c2)
This is unnecessary without summarization and has a performance
impact on scrolling.
This reverts commit 6270a33ff0fe98fc901b687ca533ef0ea127d052.
(imported from commit ac328a9fe344adfaf1cc1822cd58bc9178ae1a33)
This reverts commit c10d9c1a0d23891acce88bf8d79866c08cb75681.
This reverts commit 9259a246946cd968a8725c38ff5ef2d4b4793717.
(imported from commit 50e9e0136c2487cc63d75ae2b78df0c70a1b0be1)
This is the amount of time between when it is sent, and when it is
rendered into the user's home view.
(imported from commit 468c28e77ba16c7256c359e90ab5aacf9d497585)
Activity.js now has the capability to track huddles that
come through in loaded messages and return them in reverse
chronological order by their most recent message. Right
now this only connected to a unit test, not any production
code.
(imported from commit 59957086fa2e454e5711472df091f178217aed2b)
This can be squashed with the prior commit, which inlined this
MIT check into update_users() while trying to avoid other
complications. After inlining the code, it's clear that we
don't need to call the sort_users() line of code for MIT users,
so I moved the MIT guard condition up.
(imported from commit fa5b52e14964ad595b34d40ce6c8450ea93726c5)
Since ui.set_presence_list is only called from activity.js, I am
inlining the code into activity.update_users(). This also allows
us to move ui.presence_descriptions into activity.js, which
is the right home for presence-related things.
(imported from commit 0ff239275c544a86c14d517bc386d06726b81cd9)
The user_info var was mapping users to presence information, and
presence_info is a better name for it. This change is partly tactical,
as it sets us up to inline ui.set_presence_list, which receives
user_list as presence_list and then has a completely different
variable called user_info.
By doing this pre-factoring, the next commit becomes just a pure
code move without more moving parts of renaming variables.
(imported from commit 4b015d19886b43d24905124eb37cd9dd317aa87b)
Narrow.activate was called without an options object in one
obscure location. I'm not sure how it's actually triggered,
since all searches seem to go through the typeahead path with
the "Search for x" option, but someone managed to do it.
(imported from commit 5e0e1bbe7570e5f6a654949547dc164e01125efa)
It's somewhat buggy, and has thus been annoying our internal users, so
better to disable it until we can fix the bugs.
(imported from commit f981791d32d321b0cfe06b4a337e26ab48832bb3)
This should help with determining the prevalence of slow sends as
experienced by users.
(imported from commit f00797679315c928af3c87ad8fdf0112f1dfa900)
Perhaps we should be checking based on an ID rather than the actual
text, but this fixes the proximal issue.
(imported from commit b125415c3a8356255b64c8e22733532491ea0065)
I switched narrow.by_subject and narrow.by_recipient to use the all_msg_list
instead of current_msg_list, since we wanted to be able to narrow to messages
specifically not in the current_msg_list. However, in searches which revealed
old messages outside the range of all_msg_list (which only has a single contiguous range),
this broke narrowing.
Let's use msg_metadata_cache instead.
(imported from commit 427f717484b4ae83d9bb4cc6e51ce17177d037fe)
Displays a notification above the composebox in cases where the message
is not visible (further down), or where it's outside the current narrow or search.
It also offers a link to the appropriate narrow when it makes sense, and offers
timetravel when appropriate. There is currently a bug with timetravel (and you can
see this when using the popover menu) that makes "narrow to messages around this time"
not work for muted messages.
This resolves Trac #1518.
(imported from commit 391ca0b9c07d91496f6585a4fd8e15723d1170e2)
Looking at the historical data, fewer than 50% of active users have
completed the checklist, which means that it is just persistent
clutter. We also have other better ways of encouraging people to send
traffic and get the apps now.
This commit removes both the frontend UI and backend work but leaves
the db row for now for the historical data.
(imported from commit e8f5780be37bbc75f794fb118e4dd41d8811f2bf)
Nobody uses it, and it causes confusion. (How is it different from 'Home'?)
For now, leave in the ability to get to the narrow, although we may
ultimately want to do away with it as well.
(imported from commit 35b3f27e39c4de3391bc5571b32f7242a29f4cfa)
We were using Gravatar for user avatars, but now users can
upload their avatars directly to Zulip, and we will store
their avatar for them. This removes the old Gravatar-related
interface and polling code.
This commit does not attempt to update the avatars in
messages that have already been loaded, either for the user
making the change or other users.
(imported from commit 301dc48f96f83de0136c93de57055638c79e0961)
The "Your Account" and "Notifications" boxes on the Settings
page each had their own border and their own "Save changes"
button, but they were within the same form and sending to the
same back end point.
This commit creates a separate form and endpoint for each
of the two boxes.
(imported from commit 04d4d16938f20749a18d2c6887da3ed3cf21ef74)
Previously, if the user held down the enter button while the socket
was disconnected, the client would try to connect in a very tight
loop. Now we throttle reconnection attempts to 1 per second.
(imported from commit 7b18260b992d5a34f3ea7925cf72b383f84bbabd)
If the user has a flaky connection, we might be in the backoff state
of attempting a reconnect. But when the user regains connectivity
and tries to send, we want to send the message as soon as possible.
(imported from commit 3c5c8e9c3104ff7923258f73c9ab700548518d16)
All local_server JS stuff should ideally be controlled from
feature-flags so it's easy to see at a glance what's been done.
(imported from commit 45b1cdae382679d3fa3b5f02f67e8ab749a89a51)
We leave the HTML in because it's harmless. (We could do a more
thorough expunge, but I don't see the point).
(imported from commit d3d68b0b2df96a9f3de73903b043c18bc6f77563)
The Streams page should only show active public realms, even though
a user might have info about a "retired" stream in their browser.
I regressed this in 69b83d769 for "retired" streams. A retired
stream is a stream that no longer has subscribers. The bug
scenario here was that you could create a stream, regret it,
unsubscribe yourself, and then the stream never went away from
the Streams page.
This diff tries to be a little more explicit about building the
list of streams for the Streams page. Basically you have two
sources:
* Get only the subscribed streams from the internal
data structures.
* Get the unsubscribed streams by calling the back end
for all public streams, and subtract out the subscribed
streams.
I tested the following scenarios:
normal stream with me: in Streams
normal stream without me: in Streams
my invite-only: in Streams
their invite-only with me: in Streams
their invite-only without me: not in Streams
retired stream: not in Streams (but message colors are good)
See the email "custom query to get public stream names" for some
related discussion.
(imported from commit bc9224e68797b26b795399941117faa9d6858b39)
I want to make subscribed_streams() external, but it conflicts with
a legacy name in the same module (stream_data.js), so I have to rename
it in the same commit. The new name conforms better to the current
naming convention, which generally has functions returning objects
use "sub" in the name.
(imported from commit 9f1ed60772c649359a413257e0998857eab3603f)
Trac #1734
This is implemented by bouncing uploaded file links through a view
that checks authentication and redirects to an expiring S3 URL.
This makes file uploads return a domain-relative URI. The client converts
this to an absolute URI when it's in the composebox, then back to relative
when it's submitted to the server.
We need the relative URI because the same message may be viewed across
{staging,www,zephyr}.zulip.com, which have different cookies.
(imported from commit 33acb2abaa3002325f389d5198fb20ee1b30f5fa)
When we add starring of historical messages, they'll get added to the
home view (since we don't filter them out), which isn't a big deal --
but we don't want to make an inaccurate claim that the user subscribed
to this stream and then unsubscribed.
This should most properly be handled by filtering server-side, but at
the moment our lack of an index on UserMessage.flags makes that
impractical from a performance perspective.
(imported from commit 00751a5f9fc20e9da5c09914c11d1579f9e7398e)