Commit Graph

245 Commits

Author SHA1 Message Date
Tim Abbott 792b283dcd Report end-to-end sending times as experienced by clients.
This should help with determining the prevalence of slow sends as
experienced by users.

(imported from commit f00797679315c928af3c87ad8fdf0112f1dfa900)
2013-11-04 18:32:34 -05:00
Jeff Arnold a1c0590043 Eliminate useless code. You can't click into the box when it's closed.
(imported from commit 67268d7d156ffede2c9ab6a3ec94ab04c3876118)
2013-11-04 16:25:06 -05:00
Jessica McKellar f1e90086f5 Remove the onboarding checklist.
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)
2013-10-31 11:34:15 -04:00
Jeff Arnold 96b4103c80 On click, only focus the compose box if there's no selection
Addresses #4

(imported from commit 4a2400dd4ae95863f7408af1e3c0f058a516adb7)
2013-10-28 14:53:43 -04:00
Zev Benjamin 77a1ed967b Make the socket accessible externally for debuggging
(imported from commit 8f78d09edc05f8eed5f1a2d87643bdd7b7d9bec6)
2013-10-24 17:40:43 -04:00
Kevin Mehall 0a3a22cb3d Support authenticated upload URLs.
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)
2013-10-24 17:01:06 -04:00
Tim Abbott 52829efe52 Add tools for collecting data on message sending times.
Usage, on the javascript console:
> feature_flags.collect_send_times = true;
> compose.send_many_messages("test", "test", 3)
> compose.send_times_data
  [47, 99, 48]

(imported from commit a2a22eea9bb1bbe24a79ec0453c099dabfc61c19)
2013-10-23 14:05:01 -04:00
Zev Benjamin 286803660f Optionally log message send times on the client
(imported from commit 900a513496b7796173a7685a55b110b63024f574)
2013-10-22 18:45:11 -04:00
Zev Benjamin ac87d92138 Send messages using SockJS on staging
(imported from commit 812d20b1eab76eeb0d8fb92029fdb38d5faa9cce)
2013-10-22 18:45:11 -04:00
Kevin Mehall 89d149c6f7 Fix @-mention "not subscribed" warning for all_public_streams bots.
Don't warn when @-mentioning a bot on a public stream that it does
not appear to be subscribed to. It may be receiving those messages
anyway.

(imported from commit 4a00694942a721897a01736f48033c71048e0b16)
2013-10-18 14:55:32 -04:00
Steve Howell 89cbda5001 Keep in-progress compose open on narrows.
If the user has text in the compose box, don't close or
change the compose box when they narrow.

(imported from commit f9b400f6bac37cb313f1fd87aadb3ba1d3a035ef)
2013-10-10 11:20:49 -04:00
Steve Howell 8017fc9a15 Move compose.start() calls out of click handlers.
For the two cases where narrowing should open the compose box,
we now put that logic inside of narrow.js.

(imported from commit 570e22e90c2f6d422ba71cce400c075f0b8adf51)
2013-10-10 11:20:49 -04:00
Leo Franchi d3d4a41419 Block mit.edu from showing mention invitations
(imported from commit e8e85cad0198103a072cd452feb78a67b05b185c)
2013-09-18 11:50:58 -04:00
Leo Franchi 0cf588cd25 Show a warning and action button when @-mentioning someone not on the stream
(imported from commit 464d5a028f6a8f2698683e7317972dc0c7b9e336)
2013-09-17 16:49:47 -04:00
Steve Howell b97c60b635 Restore the compose box's original size after hitting send.
This fix required upgrading to 1.1.17, but it's not squashed
with the upgrade, because that would complicate keeping the
copyright-fixing commit separate from the upgrading commit.

The new version of the plugin makes it so we can trigger a
resize event, but it's backward incompatible with our old
compose box code.

A minor cleanup here is that we also don't trigger a resize
right before hiding the compose box.

(imported from commit 6b0cb9ccd2ddef919fd375a80cfca535b5b74c0f)
2013-09-06 10:58:48 -04:00
Allen Rabinovich 4aa9798f29 Move the lock to the left and widen the topic input field
(imported from commit 1d70afdc82b653239f7d016997c7e9cbe9eb5f14)
2013-09-03 20:15:17 -07:00
Jessica McKellar 2ba75d2bfa Report a distinct string including version as the client for desktop app users.
(imported from commit 58115e0cdd32f19f3694a1ffbf8664561175cf55)
2013-08-27 10:24:36 -04:00
Scott Feeney bf0909a94d Lazy load Dropbox widget, and only when enabled
This brings several improvements:

