Commit Graph

441 Commits

Author SHA1 Message Date
Zev Benjamin ac87d92138 Send messages using SockJS on staging
(imported from commit 812d20b1eab76eeb0d8fb92029fdb38d5faa9cce)
2013-10-22 18:45:11 -04:00
Zev Benjamin 89bcabbb65 Disallow XHR streaming when running the test suite
There seems to be some sort of bug involving PhantomJS and XHR
streaming messages.  When successive pages are loaded that use XHR
streaming, PhantomJS seems to think the second one never finishes
loading and therefore hangs.

(imported from commit db93b4cab816f1fdc3f3f543c9394b1cba8abedb)
2013-10-22 18:45:11 -04:00
Zev Benjamin 3c73468ba8 Disable unsupported SockJS transports
Because our authentication system reads cookies from the initial
connection attempt, several SockJS transports can't be used.

(imported from commit 34b9571225d39072985b8223fb12c43c7235841f)
2013-10-22 18:45:11 -04:00
Zev Benjamin ca16644152 Add client-side SockJS wrapper
The wrapper handles our RPC protocol, authentication scheme, and
reconnections.

(imported from commit 1fed2d160582c235a32de80a80b3e451c13a7b1c)
2013-10-22 18:45:11 -04:00
Steve Howell ac7eace8fb Remove subs.reload_subscriptions().
(imported from commit 72d831101033fb7db4b024781bf597f63345be79)
2013-10-22 15:51:19 -04:00
Steve Howell f34b2e4f75 Don't repopulate subscriptions on a stream rename.
We want to deprecate reload_subscriptions(), which was kind
of a big hammer to use when only a single stream is being
renamed.  Now we call stream_list.rename_stream() to update
the sidebar.

(imported from commit a77d09c0433d9b605b7baa7d7c61183bc8c37ba9)
2013-10-22 15:51:19 -04:00
Steve Howell b55a2bfc58 Avoid reloading subscribers when opening Streams page.
For a large domain like HS, we were pulling back about 100k of
text with subscriber emails when we opened the Streams page.
This was unnecessary, as the subscribers aren't shown until
you expand the stream, and there's already an AJAX call.

(imported from commit 69b83d769030d87318acefc364ac6ff3a2ec3605)
2013-10-22 15:51:18 -04:00
Steve Howell db398d5e41 Send ids, not emails, of subscribers when loading the page.
(imported from commit 26bbf38664d246476df7062432fa20add7d4cb11)
2013-10-22 15:51:18 -04:00
Zev Benjamin c665139012 blueslip: Send the log back to the server when reporting errors
(imported from commit 013057a8ddc2ddb73b03b0de5c139052b22f5319)
2013-10-22 15:39:17 -04:00
Zev Benjamin 3276f8a4d0 blueslip: Record calls to log, info, warn, and error methods in an in-memory log
(imported from commit 556a92725c492de558269c0760a96783e2a3fc18)
2013-10-22 15:39:17 -04:00
Zev Benjamin 1c841e4454 blueslip: Refactor log, info, warn, and error methods
(imported from commit 4b1eb94a7de0c2b25bde19c3c3a88a13ecb4d1c0)
2013-10-22 15:39:17 -04:00
Kevin Mehall d92939d53e [important] Fix regression in 9259a24
Use the new count_full_messages_between instead of subtraction in
message_list_view.append. By finding a count higher than it should be
when summarized messages are present, it didn't add new messages until
the pointer moved under certain conditions.

(imported from commit c10d9c1a0d23891acce88bf8d79866c08cb75681)
2013-10-21 16:01:18 -04:00
Kevin Mehall bd58861b09 Ignore summarized messages when calculating rendering windows.
Summary blocks can contain hundreds of messages. When the rendering window
code didn't take this into account, it would lead to all kinds of
unpleasant behavior when you scroll.

Trac #1888

Unfortunately, this replaces a subtraction with a function that iterates
through all the messages.

(imported from commit 9259a246946cd968a8725c38ff5ef2d4b4793717)
2013-10-21 11:48:57 -04:00
Kevin Mehall ba87ebc246 Fix duplicated summary blocks when scrolling up.
Make prepend re-render the whole render window instead of just the added
messages.

(imported from commit 6270a33ff0fe98fc901b687ca533ef0ea127d052)
2013-10-21 11:48:56 -04:00
Kevin Mehall a528b7134c Move summary_adjective to its own method
(imported from commit d451ffcf3ff460ffe030e265ca83fec1094c6217)
2013-10-21 11:48:56 -04:00
Kevin Mehall 463b10cf0e Enable summarization only for the right narrows.
* Disable for search-like narrows (whitelist stream and home instead of
    blacklisting topics and PMs)
  * Use home view summarization flag for All Messages

