Commit Graph

1571 Commits

Author SHA1 Message Date
Steve Howell
06816d19e6 topic lists: Call narrow.topic() in topic_list.js.
We no longer need stream_list.js to pass in the currently
active topic to us; we just call narrow.topic() for it.
2016-11-10 15:55:31 -08:00
Steve Howell
853126344e Add narrow.topic() helper method.
This has similar semantics to narrow.stream().
2016-11-10 15:55:31 -08:00
Steve Howell
e76422b946 Use narrow.stream() instead of stream_list.active_stream_name().
We no longer use active_stream_name(), which was mostly a
duplicate of narrow.stream().  For nonsensical queries like
"stream:foo stream:bar" the behavior may change slightly here.

We know that we don't handle non-sensical queries particularly
well, but at least if we always go through narrow.stream(),
the behavior will be consistent.

I did test this with some sensible compound narrows, like searching
for a keyword within a stream.
2016-11-10 15:55:31 -08:00
Steve Howell
16e37f8874 Limit compose at-mention typeaheads to realm users.
Fixes #2240
2016-11-09 19:20:58 -08:00
Steve Howell
5e51a93688 Change stream_data.remove_subscriber() to accept user ids. 2016-11-09 15:03:08 -08:00
Steve Howell
00068f3164 Extract stream_data.unsubscribe_myself(). 2016-11-09 15:03:08 -08:00
Steve Howell
537a3b8ca8 Change stream_data.add_subscriber() to accept user_ids.
We no longer require passing in an email to
stream_data.add_subscriber(), since we only track user ids
in stream_data.js.
2016-11-08 15:49:23 -08:00
Steve Howell
a03a7d4c95 peer_remove: Send user_id, not email, for unsubscribe events. 2016-11-08 15:36:29 -08:00
Mohsen Ibrahim
44c8e4c58c streamLinkHandler: render stream links correctly.
After adding the ability to add stream links to messages using
the following pattern '#**stream_name**' there was a problem
with rendering this using our markdown engine because '**' means
bold text so that would render just to bold text.
To solve this I had to add regular expression in marked.js to match
that pattern and when it matches I call handleStreamLinks in echo.js
which will correctly render it to HTML.

Fixes #2218.

[tweaked by tabbott to url-encode the stream name in the URL and
adding the missing "#" in the display].
2016-11-08 13:52:31 -08:00
Meena Rajan
30acb23314 bugdown: Add support for strikethrough in markdown processor.
[Tweaked to move tests to bugdown_data.json, add additional tests, and
add frontend processor support by tabbott]
2016-11-07 22:26:38 -08:00
umkay
f4c621ffe3 admin: Enable admins to toggle supported auth methods via UI.
Add a table to the administration page that will allow realm admins to
activate and deactivate the supported authentication methods for that
realm.
2016-11-06 16:29:35 -08:00
Steve Howell
06fe4bc943 Rename subject_box to pm-box/topic-box.
I'm not crazy about the names pm-box and topic-box, but they
are less confusing now.
2016-11-05 15:03:29 -07:00
Steve Howell
8b7e9101ca topic lists: Rename expanded_subjects -> topic-list. 2016-11-05 15:03:29 -07:00
Tim Abbott
ee361cbe30 js: Eliminate process_loaded_for_unread global. 2016-11-05 11:33:04 -07:00
Tim Abbott
d60ec24c1f js: Move set_user_statuses to activity.js initialization. 2016-11-05 11:33:04 -07:00
Tim Abbott
6daf2b1e46 js: Move pointer initialization code out of zulip.js. 2016-11-05 11:33:04 -07:00
Tim Abbott
d76f9b09a3 unread: Move consider_bankruptcy into unread module. 2016-11-05 11:33:04 -07:00
Brock Whittaker
4400665a6d subs: Move stream settings into an independent overlay.
This replaces the scrolling stream settings feature with a stream
settings overlay.
2016-11-04 17:13:26 -07:00
Tim Abbott
78ec0341c4 subs: Fix color picker issue with subscribing. 2016-11-04 17:13:26 -07:00
Tim Abbott
73f020645f subs: Remove unnecessary update_stream_color call.
The color was already being updated in the response from the server.
2016-11-04 16:37:29 -07:00
Tim Abbott
a70c5eb923 colorpicker: Migrate to use stream IDs to access things. 2016-11-04 16:37:29 -07:00
Tim Abbott
ab6fd87161 subs: Fix rename stream handling of email addresses. 2016-11-04 16:37:29 -07:00
Tim Abbott
e6734bfada subs: Cleanup stream rename logic. 2016-11-04 16:37:29 -07:00
Tim Abbott
ee976a9bdc subs: Use subscription_settings when changing descriptions. 2016-11-04 16:37:29 -07:00
Tim Abbott
45c7945818 subs: Use sub_settings in subscriber add/remove flow. 2016-11-04 16:37:29 -07:00
Tim Abbott
8e522cd933 subs: Convert stream_home_view_clicked to use sub_settings. 2016-11-04 16:37:29 -07:00
Tim Abbott
2467f765ad subs: Stop using sub_row when rendering settings. 2016-11-04 16:37:29 -07:00
Tim Abbott
16408da823 subs: Cleanup change_stream_privacy.
We now:
(1) Only look up streams by ID

