Commit Graph

93 Commits

Author SHA1 Message Date
Zev Benjamin 34820bbc20 Cache feed bounds calculations
(imported from commit f5ca657d2addedcd7645bc9524f95d0e4d3b5460)
2013-08-06 16:15:47 -04:00
Zev Benjamin 1c4a608b40 Use CachedValue objects for viewport height and width
(imported from commit f61cca77651b5e9a66db6c2a9749fe7a1e958fac)
2013-08-06 16:15:47 -04:00
Zev Benjamin 3ce318e9a1 Add CachedValue class to encapsulate the pattern of caching mostly static values
(imported from commit 14048847e77974cda3a6214f129492d8d373080d)
2013-08-06 16:15:47 -04:00
Zev Benjamin 07301f9aaa Use the bottom of the tab bar underpadding instead of the navbar for determining visible messages
(imported from commit c7c2e8099fcc1ac03ae663c15beb6297805dadc0)
2013-08-06 15:21:56 -04:00
Steve Howell 3aa5930191 Streamline search suggestions when query has trailing space.
If you entered "stream:Denmark " in the search box, we would show
you two suggestions for "stream Denmark", despite our duplicate
detection, because we didn't canonicalize the suggestion that is
literally based off the user typed query, and so the other way
of generating the "stream Denmark" suggestion created a duplicate.

Now all the suggestions we generate are canonicalized, so the
generalized duplicate detection can work.

(imported from commit 52bf08ccf9bb2e2260ca8c20690169aead3732ab)
2013-08-06 14:04:29 -04:00
Steve Howell 349039289c Set module.exports in util.js.
(imported from commit 12b81a6f9b79fe3f024f53e3185d647971952df7)
2013-08-06 14:04:29 -04:00
Scott Feeney 29b3b42ac7 Temporarily remove "Share the love" from DOM & JS
(imported from commit fc7af47400f6c96161913dcc98be128c116d90c5)
2013-08-06 10:47:42 -04:00
Scott Feeney 950d271bc3 Fix wrong pointer position on narrow
This was introduced in a71867c2435790, intended to fix #1287.

Very subtle bug. The problem was that we were attaching a click handler
to two selectors, a link, and a div that the link is inside of.

Since the link was a descendant of the other selector, clicking the link
created TWO click events, and the second click on a stream box while
already narrowed to that stream jumped you to the end.

We should be careful of this in the future — never attach an event
handler to two selectors, one of which is contained in the other.

(imported from commit f428f593280e80c90b2665d1dfbff1df8a39bd35)
2013-08-05 18:37:29 -04:00
Steve Howell 0f42feb131 Turn on always-open-compose for all realms.
(imported from commit 0a7b35a4144e5645adbfd9b8fffb78573e676ad4)
2013-08-05 18:14:57 -04:00
Tim Abbott c5b3cad534 Add the near and id search operators back to autocomplete.
These were accidentally lost in
53d08b29367c0172e483064f213538d45098279e.

(imported from commit 11813fd43b5ecb2e15ed9f3276497837b9997bee)
2013-08-05 17:59:05 -04:00
Tim Abbott 6dd049fa26 Rename zephyr.js to zulip.js.
(imported from commit e62aa374f1bf2e75cebc00d0bba4e3ade82d19f6)
2013-08-05 17:59:04 -04:00
Steve Howell 01b40f3c98 Fix compose/topic regression (trac #1648).
When you are narrowed and hit "New stream message", the topic
will autofill.  This broke during the subject-to-topic
transition.

(imported from commit a9b471884c5cdae449e02ce7aa782add4a178077)
2013-08-05 17:58:45 -04:00
Waseem Daher bd0aa114c3 Randomize the sample email addresses in "share the love".
(imported from commit cccd5b8c47274167d052fe147d7d1da1e83c6562)
2013-08-05 17:14:51 -04:00
Waseem Daher c16651bf23 [schema] Add referral system
For now, we just get emails about referrals that we have to follow up
on manually.

I don't love using the name "referral" in some places and "invite" in
others, but we already use the verb "invite" to mean something else
and "invite" is a canonical noun.

(imported from commit 0814c18395952fcdef234c1584984f71ca1b6f37)
2013-08-05 17:14:51 -04:00
Jeff Arnold 386df6e58b Eliminate unnecessary calls to "function".
(imported from commit 8f6a90dde723c7f9e8a7929ce44e0f1fce869e81)
2013-08-05 16:59:49 -04:00
Steve Howell b3f60faf3f Restore centering when using the down arrow (or "j").
This restores the feature that hitting down when you are at the
last message automatically centers the last message.  This is not
a pure revert, because some additional code now goes through
navigate.down.

(imported from commit 2db1f247692ba068613a2d6c93f18ca7c13a16b8)
2013-08-05 16:10:01 -04:00
Steve Howell 1b1f80f3d7 Show "Home" less often as a search suggestion.
We now only suggest "Home" if you have an empty search box (suggestion #1),
or if you are typing "Home".  Before we'd show it as a way to get back
from various narrows.  This is trac #1596.

(imported from commit 9228bf45e9aaf9912d83efdf70338abb4b7e054f)
2013-08-05 15:56:12 -04:00
Scott Feeney 6feb77e7dc Fix oversized gravatars in in-app notifications
Bug was introduced by 9152e6e128e0ac38d97d893cb8243e3b9185351b, which
requests gravatars at 2x size (for retina displays).

They are now 25px, which is a little on the small side, but will do for
now. Properly centered.

(imported from commit 769b71101d62206cde1341b9b6b11fbb7925ae28)
2013-08-05 15:00:24 -04:00
Steve Howell f9614d76a2 Disable always_open_compose on staging
(imported from commit 787d4c15c3e0a9dabebae1651cd5a670f5549b4d)
2013-08-05 11:10:49 -04:00
Jeff Arnold f38ad493b0 Revert "Eliminate unnecessary calls to "function"."
This reverts commit 30afb6eb4b037991ed0569db63e71dcce53e4554.

(imported from commit 3eebe2181870f933171d6140467b3d7beb402106)
2013-08-05 11:02:55 -04:00
Jeff Arnold 88245c36b4 Eliminate unnecessary calls to "function".
(imported from commit 30afb6eb4b037991ed0569db63e71dcce53e4554)
2013-08-05 10:36:56 -04:00
Scott Feeney f4e9a16989 Correctly highlight Topics With Caps when narrowed
(imported from commit d3ec5b246c2e6624cf9ff5359f54f9127fbd8483)
2013-08-05 10:19:49 -04:00
Jessica McKellar 666ce4333e Don't let CUSTOMER4 users change their names through the web interface.
(imported from commit eafd4efa8a9614ffa3bdc7dd22088e091e1c54c3)
2013-08-04 22:03:10 -04:00
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 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 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
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
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
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
Scott Feeney 106c2d6a87 Remove unused Droid Sans CSS link from header
(imported from commit bf45482d34970447db3c21212cba81ad8d2ee51f)
2013-08-01 15:46:59 -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