Commit Graph

6163 Commits

Author SHA1 Message Date
Steve Howell 5dda9a5816 Test is_subscribed=false path of unread.get_counts
(imported from commit 7fb6531fb6d2d475bf43de6267fd018cc7347d7a)
2013-08-26 11:21:30 -04:00
Steve Howell 1821005dfe Restore subject counts for Uppercase streams
(imported from commit ef0e78d39c56da67544441a73ea257f215fefd94)
2013-08-26 11:21:29 -04:00
Steve Howell ffa9cfd492 Test that unread.process_loaded_messages ignores read messages.
(imported from commit 262f20933551e786022de564f46c75f901d8123f)
2013-08-26 11:21:29 -04:00
Steve Howell 582eef8305 Add test_message_unread()
(imported from commit 7f26cafb90757a9c490a148b6dd7b4f4f0fb5f95)
2013-08-26 11:21:29 -04:00
Steve Howell 09241ae2de Use Dict more in unread.js.
The setdefault() and num_items() methods are handy, and it was a
little tough to keep track of which objects were Dicts vs. {}.

(imported from commit 6ca81ac411943c59bef6d6bae39c7641feb5574b)
2013-08-26 11:21:29 -04:00
Steve Howell 06065d50bf Add dict.num_items()
(imported from commit 209a01b61d18d4b65b54e473cf727065aada68e8)
2013-08-26 11:21:29 -04:00
Jeff Arnold e97f07605a Push message summarization (and its unread model) to MIT
(imported from commit 42ba7c56af5ea9f9281cb8b4a5ddc491b8446a22)
2013-08-26 11:17:24 -04:00
Jeff Arnold 147362f87d Make the gravatar etc in the upper left change the mouse cursor.
(imported from commit e1e1c4ef8e13182ff1212cc5182ca0d8e9f71105)
2013-08-24 00:05:57 -04:00
Kevin Mehall 7f1a1dba9d Show realm emoji in typeahead and update the list via events.
(imported from commit bd8b8be5d088d503cac2b72cf228e769827e2308)
2013-08-23 21:39:29 -04:00
Kevin Mehall e2a13637f2 Management command for realm emoji
(imported from commit 4de3ac69c34bc6e92d180c672fa8276338fecf53)
2013-08-23 21:39:29 -04:00
Kevin Mehall d8146141a9 Render realm emoji.
(imported from commit 5a8dca8963bc6e2e16762844aebaefcb85a6aad2)
2013-08-23 21:39:29 -04:00
Kevin Mehall 32aa0bb72d [migration] Add RealmEmoji model for realm-specific emoji.
(imported from commit d0a08b748f458c0ab68985b4cf00c78950ab40c4)
2013-08-23 21:39:29 -04:00
Steve Howell 63fa194139 Turn off the "muted" topic special case
(imported from commit ea34ea060eb29864c4816d0f14ee106dcb10be9d)
2013-08-23 18:33:48 -04:00
Steve Howell 4dbea88aeb Fix click handler and re-enable collapsing experiment.
The click handler for collapsing was too broad, and it overrode
the ability to click to narrow from the recipient bar.

(imported from commit feeaa9becf8e400e319e1a77e5b72a33bb22854c)
2013-08-23 17:54:28 -04:00
Allen Rabinovich 5e38463800 Add retractable left sidebar.
Specifically:
   * Add and style the sidebar toggle button to the header and remove the
     gravatar.
   * Add the logic for retracting the left side bar.
   * Modify the logic for clicking on the referral pane to prevent it from
     closing the sidebar.
   * Modify the logic for clicking on the stream filters to prevent them
     from closing the sidebar.
   * Modify the logic for clicking on the stream settings dropdown and the
     user info dropdown to prevent them from closing the sidebars.

(imported from commit 73e00eb834a6e87cb8d659fdcf6c2e06fff3731d)
2013-08-23 14:16:51 -07:00
Steve Howell 47b1e8adfd Turn off collapsing for now
(imported from commit df25818d70feb1b9fd2463ff4643efa049ff5574)
2013-08-23 16:16:04 -04:00
Steve Howell 0721ea2aca summary_verb -> summary_adjective
(imported from commit c2980ed2e8d644a3b0eebba53365f61977a4f944)
2013-08-23 16:03:23 -04:00
Steve Howell 19df002252 Remove collapse icon from floating recipient bar
(imported from commit f76d74f703dd7248601f729e192003ba24cfc699)
2013-08-23 15:57:31 -04:00
Steve Howell 4a7bab9a6f Allow collapsing of recipient sections.
This is experimental, for staging only.  There might be a better
way to model this than dueling force_expand/force_collapse flags,
but it works for now.  The code in collapse_recipient_group()
could also be DRYed up relative to expand_summary_row().

(imported from commit 107151d1ecd640970fb7700d41278a003bd1abaa)
2013-08-23 15:57:31 -04:00
Steve Howell 9662594bf4 Add data-messages attribute to recipient rows.
This is to set up collapsing, but I think they could be useful
in general, so I'm keeping this is a separate commit.