(2) Correctly look up both the stream-row and subscriptions_row after
the success handler returns.
2016-11-04 16:37:29 -07:00
Tim Abbott
32a571445a subs: Use settings_for_sub when redrawing privacy stuff. 2016-11-04 16:37:29 -07:00
Tim Abbott
b67c0a4ad5 subs: Move settings_for_sub and button_for_sub earlier. 2016-11-04 16:37:28 -07:00
Tim Abbott
b1a5d57405 subs: Update get_subscriber_list to use subscription_setings. 2016-11-04 16:37:28 -07:00
Tim Abbott
109287dceb subs: Update descriptions in settings separately from stream rows. 2016-11-04 16:37:11 -07:00
Tim Abbott
7a59ae591a subs: Fix get_stream_name to use IDs from the DOM.
We haven't added a data-stream-name to the subscription_settings
object yet, and ideally we'd be moving away from using
data-stream-name anywhere.
2016-11-04 16:16:07 -07:00
Brock Whittaker
7d51b6a454 subs: Create get_stream_name to get stream name from UI.
This accepts an arbitrary click target in the DOM inside a stream row
or stream settings element and returns the stream name.
2016-11-04 13:53:12 -07:00
Steve Howell
2088e8420f User user_id, not email, in peer_add events. 2016-11-04 11:37:14 -07:00
Steve Howell
17e39a88ef Remove people.test_set_people_name_dict().
We use a cleaner approach to setting up test data in echo.js to
allow us to remove the one call to test_set_people_name_dict().
2016-11-04 11:37:14 -07:00
Steve Howell
8c47f7f7db Remove people.test_set_people_dict(). 2016-11-04 11:37:14 -07:00
Steve Howell
472f049cae Alphabetize subscription event cases in server_events.js.
I also split up peer_add and peer_remove into their own cases,
since they do opposite things and didn't share that much code
in common.
2016-11-04 11:37:14 -07:00
Steve Howell
38f2789152 Remove page_params.email_dict. 2016-11-04 11:37:14 -07:00
Steve Howell
3941334d00 Use user_ids for subscribers in stream_data.js.
We still shim a lot of methods to keep using emails, but the
internal data structure now has user_ids.
2016-11-04 11:37:12 -07:00
Steve Howell
7509f73f02 Clean up stream renaming in the JS code.
We now use stream_id as our key to rename streams, which
should prevent a few race conditions long term.  (We are
still possibly contending with other events that use
stream_name as a key, so this is not perfect.)
2016-11-04 11:30:18 -07:00
Steve Howell
e1372ddf5d Add people.get_user_id(). 2016-11-04 11:30:18 -07:00
Steve Howell
4ace9bbd77 Remove dead code related to subs.create_sub().
Since we started handling the stream/create event properly,
create_sub() became dead code.
2016-11-04 11:30:18 -07:00
Steve Howell
4cd39010d1 Add people.get_person_from_user_id().
This requires the introduction of people_by_user_id_dict
and changes to people.add() and people.remove().
2016-11-04 11:30:18 -07:00
Tim Abbott
368b585980 subs: Redesign the rows of the #subscriptions table. 2016-11-03 17:33:33 -07:00
Steve Howell
e4930d73c4 Add user_id for new users who we discover in new messages.
This change also creates a copy of the objects so that we
don't couple ourselves to the message store.
2016-11-03 16:20:45 -07:00
Steve Howell
30e01306d9 Eliminate people.reify() and mostly ignore unknown users.
If I try to send a message to an unknown user (which is possible
for some types of realms), then I simply ignore them during the
send codepath, so that I don't later need to patch up their attributes.
2016-11-03 16:20:45 -07:00
Steve Howell
15d44f8d71 Encapsulate pm_recipient_count.
We no longer store pm_recipient_count on person objects, but we
instead use a Dict to store them.  Then the new API is this:

    people.get_recipient_count()
    people.incr_recipient_count()
2016-11-03 16:20:45 -07:00
Steve Howell
9b04ec7472 Send dicts for cross realm users to JS.
We now send dictionaries for cross-realm bots.  This led to the
following changes:

* Create get_cross_realm_dicts() in actions.py.
* Rename the page_params field to cross_realm_bots.
* Fix some back end tests.
* Add cross_realm_dict to people.js.
* Call people.add for cross-realm bots (if they are not already part of the realm).
* Remove hack to add in feedback@zulip.com on the client side.
* Add people.is_cross_realm_email() and use it in compose.js.
* Remove util.string_in_list_case_insensitive().
2016-11-03 09:51:23 -07:00
Tim Abbott
ebe959f2b0 tutorial: Remove low-quality alert bar onboarding flow.
This alert bar thing was buggy and didn't look that good, so let's
just remove it.  We can always write a nicer thing advertising the
desktop app later.
2016-11-02 23:41:16 -07:00