Commit Graph

945 Commits

Author SHA1 Message Date
Steve Howell c7bf349e70 Deprecate stream_list.add_narrow_filter().
We now call add_stream_to_sidebar() instead.  The old function was
only ever called for streams, so the newly named function is more
descriptive of what it does.

(imported from commit 7ae373279ea9987d3637cdbdc427680ac989fe86)
2014-01-17 16:37:45 -05:00
Steve Howell 56dc4e0b8e Add test_add_stream_to_sidebar().
This is a node test that verifies that
stream_list.add_stream_to_sidebar() creates the right
DOM when it renders the stream_sidebar_row template.
The test also makes sure that the DOM gets put in the
correct place to be retrieved by stream_list.get_stream_li()
calls.

(imported from commit ed4c0148da2261870e3db5a9b553913788b4eccd)
2014-01-17 16:37:43 -05:00
Jason Michalski 4c90392261 [schema] Add an per-user option to disable notification on new streams
Added a default_desktop_notifications boolean to userprofile with a UI
in Zulip Labs. This flag is used to default the notification flag on new
subscriptions.

(imported from commit a25223cc5ecf09980cf877991e25034bb3fd4046)
2014-01-16 20:13:34 -05:00
Tim Abbott 1edcbfb8b0 Fix tab bar for embedded topic narrows.
(imported from commit 4c63478b1899c22f3d0be5651e2eb82aecdaaa4a)
2014-01-16 18:18:21 -05:00
Tim Abbott bc22b1eb16 Add support for topic narrows in our embedded narrow widget.
(imported from commit d3ef2db8e0903e445d9ecc2c28d9f249a0042bd9)
2014-01-16 18:05:35 -05:00
Steve Howell 4d03fd984f [notify customer] Add 24hr support for Steve Pomeroy.
We hard coded his feature flag as a response to Z438.

(imported from commit f2637b5610bf69a0d79347586a788b3bb67b19de)
2014-01-16 15:04:54 -05:00
Steve Howell ec91ece6ed Remove "Create new stream" UI for restricted users.
If a user is not allowed to create new streams, then do not
show the "Create new stream" UI at the top of the settings page.

(imported from commit b97626938d8b612317c2189f7eca0d4bd27fc274)
2014-01-16 14:43:57 -05:00
Steve Howell 447c99aa66 Add UI for admins to add/remove admin power from other users.
(imported from commit b7e81316f1f1e3c7b7f7dd5dac5db8e70f1ee209)
2014-01-16 13:41:54 -05:00
Steve Howell 6d963c4a85 Always set data.method=PATCH in channel.patch()
(imported from commit 242503c1caa670fa219acbfe811a1b5e5d54f2b6)
2014-01-16 13:41:53 -05:00
Steve Howell 81de08f067 Improve selectors for user activate buttons on admin screens.
(imported from commit 094e81a1a337aeed7cfd39ce61daf6ac50e905cd)
2014-01-16 13:41:53 -05:00
Steve Howell 07b2eed389 Add README.zulip.md for handlebars.
(imported from commit a1e214d4bfbd1c0e6dc3918ad649c20e921399db)
2014-01-15 16:45:22 -05:00
Tim Abbott 6443aead67 Fix scrolling when unnarrowing after reading new messages.
Our logic for unnarrowing when messages were read during the narrow
did not properly use the then_scroll option and thus actually set the
scroll position when they selected a new message.  This was
accidentally prevented from being a big problem by the incorrect
scrolling logic that was fixed by:

    Only preserve_pre_narrowing_screen_position when preserving pointer.

which caused the browser to scroll _back_ to close to the correct
scroll position (but not the intended scroll position -- it would
usually be a little bit off).

(imported from commit d779de8f89590d242f62d32b22a297bdc096c594)
2014-01-15 16:07:20 -05:00
Zev Benjamin fa097a1201 Remove jquery.highlight
The one call we were making to it was actually unnecessary since highlighting is
no longer done client-side.

(imported from commit 7644a5961ca48cd57f4b65c6f698083677e0a130)
2014-01-15 16:07:20 -05:00
Steve Howell 3bd0bfd4fd Upgrade handlebars to 1.3.0.
This was "npm update handlebars" followed by copying
runtime.js into the static directory and restoring the
copyright header.

(imported from commit 69d30cbfcb3b776cdfdcffa17a87704540eab76a)
2014-01-15 16:07:20 -05:00
Tim Abbott 86f9ea0cd2 Move save_narrow earlier in narrow.deactivate.
I think that this will fix the issues we've been having with
hashchange.save_narrow() screwing up the scroll position in the page.