(imported from commit 0da2b8ef246649f678c7cb6664ee78bf36aca076)
2013-08-23 15:57:31 -04:00
Steve Howell a0b28a03e4 Extract finish_group() helper in MessageListView.render()
(imported from commit db13ca858631d10a310aba3bd2540a545fd5b871)
2013-08-23 15:57:30 -04:00
Steve Howell 579444eee2 Enable "enter" key for muted summary rows.
(The approach has been simplified to look for summary_row in
the DOM, which makes muted and summary features work off the
same code.)

(imported from commit 4fa3d6ae5ad7bbac5958e60ecffb368d6ef29d2e)
2013-08-23 15:52:08 -04:00
Zev Benjamin 2b1a99f985 Tweak Github test data to not cause the Github payload capture to error out
I believe the test data to be incorrect, but we'll find out when
we've captured some real data.

(imported from commit ae32af0436b6273d0b2a60b2c55047aace6adcad)
2013-08-23 15:44:19 -04:00
Steve Howell b3ebb13469 Remove some ".d" suffixes in predicate tests.
I was saying bar.d in places where I wasn't really specifically
testing the .d feature, and it was distracting and just an
unintentional consequence of copy/paste.

(imported from commit 7b137b28cb33c72b83f02fe1d2961c5c6accc263)
2013-08-23 14:10:03 -04:00
Scott Feeney d0be30ab08 Format edit times properly
The "Last edited:" time should match the post time (12 hour format, with
exceptions).

(imported from commit 13d981da2945cecd3f287da0e4200c32b3921682)
2013-08-23 14:07:53 -04:00
Steve Howell 439e984f3d Break up Filter predicate tests
(imported from commit 780559045d6ea84612617db9249d7f191dbd86d9)
2013-08-23 13:56:28 -04:00
Steve Howell 3239efd864 Simplify MIT regex code and harden tests
(imported from commit 96c988fb8c90d04dd4bcd7d2bbc04f1b1c8d8cb7)
2013-08-23 13:32:10 -04:00
Steve Howell df812b40f9 Have test excercise Filter.predicate caching code.
(imported from commit 504abea7c1ef3a9cdb58b5bbcf2d751c5d98b1ea)
2013-08-23 13:32:10 -04:00
Steve Howell f8c3b70ced Clarify Filter tests dealing with bogus operators
(imported from commit db8327eb6df70bc8ffee7fb8166bc6491bd2fe70)
2013-08-23 13:32:09 -04:00
Steve Howell ec5bfa2a10 Test Filter.public_operators()
(imported from commit 47e08ffb3eb7f91b95b84b91a249bcf99157998e)
2013-08-23 12:56:09 -04:00
Steve Howell 72b070be14 Remove dead code in Filter.parse
(imported from commit 59b56ab864c8af52cb2d637b965b5f7161c34110)
2013-08-23 12:56:08 -04:00
Steve Howell c205b8b29f Test Filter.predicate better.
(imported from commit d32a1e0d7a638bc5bd010b902475a27527e699ba)
2013-08-23 12:56:08 -04:00
Allen Rabinovich 778fa955a9 Make the right sidebar retractable at narrower window widths.
As part of this commit:
   * Add and style a top right button that controls the sidebar
   * Add the necessary styles for the right sidebar when it's in that mode.
   * Add the logic for controlling the sidebar expansion
   * Modify the logic for prevent default click events to generally
     hide popovers correctly.

(imported from commit ca8063f6c62b436799f952e88541ff0ae8ba85fe)
2013-08-23 09:22:31 -07:00
Steve Howell 795248a1d0 Mute any topic named "muted" on zulip.com.
This change will allow us to test the muting feature on
staging.  Any topic named "muted" will automatically be
muted.  You can also mute any other topic on the console:

    muting.mute_topic('devel', 'ios');
    current_msg_list.rerender();

More UI around this experiment will be coming soon, as well
as support for muting entire streams.

The muting module keeps track of which topics are muted, but a
user can expand muted messages, and once that happens, the
messages are marked with the "force_expand" flag that gets
persisted to the back end.

Muted messages are rendered in similar fashion to the summarized
rows, and as part of unifying some of that code, we have
made it so that expanding a summarized section doesn't remove
individual flags related to summaries; instead, the messages
get the force_expand flag set.

(imported from commit acee4190e63813d46850415c41ff8ebfae4a6953)
2013-08-23 12:10:27 -04:00
Steve Howell 7edf9b095e Fix code format for CSS selectors with commas.
This change basically does s/,<space>/,<cr>/.

(imported from commit 4ab295d0dbc24de6baa29908c2d6a469f35492f3)
2013-08-23 01:31:38 -04:00
Allen Rabinovich b4e3681b71 Increase top margin on the message pane to expose the topmost date marker
(imported from commit 0ad1a0c0b0ae8af1ba497622600fe226c39b9a77)
2013-08-22 14:51:04 -07:00
Zev Benjamin 14f2b41c5d Add Nagios plugin for monitoring the Postgres replication lag
(imported from commit 0196cca357ba58b08ac74065ce84f0e49141d30d)
2013-08-22 17:36:19 -04:00
Scott Feeney 3286fed238 Re-add padding to global filters
Home/All/Private/Starred/@-mentions lost their left padding due to a
mistake in 700b444. Restored here.