* The Dropbox script won't slow loading our app.
* If it fails to load, no traceback; Dropbox link just won't appear.
* For users with Dropbox disabled (most at this point), no loading at all.

(imported from commit e71ae5790fc85a185e622bdafb350109527b4eee)
2013-08-26 13:13:00 -04:00
Kevin Mehall e6de154e0d Reject messages consisting solely of whitespace.
Trac #1701

(imported from commit 48a172e17f69d11596ecf9a5b13cd48a074966c3)
2013-08-21 10:37:50 -04:00
Steve Howell 29c012dc74 Create stream_data.js module.
This pulls a lot of data-centric functions out of subs.js.

(imported from commit 0deed7d4bf5697e893af9bc9d888c2d5da8d9fa2)
2013-08-19 12:17:55 -04:00
Steve Howell 30af17254d Require topics for customer7.invalid and zulip.com.
(imported from commit 6b17147b50575dd4ea8d688f15951660766708fa)
2013-08-15 17:09:26 -04:00
Waseem Daher 34e0c1e696 Use iframe for Dropbox integration.
This lets us avoid popping up a separate browser window (which would
not currently work in the desktop app).

This closes Trac #1673.

(imported from commit eb1990d8021600fc4d3870f6ec3a28f7111036c3)
2013-08-14 11:05:14 -04:00
Steve Howell 78d8153e6b Remove compose box flicker after sending messages.
We remove the calls to clear_box()/hide_box() and start(),
so that we don't mutate a bunch of UI elements needlessly.
Everything that start() does either never made sense in a
just-after-message-sent context, or it was necessary prior to
this fix only because of what happened in clear_box() or
hide_box().

This change closes out trac #1672, "Clean up always-open code."

(imported from commit bedaa719eb05e166a4bac562784da0cce8859700)
2013-08-13 14:12:29 -04:00
Steve Howell 8f11ce7485 Remove redundant calls to send_status.hide()
One of the calls was obviously a typo dup, and the other
call is already covered by clear_box().

(imported from commit 448dc4c0f265cc7260ea08f0468a7d1440903e3c)
2013-08-13 14:12:28 -04:00
Steve Howell 5248c68fb7 Extract compose.show_box_for_msg_type()
(imported from commit 886717cbc73d0d662ccbd96091e94b85864d0049)
2013-08-13 14:12:28 -04:00
Steve Howell 86b337ca75 Extract compose.same_recipient_as_before()
(imported from commit 2ba8589127e3a0e86c00bb52a22be01bcad48a5d)
2013-08-13 14:12:28 -04:00
Steve Howell 6314089e26 Extract compose.fill_in_opts_from_current_narrowed_view.
(imported from commit e89c6c7f42aa8fdfd77e879e6d9f43dd67744ea6)
2013-08-13 14:12:28 -04:00
Steve Howell 0879648f0e Remove respond_to_cursor flag.
The prior commit, which was a functional fix, made the
flag obsolete.

(imported from commit 203a080106b00e0355a1223f783bbe579430b4ad)
2013-08-13 14:12:28 -04:00
Steve Howell 2b2587d70b Stop using old reply recipient in always-open compose.
Due to the code removed in this diff, we would put you
back to your original reply stream/topic/sendee

(imported from commit 6e1f4666e3b32b057e692e015782780f7c734445)
2013-08-13 14:12:28 -04:00
Steve Howell 6686ca04d2 Remove feature_flags.always_open_compose from code.
The flag has been set to true for a while, so we removed
the flag and a bit of dead code associated with it.  This
change should not affect any functionality on any realm.

(imported from commit 8d457f52584173994d0e5e83ca326f892cd90057)
2013-08-13 14:12:27 -04:00
Waseem Daher 9ea08a35c5 Refactor: move attachment-related code into compose.js
(imported from commit 4436f0799a9c1a00e964962d4d0d165e03b641b7)
2013-08-12 17:22:23 -04:00
Steve Howell c4e168254c Fix too-much-fading regression and remove spurious classes.
To get to the bottom of the too-much-fading regression,
it was necessary to clean up the code, which was overly
complicated by multi-purposed functions.