(imported from commit 25af9b7dda2d107220e11dd12b9dc344bc63addc)
2014-01-15 16:07:17 -05:00
Steve Howell 1887b59504 Have the ENTER key blur people searches.
This is important for hotkey users to be able to use other hotkeys.
Since ESC clears a search, we need ENTER to merely blur the search;
otherwise, hotkey users will need to mouse away from the search box
if they want to keep the search sticky.

(imported from commit 204704435c7821c1ad3b7b750ffe3545adaff9aa)
2014-01-15 16:05:52 -05:00
Steve Howell aae001fa8e Have ESC key clear people searches.
(imported from commit a3f4cf0416f4f2ea76660bf68790988edc5675e2)
2014-01-15 16:05:52 -05:00
Steve Howell 33494dc342 Reduce the width of the user search box.
(imported from commit 715175c51f292a89ad68fa780b94c332fdd1f436)
2014-01-15 16:05:52 -05:00
Steve Howell 85ff523965 Simplify filtering code in actually_update_users().
(imported from commit d11e56f5708bd3e5e52bc6452676a0fe2be17900)
2014-01-15 16:05:52 -05:00
Steve Howell 892b4b5db2 Remove user from his/her own buddy list.
(imported from commit 388a95b8f1b9c2a7622e1e083d3601c4015682e7)
2014-01-15 16:05:51 -05:00
Tim Abbott 7e301425fc Optimistically call restart_get_updates on Socket reconnect.
(imported from commit 0804969f964e65ed2d2e0a64d56d5f591d12e0ef)
2014-01-15 16:05:51 -05:00
Tim Abbott 43f6ce9624 Keep compose box open in embedded narrow views.
(imported from commit 0e5f44505a58ed77a5fee7b6b2024fce62e8b07b)
2014-01-14 12:09:14 -05:00
Jason Michalski 42d561546b Add integration documentation for Zendesk
(imported from commit fb719144cc4fce7c8a794da1abb747595e2c239c)
2014-01-14 12:01:54 -05:00
Steve Howell a05e24667e Fix split command for names.
(imported from commit bed07c3d527b602b43b94ac1c6e77cd65042d341)
2014-01-13 16:28:39 -05:00
Steve Howell cb6438234a Add search filter for user list.
Whatever text is entered into the search box under users is used
to filter users by their full names.  You can use commas to search
for multiple users. Search terms must be at the start of names, so
"st,fr" would match "Steve Howell" and "Leo Franchi" but not
"jesstess."  Names are case insensitive.

(imported from commit 822b72883928d3c941d38e9798774d71b0689f30)
2014-01-13 16:16:05 -05:00
Jessica McKellar 33bcd1977a Show the first person in the realm an invite banner if they are alone.
Previously we unconditionally showed the "get the desktop app"
banner. Now, if the first user declines to invite people as part of
their onboarding workflow, show the invite banner instead.

(imported from commit f7892fef17c923154a700149b8f5be99e9c03fa0)
2014-01-13 10:36:48 -05:00
Jessica McKellar 02d8f2f0f0 Unbreak sending invites from the first user.
The bug caused the wrong verb to be used, resulting in a 405.

(imported from commit f9ad42e4a09e3a0dbd98bf4faa9ba57325d733c5)
2014-01-13 10:36:48 -05:00
Jessica McKellar e9dc149340 Make custom-alert-bar-content customizable.
(imported from commit 9947b15596fc818fcf3106606d1e638073a415f8)
2014-01-13 10:36:48 -05:00
Steve Howell 760d3e78d9 Fix stream color updates for left borders of messages.
(imported from commit a830905bd84d77e4ba1bd0cd4a82c9af3ffb4f69)
2014-01-10 21:39:05 -05:00
Steve Howell 8ad66575cd Prefer humans to bots when autocompleting PM recipients.
We don't persist how many PMs you have exchanged with other users
across reloads, so immediately after a reload, our
pm_recipient_count heuristic for autocomplete isn't very useful.

This change makes it so that we prefer humans to bots when
pm_recipient_count is not yet a factor (i.e. both users may have the
same value of zero).

(imported from commit 5fd8c969631d3437df83dd6e5ff8f7316dc4ef51)
2014-01-10 21:39:05 -05:00
Waseem Daher fe748f7633 Make Twitter preview look like other inline image previews.
(imported from commit ca4ff9146679a5348bf53d06e992972e9a4b628a)
2014-01-10 21:39:04 -05:00
Steve Howell 4c3d22baf5 Upgrade handlebars from 1.0.9 to 1.0.11.
There were some notable bug fixes between those versions.  We are
still far behind the current version (1.3.0).

For the node stuff, I used npm update.

Then for static/third/handlebars/handlebars.runtime.js, I copied
the node version then added back the copyright.

