Commit Graph

5862 Commits

Author SHA1 Message Date
Jeff Arnold 336324dac1 Make tab code handle the case that >1 msgs are being edited
(imported from commit b385c0d67ed1fe6363cdff0c39eb395399f04667)
2013-08-02 18:37:56 -04:00
Jeff Arnold afb5105ee4 Make Ctrl/cmd-enter save message editing.
Partially addresses Trac #1541.

(imported from commit 184a7b5cfd9f82da0e2b148ec891d69f7e50d6a3)
2013-08-02 18:37:56 -04:00
Jeff Arnold c03947a68f Make `Esc` abort message editing.
Partially addresses Trac #1541

(imported from commit afc5e4fd8b61a6cdd2aabfaf440be616f45b96a5)
2013-08-02 18:37:56 -04:00
Steve Howell 770bc5c96a Fix pointer motion at top/bottom of viewport.
We always intended to move the pointer up when you were at the
top of the viewport and scrolling up, and we always intended to
move the pointer down when you were at the bottom of the viewport
and scrolling down.  We didn't intend to move the pointer up
when you were at the bottom, or vice versa.  This commit fixes
that bug, simplifies the code, and inlines the code into ui.js.

(imported from commit 77e2ace9d2fc1025e1349e3be13c76c3a397fd38)
2013-08-02 18:18:04 -04:00
Steve Howell 4ad78ade68 Don't widen bottom whitespace on down-arrow.
We had a feature that if you hit the down arrow key when you
were at the last message, it would recenter you.  Waseem has bought
into temporarily removing this feature.  Justifications:

  1) We can always put it back.
  2) Autoscrolling makes it less relevant.
  3) The feature complicated the code a bit.
  4) The feature worked different for End than down arrow, due to
     a FIXME.
  5) It might have been a misfeature for users that want more
     control over their own scrolling.
  6) You can achieve the same essential effect by using PgDn
     or space.

(imported from commit fa6874bb5d29d7057bb1601f0b6d577bac1272c7)
2013-08-02 18:18:04 -04:00
Waseem Daher 5dcd66b507 More nicely align emoji with text.
(imported from commit 4c93296036476254b34afca576728618e7d4df9b)
2013-08-02 17:59:11 -04:00
Waseem Daher 3142d74d39 Typo fix.
(imported from commit 7758caddb61170cd5dcf069154307910de688f86)
2013-08-02 17:59:11 -04:00
Jeff Arnold e04eae82ce In the left sidebar, make the entire row clickable.
Addresses Trac #1287.

(imported from commit a71867c2435790ce8548fa0b27604b5b1844d624)
2013-08-02 17:44:44 -04:00
Scott Feeney c96a51ce99 Use green hover color on right sidebar, like left
(imported from commit 4b34dd0183aed54fbb7aeb3e264e962310202958)
2013-08-02 17:36:20 -04:00
Steve Howell 5590eb21c0 Removed match_on_visible_text() in search.js.
It appears to have been unused for a while.

(imported from commit 04a0de9f60484da660a557ad2b9953c00b91c608)
2013-08-02 17:28:04 -04:00
Steve Howell a1531b4247 Remove dead vars in search.js
(imported from commit 7fb2fa835332bb909edf173b5f487be9bb592ff3)
2013-08-02 17:28:03 -04:00
Steve Howell b291037f5d (tests) Remove jQuery stubs in search_suggestion.js.
(imported from commit a9b9bb86ed6aee96443cbfef5171f93dc9a0fa51)
2013-08-02 17:28:03 -04:00
Steve Howell 3726b86a94 (tests) Rename search.js -> search_suggestion.js
This follows up on extracting code to js/search_suggestion.js, and all
the search tests apply to the new module.

(imported from commit dec6c8614c25b4f82da57edeaddc7cfef28260a5)
2013-08-02 17:28:03 -04:00
Steve Howell b33858dd70 Created search_suggestion.js.
Moved 400+ lines out of search.js into search_suggestion.js.  This
leaves search.js primarily responsible for lots of little DOM
interactions, whereas search_suggestion is more about data.

(imported from commit 53d08b29367c0172e483064f213538d45098279e)
2013-08-02 17:28:03 -04:00
Steve Howell c6aeeafe1d Added test coverage for search suggestion descriptions.
(imported from commit 1693ad7343106deab0c8f2838088d27b407e39eb)
2013-08-02 17:28:03 -04:00
Steve Howell 95102dc1bd Refactor search_suggestions.js.
1. Change code comment in search.get_suggestion.

2. Remove side effects from search.get_suggestions.

The function get_suggestions() was updating a module-scoped variable
called search_object, but now it returns a dictionary to its caller.

3. Greatly reduce the scope of the search_object var in search.js.

