Commit Graph

145 Commits

Author SHA1 Message Date
Jeff Arnold 6483314f74 Only fade visible messages before rendering compose box
Partially addresses #1963

(imported from commit 0c941085ab6894e8e43015a116c49a5bdc674b5f)
2013-11-04 16:27:39 -05:00
acrefoot 434b7ac120 Give Feedback in non-obvious cases for sent messages
Displays a notification above the composebox in cases where the message
is not visible (further down), or where it's outside the current narrow or search.

It also offers a link to the appropriate narrow when it makes sense, and offers
timetravel when appropriate. There is currently a bug with timetravel (and you can
see this when using the popover menu) that makes "narrow to messages around this time"
not work for muted messages.

This resolves Trac #1518.

(imported from commit 391ca0b9c07d91496f6585a4fd8e15723d1170e2)
2013-11-01 12:34:39 -04:00
Jessica McKellar f1e90086f5 Remove the onboarding checklist.
Looking at the historical data, fewer than 50% of active users have
completed the checklist, which means that it is just persistent
clutter. We also have other better ways of encouraging people to send
traffic and get the apps now.

This commit removes both the frontend UI and backend work but leaves
the db row for now for the historical data.

(imported from commit e8f5780be37bbc75f794fb118e4dd41d8811f2bf)
2013-10-31 11:34:15 -04:00
Steve Howell 6c6816491d Add muting_enabled option to MessageList.
(imported from commit c86772b7dea864c49091c988772e17aae5efa5bc)
2013-09-23 10:53:06 -04:00
Steve Howell 21b30664b6 Create MessageList.add_messages() from zulip.js code.
I moved code into MessageList to further encapsulate details
of filtering.  The MessageList instances should be their own
gatekeepers for what messages they care about.

(imported from commit ee6cd7f6eabf97962d724a05d7d0b0a3e6ab19e5)
2013-09-22 14:35:53 -04:00
Leo Franchi 0cf588cd25 Show a warning and action button when @-mentioning someone not on the stream
(imported from commit 464d5a028f6a8f2698683e7317972dc0c7b9e336)
2013-09-17 16:49:47 -04:00
Steve Howell a1addad450 Handle muting updates
(imported from commit 219a817c494f7bc27642d96f203f686df28bb361)
2013-09-11 16:47:37 -04:00
Kevin Mehall 810dd89621 Maintain a list of people in the realm.
people_list and people_dict include the feedback bot and anyone you've
cross-realm PM'd with. Useful for autocomplete, but not for admin and
stream settings views.

Fixes the UI part of Trac #1772.

(imported from commit cdefd4e86980447aad5190e7fc8ae3666d66e3c3)
2013-09-09 12:13:33 -04:00
Kevin Mehall 45b14a0c96 Set up people_dict before DOM load.
hashchange, which calls admin.setup_page, runs in another onready
event handler before zulip.js main().

(imported from commit 5d4e71f4666baf0a53e3fe9804561ce6cdc06261)
2013-09-09 12:13:33 -04:00
Scott Feeney 9c454dfe02 Track peer_add/peer_remove events on client side
This is the last step in getting a consistent client-side picture of who
is on a stream (provided non-MIT realm, and provided the local user is
subscribed to that stream).

(imported from commit 8bca722f169860ad4c1c92fdcb70d62c60f70fed)
2013-09-06 23:13:48 -04:00
Leo Franchi 41b286232d Allow filtering to alerted messages with is:alerted
(imported from commit 99834f1ee1b9b2e0f5c7427afa1494bf404e3626)
2013-09-05 10:18:41 -04:00
Leo Franchi 802ea78fb0 Add a settings option to configure per-user alert words
(imported from commit b24d352fffdde13f2cf0467b31c706ebf0534d6a)
2013-09-05 10:18:41 -04:00
Leo Franchi 897dd87b94 Add a span around alert words to mark them visually
(imported from commit 9b8fbbd957086f1eeaa3409e5830aa6d7974fbe8)
2013-09-05 10:18:40 -04:00
Kevin Mehall 19a835e7d5 Add a checkbox that propagates topic edits to subsequent messages.
Trac #1348

(imported from commit 28e2a8cb3ecda5ec50d17501f4ccbd8644212065)
2013-09-04 14:51:46 -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
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
Zev Benjamin 2c775d0894 Make recent_subjects case-insensitive
(imported from commit 36c423f506c1e8dc0536c80a4a085b689623191a)
2013-08-20 15:37:08 -04:00
Jessica McKellar b32219c8eb Don't display unread counts until after making a bankruptcy decision.
Users were getting confused about why the unread count in the sidebar
/ notification bar / Dock was different from what the bankruptcy modal
said, so only show them the true server count until they've made a
decision.