(imported from commit 9a4d5ab5d376e64ba82802097c30449c6544a5e9)
2013-08-22 16:35:47 -04:00
Steve Howell b4214c987e Remove count-related markup from All Messages
(imported from commit 36d6bb8373634cbcd2ac5e3128586e27a3442e1f)
2013-08-22 16:26:52 -04:00
Steve Howell e4699d6a25 Use new stream_list.set_presence_list_count().
The old API took a dictionary; the new function works for one
person at a time, which allowed us to clean up the calling code
in ui.set_presence_list.

(imported from commit 0ae9d01491238d32915572c7efebf476d05fed4b)
2013-08-22 15:32:30 -04:00
Steve Howell 8d8ea70f5d Make set_count() private in stream_list.js
(imported from commit 54fda6f0202bc86143eebeb6b361f03886514d04)
2013-08-22 15:05:18 -04:00
Steve Howell dca1ffdf96 [bugfix] Restore toString() call in Filter.unparse().
I regressed this recently, thinking that all our operators are
strings, but I forgot about the "near:" operator used in the
"Narrow messages around this time" feature.  The user facing
symptom was that the search bar showed up empty instead
of saying near:50, which might actually be the better
behavior, but it certainly was not intentional. :)

(imported from commit fcb93cecbe9a052bb9bc1af7fcac5aecaba5aafb)
2013-08-22 14:55:43 -04:00
Steve Howell c4d598b36e Move parse/unparse from narrow to Filter.
I'm trying to move well-isolated methods out of narrow.js, so that
narrow.js is more strongly focused on UI/ajax interactions and
big, heavy lifting stuff.  The logical home for parse/unparse
seemed to be Filter, and they brought along two private methods
with them.  The big code moves involved trivial follow ups
like s/exports/Filter/.

(imported from commit ace0fe5aa1c7abce0334d079ba9eb8d9a57bd10f)
2013-08-22 14:53:00 -04:00
Scott Feeney fece7ce70e Don't pad the left side of PM counts on the user sidebar
(imported from commit 700b444a4732f4ed76c6c7c721c269143917667c)
2013-08-22 14:46:13 -04:00
Scott Feeney f0e9786c08 Test user-sidebar unread counts & fix broken tests
This is hard to break up into separate commits; sorry about that.

Before this commit we had 3 tests:

1. Claims to check that an unread count was 3, but actually doesn't.
2. Checks that scrolling down causes the left-sidebar stream unread
   count to decrease.
3. Claims to check that unread counts are correct, but actually doesn't.

From talking to Leo, it seems that he originally tried to actually do
what tests 1 and 3 claim to do, but found it too fragile to check an
exact unread count because of font sizes, layout, etc.

We now have 4 tests. For each of the stream sidebar and user sidebar, we
test that:

1. Scrolling down causes the unread count to decrease
2. Logging out and back in again leaves the unread count unchanged

I've removed the two bogus tests and some other code that didn't seem to
serve a purpose.

(imported from commit 9f8e4b521e2765099510426d0b7e2960885e6f19)
2013-08-22 14:46:13 -04:00
Scott Feeney d4661b22c8 Remove deprecated parameter in Casper unread test
You used to have to call casper.test.done(N) where N was the number of
tests run. This is no longer required and is deprecated in CasperJS 1.1.

(imported from commit 0de9ecb1930cbce416fa02c24a882e926cdc8e87)
2013-08-22 14:46:13 -04:00
Scott Feeney f41f042127 Remove an outdated comment in CasperJS unread test
The test now works standalone, contrary to what the comment said.

(imported from commit 1280923dd522518689624628df5f3063fbdc1a1d)
2013-08-22 14:46:13 -04:00
Steve Howell 58c141ad79 Avoid side effects in ui.set_presence_list().
Have ui.set_presence_list() only touch the presence list.

Before this change, it was calling update_unread_counts(), which
has a bunch of side effects unrelated to the presence list.

(imported from commit 690f754d78874a03fa36f8ff8765d5a63e431d28)
2013-08-22 14:46:13 -04:00
Scott Feeney 6de6ced290 Fix PM unread counts not displaying
This was broken in two ways:

1. Commit ad59d6f78042ce89, "Make the left sidebar and right sidebar
more consistent", pushed last Monday, changed the markup for the right
sidebar without changing a selector in stream_list.js that was looking
for the old markup.

2. Even then, whenever new user presence information came in, we would
rerender the user list and blow away the unread counts. This commit
patches around that by updating unread counts after rendering the user
list. I'm not sure what broke this or how it was working before.

(imported from commit 53ed40139e257e44411e918d1ecdce3a49e9ee51)
2013-08-22 14:46:12 -04:00
Allen Rabinovich 400dfcb879 Up the z-index on the notifications area so it appears above other elements on the page
(imported from commit 8b5337ce4ad939a4653228445903c2b0d285ba5c)
2013-08-22 11:19:34 -07:00