I also clarified the comment around it a bit. We could squeeze
the scope of search_object even further by using a function wrapper, but
this is a big enough win for now.

(imported from commit 4b633dd30ab45d24b85ea1d10df27df5aaa0c959)
2013-08-02 17:28:03 -04:00
Steve Howell cd57a7d433 Simplify search.narrow_or_search_for_term.
For legacy reasons this function used to have convert item to
search_string via the search_object hash, because we used to
have an overly convoluted data model.  The mid-July-2013
refactoring on search.js made the data model simple, and this
little bit of cleanup follows up on that.

(imported from commit aeea629862e4307897f24eaa5fc364f2b12a7c52)
2013-08-02 17:28:03 -04:00
Waseem Daher 859e86e53a Remove unused user status images.
(imported from commit 4557a28fb22427f4a71c1c91820db5a47de5a601)
2013-08-02 17:17:54 -04:00
Waseem Daher 82d6b8445b Replace presence images with CSS.
(imported from commit c1b5633fc9c29dfd54fe12bd874d996745aab6dd)
2013-08-02 17:17:53 -04:00
Waseem Daher 1e47be9b25 Tighten up the text on /integrations and /api.
We really bury the lede with all of this "how to make a bot"
stuff above the fold.

(imported from commit 61d17d6f580ca6a707073672d4a88101967e4d3d)
2013-08-02 16:39:21 -04:00
Scott Feeney c3fc279423 Remove extra space in presence descriptions
(imported from commit 46d47cc71a72aad4f8c7447451982cfeb10cc54e)
2013-08-02 16:26:46 -04:00
Waseem Daher 0bb304a516 Request Gravatars at 2x the size we need.
This is a bit wasteful on most systems, but will result in their
looking pretty sharp on Retina displays.

(I also go and actually fix up the size we request for a bunch of
these so that they actually match the size of the gravatar in the
document -- previously we were requesting a size 30 gravatar when we
were displaying it in a size 25 space, which leads to unnecessary
ugliness upon resize.)

(imported from commit 9152e6e128e0ac38d97d893cb8243e3b9185351b)
2013-08-02 15:58:55 -04:00
Waseem Daher e56c166521 End the tyranny by importing all of the Font Awesome icons.
Gone are the days of having to laboriously look up the Unicode
for each icon when you need it!

(imported from commit 35ce9c2626ac1ff0b5f4e7d6679129e8d533033e)
2013-08-02 15:33:08 -04:00
Waseem Daher ead73f37f9 Remove Glyphicons completely.
Trying to use them will now break, which should discourage us from
using them.

(imported from commit 22fda1abc3370394e9b00f2deb01f1929b57ff18)
2013-08-02 15:19:11 -04:00
Waseem Daher d7da9d8bad Switch to using Font Awesome everywhere.
(imported from commit 406ac9e8e24066e45833a71adcdd95b26b5cfb9b)
2013-08-02 14:49:28 -04:00
Scott Feeney 5971dce594 Use bare domain for API binding link
The link is broken on www.

The reason it links to www is a holdover from issue #1400 six weeks ago.
At the time, https://humbughq.com used TLS SNI and downloading via wget
gave a certificate error, so we changed it to www as a workaround.
However, https://zulip.com does not use SNI so it's safe to revert this
workaround.

(imported from commit c87a6eb3ceab92c377edb976216be615625fafce)
2013-08-02 13:02:50 -04:00
Steve Howell 6b9b33f769 Use PATCH again for patching bots.
This reverts a prior commit, but the earlier commit is fine
functionally; the earlier commit was a temporary measure.

Revert "Use POST, not PATCH, for patching bots."

This reverts commit c3146b23d5d7d134c2b80507eb87033ca375a4db.

(imported from commit ebfcb2bae72c11767f9750412440d40b7a2a4995)
2013-08-02 11:46:11 -04:00
Steve Howell 2b28cf9a0a Support request.FILES in process_as_post.
(imported from commit 646019b5efe4ae3f6f66f99f76f2036d9fd9ec8e)
2013-08-02 11:46:11 -04:00
Kevin Mehall a02fe71788 Make the "Get our app" onboarding popover less obnoxious.
* Only pop up on mouseover if you haven't completed the step previously,
    and only on the first mouseover.
  * Dismiss the popover if you click anywhere but the link

Trac #1471

(imported from commit 08904be59c15526f88a2633ebd6f2a046ec62197)
2013-08-02 10:24:28 -04:00
Scott Feeney 31bee946be Don't autocomplete @-mentions mid-word
Now the @ has to follow a space, newline or certain punctuation, or be
at the beginning of the message. This addresses the frequent complaint
that typing an email address e.g. scott@zulip.com is hard, because after
the @, it would try to autocomplete.