(imported from commit 71d376cd4a85749ccf49936b251e6b8ac21361b7)
2013-08-20 10:26:52 -04:00
acrefoot 395aaae994 Allow anyone to edit a "no topic" message
This change would allow anyone in the realm to set a topic for a "no topic"
message. As soon as the message topic is set, only the sender can change it again.

(imported from commit 0a91a93b8fd14549965cedc79f45ffd869d82307)
2013-08-19 16:29:30 -04:00
Steve Howell 29c012dc74 Create stream_data.js module.
This pulls a lot of data-centric functions out of subs.js.

(imported from commit 0deed7d4bf5697e893af9bc9d888c2d5da8d9fa2)
2013-08-19 12:17:55 -04:00
Kevin Mehall 0f6c7ca7be Use msg_list.get_row(id) instead of rows.get(id, msg_list.table_name)
(imported from commit 953cd24e605269d2bbdc42b878506f0ab01501e8)
2013-08-14 17:08:32 -04:00
Steve Howell 050c8ad103 zulip.subject_dict -> composebox_typeahead.seen_topics
Move zulip.subject_dict into composebox_typeahead.seen_topics,
and encapsulate the use of seen_topics inside composebox_typeahead
with add_topic() and topics_seen_for().

(imported from commit 2bc2d1714fabdc07a661cbf815d14b36a08990e2)
2013-08-14 13:15:00 -04:00
Tim Abbott 91a3935b92 Fix sending unnecessary pointer updates to server after reload.
(imported from commit 5297d7339e2fc363e825b20ddd7279f9878dbe2f)
2013-08-13 18:09:19 -04:00
Steve Howell a1fa7c1b04 Remove unneeded calls to update_faded_messages() in Zulip.
These calls were expensive and unnecessary.  We already update
fade/unfade classes deeper in the call stack, when we render
the messages inside message_list.js.

(imported from commit 08fe028462b6d4569d9798a290dd7b26eb21fb01)
2013-08-13 17:14:07 -04:00
Steve Howell 0879648f0e Remove respond_to_cursor flag.
The prior commit, which was a functional fix, made the
flag obsolete.

(imported from commit 203a080106b00e0355a1223f783bbe579430b4ad)
2013-08-13 14:12:28 -04:00
Steve Howell d27feeed62 Extract code to summary.js.
(imported from commit 51d958b27e53555f5f77d6e6b661eade57190e23)
2013-08-13 11:26:12 -04:00
Jessica McKellar 29a64b6c59 Only suggest declaring bankruptcy once.
Use information from the server to figure out if we should prompt for
bankruptcy, rather than trying repeatedly inside load_more.

(imported from commit ccb8cb1ce482b8bf3d343e7324fef7981880282d)
2013-08-12 17:33:40 -04:00
Steve Howell 878ee2b3fd Move Filter class to filter.js from narrow.js.
1) The class Filter now lives in its own module.
2) The function canonicalized_operators() is now a class method on Filter.
3) The function message_in_home moved to filter.js and became private.
4) Various calling code had to change, of course.
5) Splitting out Filter helped simplify a few tests.

(imported from commit e41d792b46d3d6a30d3bd03db0419f129d0a2a7b)
2013-08-12 13:58:32 -04:00
Tim Abbott e2413e8137 Defer processing of get_old_messages results during tutorial.
Previously we would just discard the results of get_old_messages,
which meant that any messages sent either while you were doing the
tutorial or that you started out with (as in the case of the CUSTOMER3
experiment) would be lost until you reloaded.

(imported from commit f5280c091ab6ed7c2af6eb8fe49c0fa6b997ac97)
2013-08-12 10:17:18 -04:00
Steve Howell 37f8cc9294 Extracted code into compose_fade.js.
The compose_fade has three public exports:

    set_focused_recipient
    unfade_messages
    update_faded_messages

All code was pulled directly from compose.js, except for the
one-line setter of set_focused_recipient.  The focused_recipients
variable that used to be in compose.js was moved to compose_fade.js,
hence the need for the setter.

(imported from commit 462ca5d0d0bd58612d0197f3734a8c78de8c6d30)
2013-08-11 17:05:13 -04:00
Zev Benjamin ec9322fc87 Use Dict everywhere we have keys based on potentially dangerous, user-supplied data
There are also one or two places we don't need to use it for security
purposes, but we do so for consistencey.

