Commit Graph

288 Commits

Author SHA1 Message Date
acrefoot 0cb72c6259 Unread counts on the toggle buttons when in skinny mode
(imported from commit 99102d1bf752c077ee4c23bf1aa0b095a9f739d7)
2013-09-04 12:35:48 -04:00
Steve Howell fdc589de3a Extract mit_edu_topic_name_match() in filter.js
(imported from commit e062cf7e987ca5af20417fe49785efa35574f628)
2013-09-04 10:39:00 -04:00
Steve Howell 26a8aee2d0 Extracted mit_edu_stream_name_match() in filter.js.
The original code was buried inside a switch statement inside
a for statement.

(imported from commit 768c4ee8596cb63b2caa14c5b113cc867db90293)
2013-09-04 10:38:59 -04:00
Allen Rabinovich 4aa9798f29 Move the lock to the left and widen the topic input field
(imported from commit 1d70afdc82b653239f7d016997c7e9cbe9eb5f14)
2013-09-03 20:15:17 -07:00
acrefoot a3753d8521 fixup 4c6c956118ae09fedca042e797a6029fdd26e00c
(imported from commit 2c1204b1da049e452a8af651c8ab90393d0c1e67)
2013-09-03 14:00:40 -04:00
acrefoot 08157d6f62 Render both the above and below time on date_row
If the date_row is between two messages, it tells you when the message
below was sent, but not when the message above was sent--for that you'd
either have to click on a message or keep scrolling up. This is especially
annoying when there are sometimes gap days on a particular stream (you shouldn't
assume that the message above is simply from the previous day).

This adds the date of the previous message (the time above) to the date_row.

(imported from commit 4c6c956118ae09fedca042e797a6029fdd26e00c)
2013-08-30 16:05:05 -04:00
Jessica McKellar 864ae3ad51 Enable the email forwarding UI for CUSTOMER6.
(imported from commit 587159412ad208d1f5e44479f50ca2f25a98f70a)
2013-08-29 18:13:21 -04:00
Jeff Arnold 6a9b441853 Clear a desktop notification once its source message has been read.
Addresses Trac #1698.

(imported from commit 859fc7d436904f21427d15f6363c4e0ca859e02a)
2013-08-29 17:16:11 -04:00
Scott Feeney f386d87f8e Add "announce stream" option to frontend UI
When creating a new stream, this option lets you announce its
creation to everyone who you didn't explicitly add.

(imported from commit ae4140b4268b73e8b4bb54f5a6eea12fe07cd110)
2013-08-29 10:32:37 -04:00
Waseem Daher dd6ddc0e1e Revert "Prevent unread counts from overflowing."
This reverts commit 728a5415c8aa2ee18405c77746a0ea9543a20d98.

(imported from commit 7d91b564549e4e444fe656c2d8b811e2fcbff2d3)
2013-08-28 18:02:09 -04:00
Allen Rabinovich 98f7870150 Prevent unread counts from overflowing.
(imported from commit 728a5415c8aa2ee18405c77746a0ea9543a20d98)
2013-08-28 13:54:47 -07:00
Jessica McKellar ea1420d201 Add a (?) popover hint next to stream email addresses.
(imported from commit f365afcf7bd256d0417e67c69f9fa67c5b15d418)
2013-08-28 16:43:40 -04:00
Scott Feeney c98deb5988 Toggle user sidebar popover when chevron clicked again
Fixes Trac #1679.

(imported from commit 998f3497f22f83297c9afd7c3e8ea6446b8a06db)
2013-08-28 16:10:33 -04:00
Waseem Daher ae4d53f977 Push inline message editing button to everyone.
Leaving the feature flag in in case certain realms don't like it,
so we can easily blacklist them from this feature.

(imported from commit 2a5884008be05216d195a582a327d7641bc419d5)
2013-08-28 13:48:45 -04:00
Steve Howell 857680102f Remove enforce_arity checks from Dict
(imported from commit 8fdb6d8807e5c16349c7fcf71f25ce73348a5fe1)
2013-08-28 12:29:11 -04:00
Jessica McKellar 9ffc292a57 Update a stream name in the UI when it has been changed.
(imported from commit 1fb90a83a62243997d870e1b5da0590402bd8529)
2013-08-28 10:23:39 -04:00
Jessica McKellar 081ae7771a Add a MessageList method to update message recipients.
(imported from commit 3c24f045aa5726fcab8b9acd91105044e7783b63)
2013-08-28 10:23:39 -04:00
Allen Rabinovich ddd790e642 Change edit button CSS to keep it from jumping
(imported from commit 17a03ca9294765256af0d4c6eb292b755d06158e)
2013-08-27 15:11:40 -07:00
Tim Abbott 8601c2d766 Disable Webathena-related UI for desktop app.
(imported from commit 4de9ecbd5acd90826da1941593fe03aa8a6bd80c)
2013-08-27 16:21:41 -04:00
Steve Howell 03b58e1528 Make narrowing click handlers work more generally.
Previously, narrowing would only work from recipient rows, not
other message table rows (e.g. summary rows).  This led to the trap
that you could add a narrows_by_recipient class to an element,
expect that narrowing would work, but the actual handler would
break or silently fail if it weren't part of a recipient row.