(imported from commit 48bd10ae5da7c7564c2efe86a40078f1a7e96e20)
2013-10-21 11:48:56 -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
Jessica McKellar 06566b3776 Don't receive notifications for messages on muted topics.
This doesn't address the more complicated case of someone @-mentioning
you on a muted topic, which consensus is you do want to get
information for, but we need to develop some infrastructure to present
that case to users clearly.

(imported from commit a4bc1e89c108fa8ba6eccc0a198eabf2231326ab)
2013-10-18 14:38:31 -04:00
Jessica McKellar efda426b86 notifications: split message_is_notifiable into multiple ifs for clarity.
(imported from commit 33d1e2135a87192cc4d964db534b31ae9335595a)
2013-10-18 14:38:31 -04:00
Jessica McKellar a9c7f3a387 [manual] Use the name instead of the domain for the user-visible realm identifier.
Do not push this commit to prod until the historical realm names have
been populated.

(imported from commit a58191d181d2fb2b8b5e9793ea57707b36812cfc)
2013-10-17 13:47:51 -04:00
Steve Howell 4a0315fbfd Organize feature flags code a bit better.
(imported from commit a9b1405db99e54de8bed996b32215ca736f2dd56)
2013-10-15 09:57:20 -04:00
Steve Howell 36690ee6f6 Remove transitional feature_flags.muting flag.
(imported from commit 98a6cc4f340489b7817084e5ca5dcbcb75021813)
2013-10-15 09:57:19 -04:00
Steve Howell b98e7f8d90 Remove transitional feature_flags.alert_words flag.
(imported from commit f00eba8a12054e9771105e341e2652a53271e298)
2013-10-15 09:57:19 -04:00
Steve Howell d5f14e3bb7 Turn on propagate_topic_edits for everybody.
(imported from commit 936d2417120af5e9798638e0575724d45b9a207f)
2013-10-15 09:57:19 -04:00
Steve Howell 0ad4554723 Allow customer12.invalid users to narrow to a single message.
Add the option "Narrow to just this message" to the chevron
menu.  This has two use cases:

    * It's an easy way to get a sharable URL for the message.
    * It reduces distractions.

For now it is feature flagged to just customer12.invalid and staging.
See #1880.

(imported from commit 897d247176f9024ff825ccd3b338236569eed5ab)
2013-10-11 15:52:10 -04:00
Steve Howell 78e4fe6594 Support command-click for stream/topic links.
Allow users to open Zulip windows in new tabs with command-click
from the left sidebar narrowing links and recipient bar
narrowing links.

(imported from commit d60c038c7bf1efccd461f5284d513b9cbfbdaebf)
2013-10-11 11:58:51 -04:00
Leo Franchi 1db703595e Enable topic propagation for CUSTOMER9
(imported from commit 646a765fad0c5b285b11daabb92a5c0f47c83fed)
2013-10-10 16:30:37 -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
Steve Howell 7007cf203d Move compose.cancel() calls out of click handlers.
Handle closing the compose box inside of narrow.js, to
ensure consistent behavior for all the narrowing UI options.

(imported from commit f17a687491eb2361c73032cd974cedb2a0a2dd85)
2013-10-10 11:20:49 -04:00
Leo Franchi 6e188fb067 Tweak alert_word matches and add some more tests
(imported from commit 63dc4064c15d5d33a7ec0c992b183bf323dd4ee8)
2013-10-10 10:58:21 -04:00
Steve Howell a78a1ec36c Use <a> tags for links in the recipient/summary bars.
The main user-facing feature here is that users can open narrows
in new tabs or windows. Internally, it makes the HTML more semantic.

One consequence of making these elements into actual anchor tags
is that clicking on them no longer triggers this logic to
close the compose box when you click outside of it:

        // Unfocus our compose area if we click out of it. Don't let exits out
        // of modals or selecting text (for copy+paste) trigger cancelling.
        if (compose.composing() && !$(e.target).is("a") &&
            ($(e.target).closest(".modal").length === 0) &&
            window.getSelection().toString() === "") {
            compose.cancel();
        }

Instead of patching the above code, I elected to just call
compose.cancel() explicitly in the click handlers for the links
themselves.

We are gonna try to clean up the compose-box behavior globally soon.

(imported from commit c9a01916f1714fe3dd495d25c78cd5e5532105ef)
2013-10-09 17:09:10 -04:00
Kevin Mehall e29855e106 Show floating recipient bar on faded messages.
Trac #1837