(imported from commit aa111f5a22a0e8597ec3cf8504adae66d5fb6768)
2013-08-09 17:35:14 -04:00
Leo Franchi 3cd012931b Use _.has to guard against subjects called hasOwnProperty
(imported from commit d1665c8b9b9a3963cff38ed2e9b84ed87a71dfd8)
2013-08-07 15:01:12 -04:00
Scott Feeney 68251256eb Fix missing $ that broke loading in Firefox
Bug introduced in commit f5f441ab90bcdb8404e05caea3c6da81a3a6fc1e

(imported from commit 94fb90cc12ccf8e1c0ad121be25dae897516679a)
2013-08-07 14:15:34 -04:00
Jessica McKellar ccd2433345 Let the browser scroll happen before our scrolling on a (re)load.
On a page load or reload, the browser will, at an idle time, scroll to
the top of the page. We can't intercept this browser-induced scroll,
so to make sure it doesn't in interfere with our scrolling to the
correct place in your message feed, we let the browser scroll happen
before the work we do on page load.

(imported from commit f5f441ab90bcdb8404e05caea3c6da81a3a6fc1e)
2013-08-07 13:51:47 -04:00
Jessica McKellar 5b38b763d9 Move the get_old_messages success work into its own function.
We'll need to set timeouts on calling this function.

(imported from commit 02b8322ae3cd68d714c2ccf4b5bece075cc8d27f)
2013-08-07 13:51:46 -04:00
Jessica McKellar 7347bc7213 Consolidate the multiple zephyr.js onload functions into a single
function.

It's easier to keep track of everything in one place.

(imported from commit 2ff55fd8ee7c3ff465644ad4b921bf6efa97d02c)
2013-08-07 13:51:46 -04:00
Steve Howell 8bff4779e6 Leave the pointer alone more when it's at the top.
This commit makes keep_pointer_in_view() less aggressive when
the pointer is toward the top of the screen.  If the pointer is toward
the top of the screen, then as long as it's fully on the screen, we
don't pull the rug out from under the user and change the pointer.
An important benefit of this change is that we fix trac #1608,
which was a bug where autoscrolling interacted with
keep_pointer_in_view() to push messages past the top of the screen
before they were read.

(imported from commit e39926df99bfaedd5c0757f1241887ccd9b93fab)
2013-08-07 13:49:08 -04:00
Steve Howell 990df18d07 Refactor keep_pointer_in_view().
The helper functions now return true when a message is on
screen, not when it's off screen, and the names have been
changed accordingly.  I also eliminated the at_end parameter,
which was kind of abstract, by having message_is_far_enough_up
and message_is_far_enough_down handle those details.

(imported from commit cdb1543e430f49f23eb1b3a88d9aaff95ce7ca74)
2013-08-07 13:49:07 -04:00
Kevin Mehall 2bf962469e Summarize messages that are sent while narrowed.
(imported from commit 5ab3e4a5e6c43b879c376edd935d45539ef9fbd5)
2013-08-07 10:24:03 -04:00
Kevin Mehall dbb590268e Refactor update_message_flags for multiple flags.
* Move the state into a closure to duplicate it for multiple queues
  * Use _.debounce instead of manual setTimeout fiddling
  * Have it handle manipulating the message flags

(imported from commit 938f51fd666131a3cec5901d3f3fdd39e203b462)
2013-08-07 10:24:03 -04:00
Kevin Mehall ec927416a0 Move "already read" check into process_read_messages and rename it.
Functions were supposed to check that messages were unread before
passing them to process_read_messages, but some didn't.

The `mark_messages_as_read` function was essentially that, so
take that name.

(imported from commit 2917fe30d2defb8a047ec32e1bc70d379779276b)
2013-08-07 10:24:03 -04:00
Kevin Mehall eac6463031 Implement message summarization experiment.
When you read messages in a narrow and then un-narrow, collapse
adjacent messages read in the narrow into a summary row that can
be clicked to expand those messages.

Scoped to staging with feature flags.

The implementation of this within our current MessageList is rather ugly.

(imported from commit bcb3a39d8c0c334136fe86318f18ead03f0f50bf)
2013-08-07 10:24:03 -04:00
Zev Benjamin 5e1d893509 Revert "Temporarily remove "Share the love" from DOM & JS"
This reverts commit fc7af47400f6c96161913dcc98be128c116d90c5.

(imported from commit 8f58425ec3bd95220e109eeb7be21fa449508427)
2013-08-06 17:18:40 -04:00
Scott Feeney 29b3b42ac7 Temporarily remove "Share the love" from DOM & JS
(imported from commit fc7af47400f6c96161913dcc98be128c116d90c5)
2013-08-06 10:47:42 -04:00
Tim Abbott 6dd049fa26 Rename zephyr.js to zulip.js.
(imported from commit e62aa374f1bf2e75cebc00d0bba4e3ade82d19f6)
2013-08-05 17:59:04 -04:00