(imported from commit 043953be3928b0acf2a4ab2b4dd1a80e1a1aa882)
2013-08-01 18:42:39 -04:00
Steve Howell 2442edee9e Add the "static" directory to NODE_PATH for unit tests.
I added our "static" directory to NODE_PATH for our JS unit tests.
This eliminates most of the verbosity in our require statements, but
it still requires us to explicitly call out "js" or "third"
subdirectories, which should make it a bit easier for folks reading
the tests to distinguish modules from js, third, or node itself.

(imported from commit b77a5283135d388d46f4b7e511acc59986f1a8ba)
2013-08-01 17:58:25 -04:00
Steve Howell 44e59dfaea Quiet Tornado's polling instrumentation in dev.
In dev, only show the message "Tornado X% busy over the past Y seconds"
if we've been more than 20% busy.

(imported from commit 2775e6151ccf03ba0cb2a1f96e4f4839774a870f)
2013-08-01 17:18:07 -04:00
Scott Feeney 106c2d6a87 Remove unused Droid Sans CSS link from header
(imported from commit bf45482d34970447db3c21212cba81ad8d2ee51f)
2013-08-01 15:46:59 -04:00
Tim Abbott b317f0899b Add a management command to render all old messages.
I'd like to minimize the probability that we'll actually run the code
in the "messages not rendered yet in database" codepath since it might
perform poorly, and it seems like the best way to do that is to just
run a loop that renders them all.

(imported from commit 247cb85fffa6cbc95958b9feda97462792a542c2)
2013-08-01 14:41:25 -04:00
Tim Abbott 70a7e90646 zephyr_mirror: Disable most markdown patterns for mirrored messages.
(imported from commit 09bfa2583ec037b78bcb12c44ca78d213ba5d102)
2013-08-01 14:10:28 -04:00
Tim Abbott 802b3dc3b2 Add API endpoint to render some message content without sending a message.
(imported from commit e1604b3bf4fc65e958db22f280eba1b5d2ba1e90)
2013-08-01 14:01:58 -04:00
Tim Abbott 365db42a6e Return a proper JSON error on HTTP authorization errors.
(imported from commit da0249b4e8585d8adbd9c769e3ba85dc4b9d28de)
2013-08-01 14:01:58 -04:00
Tim Abbott 9c60ecb479 Escape @ when mirroring content back to Zephyr.
(imported from commit 0ab58b5e8a30c66fb6aeaccaebbe498092de1cd5)
2013-08-01 14:01:58 -04:00
Waseem Daher 0663c7243c Enable always-open-compose for MIT, CUSTOMER4, Zulip.
(imported from commit 43602ebeed5396de038c59240a9d695ec411db89)
2013-08-01 13:00:15 -04:00
Waseem Daher 86cf40c8a9 Move feature_flags into its own file.
(imported from commit b775f85a24422d236b0079810b98b6b984cb60a2)
2013-08-01 13:00:15 -04:00
Tim Abbott f792adfa6a Disallow single-statement if statements without a brace.
(imported from commit e52f90a0f3e7340a764d391b1f38f1820e953ae7)
2013-08-01 11:47:54 -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 112d37de86 Fade message dots faster when marked read by cursor.
(imported from commit a31b0601bf13bce377c24fff96a818023d5bdd1f)
2013-08-01 11:26:55 -04:00
Kevin Mehall 0cbee97ffd Change mark-as-read behavior.
Mark messages as read when with the pointer, but mark all messages
read if the last message is visible.

(imported from commit 4c1a928bd6966111f0f34c5207723656b5f193b9)
2013-08-01 11:26:55 -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
Zev Benjamin 39a44cc661 Fix migration 36
It was not regenerated after being rebased.

(imported from commit b4555b05813201943f5991552dd4a0d53f7ae005)
2013-08-01 11:26:33 -04:00
Steve Howell 0ed73df475 Rename some functions related to bot avatars.
(imported from commit 6f88ee71dda263bfe7b5c15baed02aaf00d35f15)
2013-08-01 11:05:40 -04:00
Steve Howell f7ca0117e6 Allow users to upload new avatars for their bots.
(imported from commit 9d7895a658740815f454c8bba400d7cff821b7f9)
2013-08-01 11:05:40 -04:00
Steve Howell d0060f24ed Add close() method to avatar objects.
The close() method will let you release handlers, as well as
doing everything clear() does.

(imported from commit 3a67c3f2226918cee10cf43598e0408fb186408a)
2013-08-01 11:05:40 -04:00
Steve Howell d505d494c8 avatar.set_up_file_input returns object now
The set_up_file_input() function now returns an object to the user
with a clear field.  This object will grow soon.

(imported from commit 7b3761eafddb392bd2c84a1685aa8d1811028a0f)
2013-08-01 11:05:39 -04:00