(imported from commit 1f90b02a5a07b5ce106ad935a4b1cf18e47a0909)
2013-10-09 16:33:24 -04:00
Luke Faraone 1975a6f693 Cancel a compose if you click on one of the global filters
See trac ticket #1840.

(imported from commit 3e0a781252db575e5c0abb70565919e4cdaa963f)
2013-10-09 15:37:00 -04:00
Allen Rabinovich fe9cc4597f Make settings menu more apparent
(imported from commit 15e5db5c4792d39b54fa5a354f1156cde355160b)
2013-10-09 08:42:54 -07:00
Leo Franchi 51e0bea608 Autocomplete emails in sender: completion
(imported from commit 44dc337842d46349b103cf9631faa7d439be682c)
2013-10-07 14:55:58 -04:00
Leo Franchi 33dacae82d Split calculating of prefix from narrow operators into function
(imported from commit 940d7d7290e0357aad300ea00b6fcc59cd56cae1)
2013-10-07 14:54:05 -04:00
Steve Howell 265a3e2339 Turn on alert words for everyone.
(imported from commit d4281a3a23e6df97e0c621fdc757ec0b75db1de2)
2013-10-05 15:50:05 -04:00
Kevin Mehall 40ad01371f Don't close the compose box on right click in Firefox.
Trac #1737

Firefox has the slightly broken behavior that it emits a click event on
the document when you right click, but not on any of the child nodes, so
our #compose stopPropagation doesn't stop right-click events from closing
compose. Chrome never emits click events on right click.

(imported from commit 2519c542715c93877b6d38e5dcff1f3e011688e4)
2013-10-04 14:38:05 -04:00
Leo Franchi 8c081bceb2 Enable alert words for pixleeteam.com
(imported from commit 622d9497f6c7e0434601291a7343c663e2567865)
2013-10-04 14:23:12 -04:00
Leo Franchi 101a70a7ce Fix selector for gravatar url polling
(imported from commit e0f915a9e5894e3749ca90bab674f36ee9c15347)
2013-10-04 12:10:22 -04:00
Waseem Daher a9a50ac470 Enable muting for everyone.
(imported from commit d107df94561c4ccb46a79ae09663239c4fb52061)
2013-10-04 01:37:47 -04:00
Steve Howell 5ae5f6578c Turn on muting for CUSTOMER4
(imported from commit 2f02edeacc2ae49a88dfc16f0f92fe6f5dfd9524)
2013-10-03 17:09:31 -04:00
Leo Franchi 0d6ad56c29 Decode operand in filter.js in operator-aware way
When decoding an operand, a + can be converted to a space
only if the operand is not an email address.

(imported from commit 08fc36a579bbe6409137c60c0fa9579fe3ab2c43)
2013-10-02 12:11:15 -04:00
Steve Howell d437f6602f Add muted_topic style to the topics stylebar.
If you mute a topic, it will show with opacity 0.25.

(imported from commit 72517550cc9f1daa779b3aac6cacd39831d5aa20)
2013-09-30 16:52:19 -04:00
Steve Howell 45434d3f89 Fix bug with muting topics that are all integers.
It's a bit of a contrived use case, but you could make a topic
called "12345" and then mute it from the sidebar, and it would
crash inside Dict.  We now call attr(), not data(), to avoid
string-to-integer conversions.

(imported from commit 89666f40d624df154d41077546e1c13a23ee7e67)
2013-09-30 16:52:19 -04:00
Steve Howell d94d2d71c5 Always show narrowed topic in the topic sidebar.
Before this change, you could narrow to an old topic, and it would
not show up in the sidebar unless it had unread messages.

(imported from commit f177a7378dac064e46a6417357cc86ada4475936)
2013-09-30 16:52:19 -04:00
Steve Howell fcb6a9b572 Use "topic_name" var/field in rebuild_recent_subjects().
This is part of nibbling away at deprecating "subject."

(imported from commit fbd26b5f1386a174de76e04298a68b3a7b18606e)
2013-09-30 16:52:18 -04:00
Steve Howell 10145c0e83 Simplified setting active topic.
The old code was looping through recent_subjects to find the
original subject name, but we already have logic in get_subject_filter_li()
to be case-insensitive.  I tried this with various casings of topics,
narrowing to topics, as well as narrowing to a stream (so no active topic)
and narrowing to an old topic.

(imported from commit 1decde13477cb742fd4bc82798f1afb282182bdf)
2013-09-30 16:52:18 -04:00
Steve Howell 6b8013c631 Don't mutate global recent_subjects when creating subject sidebar.
Create our own objects for handlebars, so that we can add transient
flags like is_zero without worrying about side effects to other
code.

(imported from commit b351a369cb3f36233e108e270c7abdd4ab8c5860)
2013-09-30 16:52:18 -04:00