Commit Graph

5927 Commits

Author SHA1 Message Date
Zev Benjamin bfebfbbff5 Make error messages a little more consistent
(imported from commit 77baba591628bef6b8b8b0ae28a9e05ec2fac693)
2013-08-13 13:45:10 -04:00
Zev Benjamin 6fcfcf3f32 Fix comment
(imported from commit 6f8eac90e5b011bd25b09e562ebcb9d2cae39a06)
2013-08-13 13:45:09 -04:00
Zev Benjamin bcc03dd4ab Do full-precision time comparison when checking for duplicated messages
We've had microsecond-resolution timestamps since we migrated to Postgres.

(imported from commit 81fe79f00097ceb40105645aa04a2f0ee29d3a19)
2013-08-13 13:45:09 -04:00
Luke Faraone 8c35db91c0 Unit testing for MIT user name calculation / mailing list protection.
(imported from commit ae7d4c0a1fea0b0887861a71828eae7c3022ec6f)
2013-08-13 10:21:45 -07:00
Luke Faraone 3129b6374d Fix broken parsing of DNS response.
(imported from commit 3a627d45bc313bf244dc699a59df9423c849bc35)
2013-08-13 10:21:24 -07:00
Steve Howell ad10cecdd7 Extract mark_summarized().
(imported from commit 14a1c69392ec6ca8cb0ec72196368a195dd4c6fa)
2013-08-13 11:26:12 -04:00
Steve Howell d27feeed62 Extract code to summary.js.
(imported from commit 51d958b27e53555f5f77d6e6b661eade57190e23)
2013-08-13 11:26:12 -04:00
Waseem Daher 02dba3da11 iframe-bot: Don't show tweets.
(imported from commit 584fdbfa50e2ff1d3526f741e96ef6691fa731e1)
2013-08-13 10:41:02 -04:00
Waseem Daher 7329cedd84 iframe-bot: Properly style emoji (but you need to copy in the images).
(imported from commit 3fbf54a46d4f20e9da21c73cfe9f6a0064749f1c)
2013-08-13 10:36:05 -04:00
Zev Benjamin 62f607fd5e Debounce fading on the leading instead of the trailing edge
(imported from commit 11d0e8938c1f29cfea0678330e7af9884844af21)
2013-08-12 18:07:30 -04:00
Jessica McKellar 29a64b6c59 Only suggest declaring bankruptcy once.
Use information from the server to figure out if we should prompt for
bankruptcy, rather than trying repeatedly inside load_more.

(imported from commit ccb8cb1ce482b8bf3d343e7324fef7981880282d)
2013-08-12 17:33:40 -04:00
Jessica McKellar 1a0cc2b421 Send enough information in page_params for the client to consider bankruptcy.
Previously, we'd determine unread counts client-side as messages got
loaded, which meant:

a) how many unread messages you were known to have kept changing
b) you could bankrupt yourself and then get the bankruptcy message
again as more messages arrived from the server

(imported from commit 90f1af27b493c720f77d37487d8746749faf157e)
2013-08-12 17:33:39 -04:00
Waseem Daher abef6be12f bugdown: Unescape HTML entities in Twitter.
This closes Trac #1071.

(imported from commit 521ffa6ed13df7c08e67218564d426ca90080948)
2013-08-12 17:23:49 -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
Waseem Daher dfb60ee966 File uploads using Dropbox.
(imported from commit c552133fc7025eca526fbfef24fd544260d7111b)
2013-08-12 17:22:23 -04:00
Waseem Daher 932d002ff4 Zulip embedded iframe bot.
Currently running for CUSTOMER3, at MIT.