The API for compose_fade now has these functions:

    set_focused_recipient
    start_compose
    clear_compose
    update_message_list
    update_faded_messages

Internally there is now a notion of "normal display",
so e.g. when you want a normal display, we call
_diplay_messages_normally() internally, which removes the
faded/unfaded classes from all messages.

(imported from commit 7eb2b0a163f29d9ebae26661f432fecc7c331e4c)
2013-08-12 11:54:27 -04:00
Steve Howell 6591c79184 Un-debounce fade/unfade when starting a compose.
When starting a compose, call compose_fade.set_faded_messages,
which will immediately do fade/unfade logic, whereas before
the code path went thru debouncing logic.

(imported from commit 7d0b30435be32a7132dbf05bf064b03b925a2d42)
2013-08-11 18:08:36 -04:00
Steve Howell 6cc5c43e59 Move code into compose_fade.set_focused_recipient().
Move code from compose.update_fade() into
compose_fade.set_focused_recipient(), which makes it
so that we only have to send the msg_type.

(imported from commit c17665d9f34f525bdedcd36d39d3a112fa36a914)
2013-08-11 17:54:50 -04:00
Steve Howell 37f8cc9294 Extracted code into compose_fade.js.
The compose_fade has three public exports:

    set_focused_recipient
    unfade_messages
    update_faded_messages

All code was pulled directly from compose.js, except for the
one-line setter of set_focused_recipient.  The focused_recipients
variable that used to be in compose.js was moved to compose_fade.js,
hence the need for the setter.

(imported from commit 462ca5d0d0bd58612d0197f3734a8c78de8c6d30)
2013-08-11 17:05:13 -04:00
Steve Howell dbcbeb17d4 Debounce update_faded_messages to once per 150ms.
This is an attempt to make the compose box less sluggish.

(imported from commit b1450216da0a92fc69e0d129a74e76eca37df1b5)
2013-08-11 12:01:24 -04:00
Steve Howell 35af96a807 Add hasClass() optimization for fading.
(imported from commit 859e5c2ad731e16d4b4a7de80e574ee5131888fc)
2013-08-11 10:49:11 -04:00
Steve Howell e36fd929bc Created stream_color.js.
This is a pure refactoring that mostly just moves code from
subs.js to the new stream_color.js and updates module references
accordingly.  In order to prevent introducing some exports,
update_stream_color was given an additional "sub" parameter
and update_stream_sidebar_swatch_color was given an "id"
parameter.

Killed off unused initial_color_fetch var.

(imported from commit b7644ce67f50d31fb46f564d758d661eea776aa6)
2013-08-08 18:22:44 -04:00
Tim Abbott 6dd049fa26 Rename zephyr.js to zulip.js.
(imported from commit e62aa374f1bf2e75cebc00d0bba4e3ade82d19f6)
2013-08-05 17:59:04 -04:00
Tim Abbott 5a320db3c1 Add curly braces for all javascript if statements lacking them.
(imported from commit 32c7643d1a6ecdfaf634424d217938c8a368dade)
2013-08-01 11:47:54 -04:00
Kevin Mehall 0e0ed886e1 Add feature_flags mechanism to enable experiments.
In the future, this could come from the server to enable individual
experiments on a per-realm basis.

(imported from commit 8fd1ba1910b3cfd131f58bab8efbd11a42053bc3)
2013-08-01 11:26:55 -04:00
Scott Feeney c56353138d Fix tracebacks on reload while composing
(imported from commit 5ba1c93b8af015197e77bd16ef9178a6e743a849)
2013-07-30 13:10:50 -04:00
Scott Feeney a35fff90cc Replace $.extend
(imported from commit 2c1ee3c2714d388f2a71398fe81c049cc54ff94d)
2013-07-30 12:12:59 -04:00
Tim Abbott bc4d7c687d Rename our custom JS events to use Zulip, not Zephyr.
(imported from commit 61ac456d394a6dbc14f3e9183a53313990db5059)
2013-07-29 12:11:26 -04:00
Tim Abbott 3bba0cc927 Move zephyr/static to just static.
It's not really a part of the server (aka the rest of zephyr/).

(imported from commit 27f6b6b064938ad927075a68d873e4b68710d279)
2013-07-29 12:11:26 -04:00