(imported from commit 59bcd2c52540ff88bba2f90cced809cfcb8cd92b)
2014-01-10 21:39:04 -05:00
Steve Howell 2504baf783 Use compiled.js in dev environments.
Make our dev setup more similar to prod by using compiled.js,
instead of AJAX-ing templates on the fly and compiling them
with non-node code.  This will make our dev environment more
consistent with prod (to avoid surprising bugs), plus it should
be faster (fewer AJAX calls).

This change also means we don't have to keep two copies
of static/third/handlebars/handlebars.js around.

(imported from commit d8d584b9aa13adcdcce7e424033610d77d2df79b)
2014-01-10 21:39:04 -05:00
Steve Howell 813fc05b5b Do notifications after message edits.
If a message edit causes a message to become notifiable, we send
a notification to the user, but only if they haven't had any previous
notifications for this message.

(imported from commit cee854de2d42c31a7352a350f79490caf94b613c)
2014-01-10 21:39:03 -05:00
Steve Howell 117915edc5 Properly render mentions after message edits.
In update_messages() in zulip.js we now set the mentioned flag
on incoming messages, so that they render properly with the
salmon background.

(imported from commit 6df523edbcd567bf8e1fde144f65f35a00548c4f)
2014-01-10 21:39:03 -05:00
Steve Howell 997eb82f85 Properly highlight alert words after message edits.
After messages are updated, we process the message for alert
word highlighting, just like we do when new messages are
received.

(imported from commit 5538c0f875595df3ec1ac7c4bc45f0fe44c700cc)
2014-01-10 21:39:02 -05:00
Steve Howell 175aeef09a Simplify code by using message.alerted.
(imported from commit 10eaca36cd3d60ce3cdd36be62dff02217f0b6c6)
2014-01-10 21:39:02 -05:00
Jason Michalski 9e822403bb Linkify twitter media links
Image and video links in the twitter API are media and need to be
handed on separately. We also include a preview image if the media link
is a to a picture.

(imported from commit 2bd00d267e51b29ad0ba681195b2bfea9b991d8c)
2014-01-10 21:39:02 -05:00
Zev Benjamin 3eaf77d532 socket: Log the transport used client-side
(imported from commit 7d5c5b15a729e1a4a73b49280c8096248c4843a3)
2014-01-10 21:39:01 -05:00
Allen Rabinovich 4fb3b39077 Fix unread indicator animation
(imported from commit f650b045638a9bcdd95713784a2059a3f00c41a4)
2014-01-10 21:39:01 -05:00
Tim Abbott 2632b130a5 Only preserve_pre_narrowing_screen_position when preserving pointer.
(imported from commit a0e323796f62b2bacd205a441ef68ac160918cdd)
2014-01-10 21:39:01 -05:00
Leo Franchi 45d3bb4f04 Update our pivotal integration to handle v5 of their API
(imported from commit 2deba4ed2f72c7d7ccedafbb8fc4370b2faa5490)
2014-01-10 21:39:00 -05:00
Tim Abbott 7fa3bdba72 Convert /json/update_active_status to use channel.js.
(imported from commit 75c7a1c9701b4ff0db8e52c31126d778054b6c29)
2014-01-10 21:39:00 -05:00
Tim Abbott 7f174213ed Add an idempotent flag to the channel module.
(imported from commit d5b867d2a8f176cae76c8b68435c4fab318d998b)
2014-01-10 21:39:00 -05:00
Zev Benjamin 53b5a62b23 Enable sockets for everyone
(imported from commit 1b855f4479717d9f3ce7468695f1e127be0e5a14)
2014-01-10 21:39:00 -05:00
Jason Michalski 68335d9124 Remove hidden inputs from the tab order on the stream page
Inputs are given a tabindex of -1 in the handlebars templates, this is
added and removed in the show and hide events of the bootstrap collapse.

(imported from commit 2c54c39edc396d3d18330df4583d901690dd71fa)
2014-01-10 21:38:58 -05:00
Leo Franchi 651382b313 Keep track of people by full name for client-side usermentions
(imported from commit 6c88b53913ed7eca7d75ad0d2263d63e277ee65c)
2014-01-07 17:33:33 -05:00
Leo Franchi 685ab1a583 Add message_list.remove_and_rerender
(imported from commit 68da0ad74f797fae3257577bbf415fd1fe9488a6)
2014-01-07 17:33:33 -05:00
Leo Franchi 80e6dab78a Parse message IDs as floats
(imported from commit d9954e4225e95e2931be1d1fe5ecf0b93914b07e)
2014-01-07 17:33:33 -05:00
Leo Franchi f0e3afe0d3 Remove deduplicate message hack as trac #1062 is fixed
(imported from commit 521af28471af63b2063256585b27ac45ee2c4b7b)
2014-01-07 17:33:33 -05:00