(imported from commit 1c29d3fb3fbf29b9ea633e9fc102e7737eba4fd7)
2013-08-12 17:09:48 -04:00
Zev Benjamin 90bf2ec9d0 referral: Fix some finicky element movement
(imported from commit 4f90bb1c18eb42ca29036d0392d05f0337a51bba)
2013-08-12 17:03:33 -04:00
Waseem Daher 5f7662d4ee font-awesome: icon- becomes icon-vector-.
(imported from commit 8d83e4c0d13a706ed7e1b957bbc3f27c3d3b5bca)
2013-08-12 16:55:29 -04:00
Waseem Daher 319d90be48 Upgrade Font Awesome to v3.2.1.
(imported from commit 3a2f8ff8de5570113fd28aa3bf297eb7e9f5dfeb)
2013-08-12 16:55:29 -04:00
Waseem Daher 6a1486a4cd fonts: Move our custom icon to the top.
(imported from commit 511ee1dc74a1437518f7c72f47e0dce3605db2fe)
2013-08-12 16:55:29 -04:00
Waseem Daher 067bd390ac Remove kiosk mode.
We instead implemented the ~desired functionality here using the
API and a bot to make a totally read-only, static, slowly-updating
view into the Zuliverse.

This is the moral equivalent of reverting deb035b4c702fcdb0e660ed549fe74c682abb6d9

(imported from commit 9d743fe82f197b37f005e5a038f77cc4b8566024)
2013-08-12 16:19:53 -04:00
Waseem Daher f44176020e kiosk: Suppress user-info popover.
(imported from commit bda1714a49ea0cfa4ad0ec6447c7bb3fcf8b866b)
2013-08-12 16:19:53 -04:00
Luke Faraone 0cb741d7cc Removed confusing ALLOW_REGISTER setting.
ALLOW_REGISTER was no longer being used in determining whether you could
register for the app, so I've removed it to avoid additional local-dev /
production issues.

This closes #1613.

(imported from commit c928c6d350602d35f745ae1e60d734e4567885fc)
2013-08-12 16:16:26 -04:00
Luke Faraone f3c8806d30 Allow open realm signups with non-real-user MIT addresses.
This allows me to use a mail alias with CUSTOMER3, and closes #1671.

(imported from commit 581d1145fb112b9d35ad522fa06f81a25b4b8d3b)
2013-08-12 16:16:24 -04:00
Luke Faraone cb2e993393 Allow any user with a @mit.edu to register for Zulip.
We add a new validator that ensures that people who sign up with @mit.edu
addresses are in fact MIT users.

This closes #1612.

(imported from commit 1e30794b1615dd57cb0e367d1fa186a877253357)
2013-08-12 13:09:20 -07:00
Luke Faraone 368ace069c Use PyDNS instead of shelling out to `host`
On Debian systems, this is found in the `python-dns` package.

On OS X and others, install "pydns" using your Python package manager.

(imported from commit 17827d0a1d3d72b12945df5563295a1573bfa1ed)
2013-08-12 13:09:19 -07:00
Zev Benjamin 9c8a9ac947 Correctly return the message id for already mirrored zephyr messages
This was previously causing us to generate a traceback every time we
hit a duplicated zephyr due to CC'ing.

(imported from commit 240e1559655d0166dcd864e84649ab97b87a29ad)
2013-08-12 15:49:19 -04:00
Allen Rabinovich fb0d038b77 Make more space for the 24-hour timestamp
(imported from commit d1e145e8b6b6f3fb62732c0d59311cc47bbcf9e5)
2013-08-12 11:54:47 -07:00
Steve Howell 878ee2b3fd Move Filter class to filter.js from narrow.js.
1) The class Filter now lives in its own module.
2) The function canonicalized_operators() is now a class method on Filter.
3) The function message_in_home moved to filter.js and became private.
4) Various calling code had to change, of course.
5) Splitting out Filter helped simplify a few tests.

(imported from commit e41d792b46d3d6a30d3bd03db0419f129d0a2a7b)
2013-08-12 13:58:32 -04:00
Zev Benjamin 46eb90a238 referral: Clean up display of validation errors
* We now clear the validation errors when the input box is de-focused
* We make the left sidebar height accommodate the validation error messages