Now the click handler looks for the closest table row (tr).  It's
encapsulated in rows.get_closest_row(), so if we go to a
non-table-based design, it should be easy to address in one
place.

(imported from commit e116b7573c4bb06599ced84a0adcf8dc23d63593)
2013-08-27 15:46:33 -04:00
Tim Abbott e95a81addb Add Webathena login button to our mirroring page.
(imported from commit 43d8323bb502299027436a8c94c04f55d87bf953)
2013-08-27 15:41:43 -04:00
Scott Feeney 967d0f7473 Don't wait for DOM ready to register Handlebars helpers
This fixes a bug (hit by a branch of mine) wherein you could not
render Handlebars templates from a DOM-ready callback in a file that
came before templates.js alphabetically.

(imported from commit 48091d016776eb6f12d33db199781e776af18fc5)
2013-08-27 15:32:20 -04:00
Allen Rabinovich f6ec501505 Modify lock icon styles to display it in the stream list swatch or to the right of the stream name in the list
(imported from commit b70ed2520b38229ccaed62ed84786cb9152e50a9)
2013-08-27 12:20:08 -07:00
Jessica McKellar 908abbbd8b tutorial: adjust the placement of the stream and subject popovers.
(imported from commit e61df7b0ac25d63601763a37007d9f4cefded081)
2013-08-27 15:09:28 -04:00
Jessica McKellar eacd27dc8f Don't let the tutorial popovers get clipped on long names or small windows.
(imported from commit 069016ab38eb2d0d09b751ca22a53aba9d6980ba)
2013-08-27 15:09:28 -04:00
Allen Rabinovich 7f807f7c8d Make unread counts appear as lozenges to the right of stream/subject names
In particular:
   * Pull the count containers out of the containers that cut off overflow text
   * Make them lozenge-like
   * Add logic for shortening the overflow container when a count container is
     present

(imported from commit a2b3d237cbfe4fadfbbc3a931d2de85dfba10d04)
2013-08-27 09:15:16 -07:00
Jessica McKellar 2ba75d2bfa Report a distinct string including version as the client for desktop app users.
(imported from commit 58115e0cdd32f19f3694a1ffbf8664561175cf55)
2013-08-27 10:24:36 -04:00
Tim Abbott 134da30fdf Add webathena authentication button for Zephyr users.
This shows up when you're not running a Zephyr mirroring bot and lets
you use Webathena to have us run it.  Obviously needs more docs.

Current problems include:

* supervisorctl reload ends up recreating /var/run/supervisor.sock
  with the wrong permissions, so it only works once in a row before
  you need to chmod that.

* /etc/supervisor/conf.d needs to be humbug-writeable; this is a clear
  local root vulnerability

* This uses SSH and thus is kinda slow.

(imported from commit 7029979615ffd50b10f126ce2cf9a85a5eefd7a2)
2013-08-26 18:17:25 -04:00
Steve Howell 7fb99761e1 You can only expand rows by clicking on [+].
(imported from commit 23a52feca13232bf36038cd7f59c520f9106ee2c)
2013-08-26 16:38:34 -04:00
Scott Feeney bf0909a94d Lazy load Dropbox widget, and only when enabled
This brings several improvements:

* The Dropbox script won't slow loading our app.
* If it fails to load, no traceback; Dropbox link just won't appear.
* For users with Dropbox disabled (most at this point), no loading at all.

(imported from commit e71ae5790fc85a185e622bdafb350109527b4eee)
2013-08-26 13:13:00 -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 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
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
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 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
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 3239efd864 Simplify MIT regex code and harden tests
(imported from commit 96c988fb8c90d04dd4bcd7d2bbc04f1b1c8d8cb7)
2013-08-23 13:32:10 -04:00
Steve Howell 72b070be14 Remove dead code in Filter.parse
(imported from commit 59b56ab864c8af52cb2d637b965b5f7161c34110)
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 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