(imported from commit 4b39bfd3e8e8dd707722492a3f98967ee4ccf0ab)
2013-08-12 12:50:33 -04:00
Zev Benjamin 51beeba854 referral: Prevent empty form submission
(imported from commit cc012e84c21bc424adaaa79611f09415480a2ba5)
2013-08-12 12:50:32 -04:00
Zev Benjamin 16f2a6e284 referral: Only show "no more invites" message when you first deplete your invites
(imported from commit 831e8aa466c4c4e463e269bad75078d1328fe286)
2013-08-12 12:50:32 -04:00
Zev Benjamin 848242399c referral: Hide explanatary text after first referral
(imported from commit 91460b80e2f45b9eaf2f24b3c1eb75ded884c445)
2013-08-12 12:50:32 -04:00
Zev Benjamin 9a0851f82f referral: Move explanatory text above input box
(imported from commit e4802b4b05a5aa8c4fa4631c5d36876632ba393b)
2013-08-12 12:50:32 -04:00
Zev Benjamin 126fcd42d7 referral: Show feedback immediately and don't show errors
(imported from commit 3bf6071c4fdeeaa50ea05c60b4bf0244c78ebeb0)
2013-08-12 12:50:32 -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
Waseem Daher da01c3b3da customer3: Explanatory text on registration form(s).
(imported from commit 39f2a06149514df271e3302ca32c41934b0fc630)
2013-08-12 11:13:15 -04:00
Tim Abbott f9c3f77d07 For the CUSTOMER3 realm, include 100 messages in initial message set.
This is an experiment to try to ease the customer3 onboarding process
given that there will be a website with a public feed of recent Zulip
messages, to ensure that those messages appear for new users.

(imported from commit 31fb59c1800728b5e4d8a5ce7282c7dcedb02b21)
2013-08-12 10:17:18 -04:00
Tim Abbott e2413e8137 Defer processing of get_old_messages results during tutorial.
Previously we would just discard the results of get_old_messages,
which meant that any messages sent either while you were doing the
tutorial or that you started out with (as in the case of the CUSTOMER3
experiment) would be lost until you reloaded.

(imported from commit f5280c091ab6ed7c2af6eb8fe49c0fa6b997ac97)
2013-08-12 10:17:18 -04:00
Tim Abbott b7e3f608cb Fix setting the initial pointer for users starting with messages.
This if statement stopped working when we made the pointer managed via
the events system.

(imported from commit 382ca5bd055ab85048b211068ff3d43a47607f28)
2013-08-12 10:17:18 -04:00
Waseem Daher 41e88c89d8 kiosk: Try to suppress notifications.
(imported from commit dfb37bbf1e119ceeb719906c2623c6ea70e3112a)
2013-08-11 21:31:17 -04:00
Steve Howell e720737cb5 Tune fade/unfade bouncing from 150ms to 50ms.
This makes fade/unfade start sooner (good), but it might
re-introduce some typing sluggishness (bad).

(imported from commit 4e3112ed1ac931f2931182f91b60567ef2d72695)
2013-08-11 18:18:01 -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 8190cdc9fb Avoid redundant O(N) work in unfade_messages()..
The code in unfade_messages() is O(N) over the number of
messages, but a simple flag allows us to track the fact that
all messages are unfaded, so we can short circuit the O(N)
logic in many cases.

A typical scenario now would be that you start typing a
stream while the topic is still empty.  Modulo debouncing,
every keystroke now leads to a call to unfade_messages(),
but this change only does real work the first time.

(imported from commit da07cf408bbdbf5b381ff3ec33a5e05e34eef5b5)
2013-08-11 17:05:13 -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
Waseem Daher 0dcaf9ca3d Kiosk mode [unsafe].
"Kiosk mode" is a "read-only" Zulip suitable for embedding into
an iframe on another site. I say "read-only" in quotation marks,
because the account is still a fully-fledged active account on
the server, and we just tear out a bunch of stuff in Javascript
(that a malicious user could easily re-enable).

So in that sense, it's not actually safe in security-sensitive
environments -- malicious users logged in via kiosk mode
can do anything the kiosk-mode user can do.

(We need this functionality for the customer3 realm specifically;
 we'll possibly just tear this code back out once that experiment
 has run its course.)

(imported from commit deb035b4c702fcdb0e660ed549fe74c682abb6d9)
2013-08-11 15:57:21 -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
Scott Feeney 4aab49657d Fix minify-js failure to update app.js when templates changed
Also adds a clarifying comment.

(imported from commit ae05fa7063b7e77ab6d8942eab2a2191429b312f)
2013-08-09 23:31:44 -04:00