Commit Graph

117 Commits

Author SHA1 Message Date
Leo Franchi dbb2157457 Make home view unread count only count messages newer than the pointer
(imported from commit 0f699ed23f59380b04606bd30600373956f89ae4)
2013-03-26 18:34:16 -04:00
Jessica McKellar eaa2cc702e Autoscroll when you are at the bottom of your message feed.
(imported from commit 7ca92b13c874346f846aea8200a638a7914fe7d6)
2013-03-26 14:05:45 -04:00
Keegan McAllister 6d9aca5f1a Move "page parameters" (email, enter_sends, etc) into a single object
(imported from commit 842b2371bf6364982f1358f1cd2d91118c7fb2bf)
2013-03-26 13:50:03 -04:00
Leo Franchi 6263c9ba1e Unify calculation of unread-count for notifications and use it in the title bar
Fixes trac #1004

(imported from commit 6f04d1d3ded198b46cc2ff1733b94b5c17beb581)
2013-03-20 10:09:40 -04:00
Leo Franchi 79dfe57840 Mark all messages between start of scroll and end of scroll as read
If the user scrolls super fast, our scroll handler might not catch
the user  passing by some messages.

(imported from commit 14cebffcd1321f02443971ac5e1c922db19648ab)
2013-03-15 10:43:17 -04:00
Leo Franchi 7510f87eac Select first unread when narrowing by clicking on stream in sidebar
(imported from commit 557751f44e3fee61b6a55f8f8328e2f97e6adc04)
2013-03-14 15:01:13 -04:00
Leo Franchi ff42774551 Refactor unread client handling to use 'read' flags per message
(imported from commit ca48745396e7fbac456e5eb2e7dbe4adc62b3492)
2013-03-13 14:14:45 -04:00
Waseem Daher 33dc3a2fb7 Properly start tutorial on first run, even if you have new messages.
We were previously having an issue where the tutorial could
be pre-empted if you got a few messages while you were first
logging in.

I have some reservations about this being slightly fragile, and a
better approach might be to just have a bit that we use to determine
whether or not you've already seen a tutorial. (Or potentially that
checks whether or not you've ever sent a message.)

(imported from commit f8858f64a36bcd25887b76314caff283929f340c)
2013-03-12 09:56:57 -04:00
Zev Benjamin dc0913077a Add a new frontend error-reporting system
The new system, called blueslip, makes errors fatal when in debug
mode and only output a message when running in production.  In the
future, it could also send user errors back to us automatically.

(imported from commit 1232607c0311e885c8b5a5e8a45ffb28822426e0)
2013-03-11 13:22:12 -04:00
Zev Benjamin d05ac105fe Move clear_table into MessageList
(imported from commit 138c3103920413580f86fede115843ecfddc0691)
2013-03-05 12:48:32 -05:00
Zev Benjamin f6ba728a24 Move message rendering into the MessageList
(imported from commit c1e16b1d2fafe5c079991e7ae96a013e25bc8618)
2013-03-05 12:48:32 -05:00
Zev Benjamin 95309539bc Move same_{stream_and_subject,recipient,sender} into the util module
(imported from commit 0d79bc3ae29be16eba59acea8bc5fda2aba1d4de)
2013-03-05 12:45:12 -05:00
Leo Franchi 7374fe53f1 Only show the "More messages below" if unread messages are in the home view
(imported from commit 6b1ded10519305bca935b093a74b59d7ab814c55)
2013-03-01 14:35:39 -05:00
Jeff Arnold fcd033e33e [schema] Save enter_sends on the server in the database.
(imported from commit 4d82f6aaf5918f155a930253c9cc334dbcc0d97a)
2013-02-27 17:25:29 -05:00
Leo Franchi 19d107e42b Add a home_msg_list that contains all messages shown in the home view
By splitting up all_msg_list and home_msg_list, we can properly add/remove
streams from the home view without having to jump through hoops.

(imported from commit 92767197759f7519197dfc58be951b60fa823fbb)
2013-02-26 14:13:35 -05:00
Keegan McAllister 56d183ea06 Remove lurk mode from web client and API examples
See #796.

(imported from commit e238ce571c3f30d8312b630df7048ad1d9cad6d2)
2013-02-21 15:11:10 -05:00
Zev Benjamin 4c9e3a167e Move message selection to an event-based system
Messages are now selected on a MessageList, which triggers a
message_selected event that other parts of the code can listen for.

(imported from commit 1da9e4121425c0ac4461b41b7aea169072e1512b)
2013-02-21 13:29:17 -05:00
Zev Benjamin ed51bd0432 Select messages on the MessageList instead of calling a global function
(imported from commit 0ea1c2695cda5ec415c42a450103e768cf2ff5db)
2013-02-21 13:29:17 -05:00
Zev Benjamin fc10556b84 Select a more correct message when narrowing by clicking on message's stream or subject
Previously we would select the first message in the block.  Now, we
only do that if a message that is selected will not be in the
resulting narrowed view.  If the selected message will be in the
narrowed view, we select that message once narrowed.

(imported from commit 4da5a3a0b597b58c2e028f1b29ac20ae3808a4d1)
2013-02-21 13:29:17 -05:00
Zev Benjamin e9b915c2b9 Remove global selected_message_id and persistent_message_id variables
Each message list now has a selected message id.

(imported from commit 041abc54ea42c636c30e39df4a2e838bb830e1aa)
2013-02-21 13:29:17 -05:00
Zev Benjamin 97160d79d4 Use the new MessageList for storing messages
(imported from commit 38a04d2ff504aa49189997b972318af7c944d528)
2013-02-21 13:28:23 -05:00
Zev Benjamin 814e3d6385 Implement a message list structure for storing messages and related information
(imported from commit 171de93636a215d9357c7fc4ee8fb71696d23fb5)
2013-02-21 13:27:45 -05:00
Waseem Daher b51dc36667 Add a tutorial.js file.
(imported from commit 58b72d08c0cd7815c3c54bd37c4a8033f32cc7ad)
2013-02-20 23:04:49 +00:00
Keegan McAllister 2d3212f3a4 check-all.js: Compact list of globals
(imported from commit c6d67517feaa5f33fa0a25e836ab0fe6ab8edc01)
2013-02-20 16:02:31 -05:00
Keegan McAllister c39e51cc30 Rewrite check-all with various enhancements
- Find Python and JavaScript files the same way, by looking at
  everything in Git with specific exceptions

- Check the non-browser JavaScript, with appropriate JSLint options

Fixes #19 and #387.

(imported from commit 042bd6c26aa7a7ea2209935320ef4da12344b02b)
2013-02-20 16:02:31 -05:00
Keegan McAllister 02ce209b5e Add a generic script to run the right Node binary
(imported from commit cf187323786cf1ee576ec70b6f7db4cbf61d6911)
2013-02-20 16:02:30 -05:00
Leo Franchi 8162d46d5c Mark as unread messages loaded in a narrow view older than pointer
(imported from commit 37362d1fbb4932f064753a5d3d335d9b2bec2964)
2013-02-20 14:05:49 -05:00
Reid Barton 61350d65d1 Render recent dates as weekdays, part 2.
This commit does the actual work of formatting recent dates as weekday
names and updating the format when the date is sufficiently far in the
past.

Also, silence a bogus jslint warning.

(imported from commit 503286fbd9c1e33a81cc7d78cf8d08d5e7f78c1a)
2013-02-19 15:58:25 -05:00
Reid Barton 59dab21fcd Render recent dates as weekdays, part 1.
This commit just moves time rendering logic to its own file, and does
not make any functionality changes.

(imported from commit d111d03c6abc8d9550fcf65e4f89eab8056d1ed4)
2013-02-19 15:58:25 -05:00
Leo Franchi 5d79bb6a20 Add a 'show in home view' toggle to the stream settings
(imported from commit af8bcc4df6fcd9f6ffed4ccb1b9be5261ffe619d)
2013-02-19 15:43:27 -05:00
Keegan McAllister bb5f59d310 Use white text for recipient labels on streams set to dark colors
Fixes #577.

(imported from commit 0518e33b96bc0028fc80d533f6b8ec35fd5cdc04)
2013-02-19 15:33:35 -05:00
Reid Barton 37b5a84af4 Track total number of unread messages
(imported from commit 0a6f270b8a4debf0cbb7e869ecbff59f39f22049)
2013-02-19 13:43:34 -05:00
Keegan McAllister e25d9a8492 Remove unused Notificon library
(imported from commit 8c0717b4e305d28f30b9088a974e99d510ab3021)
2013-02-15 16:19:58 -05:00
Jeff Arnold d0f422979b Change the favicon on notification (great for pinned tabs)
(imported from commit 025ad165d15b2e6d979c246776148f13ebc555fb)
2013-02-12 16:27:07 -05:00
Leo Franchi 83011f7f47 Show a user activity list in the sidebar
(imported from commit 95aaa55c7e4cc39f844518b5308866bedf2cd1c5)
2013-02-11 18:05:57 -05:00
Tim Abbott 2d9a21654b Fix messages being added to the home view out of order.
So here's the reproduction recipe:
(1) Find a narrow that doesn't have any messages since 4 days ago

(2) Directly visit that narrow in your browser (or wait for someone to
do a deploy and thus auto-reload)

(3) Wait until load_old_messages has been called at least once

(4) Un-narrow

(5) Scroll up, and notice that the 400 most recent messages are above
sets of older messages.

The cause is that the code in add_messages assumed that
selected_message_id was within the range of message already in the
home view.  This is true in most cases where add_message is being
called, but it is not true in the case that the user was in a narrowed
view containing only very old messages (And thus selected_message_id
would be older than everything in the home view).

We can fix this by tracking persistent_message_id separately and using
that for the relevant test in add_messages.

(imported from commit f0da2561ba68f729343b260adc398029fae6acf7)
2013-02-08 14:43:13 -05:00
Jacob Hurwitz 61acc58947 Add a notifications bar when there are additional messages out of view
(imported from commit 38fa78f63fd520d0b1f09921ba064cba010a6f99)
2013-02-02 01:16:25 -05:00
Zev Benjamin 9d27878abf Destroy spinners with a new abstraction instead of hiding them
If you create a spinner in a hidden element and then show the
element, the spinner is placed differently than if you had created
the spinner while the element was visible.  This commit makes it so
that we never create spinners while their parent is hidden.

(imported from commit a21e68976d70fcceece30ee35f5e7cf6f9490497)
2013-01-16 14:45:23 -05:00
Zev Benjamin beea0f747e Rename loading_{indicator,spinner} to page_loading_{indicator,spinner}
(imported from commit e1222569f62ac693d45d2f057ef6b05c883c900e)
2013-01-16 14:45:23 -05:00
Reid Barton 9e23907259 Add "Lurk" mode
/?lurk=foo will show all messages to the stream "foo", regardless of
whether you're subscribed.

(imported from commit 049d98b3ee8df19ef0a9dc392ae941dd463f8dd5)
2013-01-16 14:19:06 -05:00
Zev Benjamin cb8c67b325 Keep a dictionary of user email address to person object
(imported from commit 16d63fefff3bda33cfc2f90398539b5e2d9bb499)
2013-01-15 17:02:39 -05:00
Waseem Daher d9e50117be Frontend for invitations.
(imported from commit 8afab7cc5a4a5c14b605f1b27b48036c9414f7d0)
2013-01-14 10:25:26 -05:00
Jeff Arnold 7709e21a24 Notify the user when someone is speaking at them
(imported from commit 662ea67b2cf210bfd327ae2db6f924e4424d6d50)
2013-01-09 20:18:39 -05:00
Jeff Arnold db6f03d46d Make the back button work when narrowed
(imported from commit be922b06e7b53ec21751e67a490bb518333c3e6c)
2012-12-19 14:46:31 -05:00
Keegan McAllister 44b9925bfc Configure get_updates timeout in settings.py
(imported from commit 2a647bdd73c43ca5fed704925808efafc70da044)
2012-12-14 16:22:42 -05:00
Zev Benjamin 7e4776322d [manual] Unify huddles and personals into private messages on the receive path
feedback-bot and zephyr_mirror will need to be updated and restarted
when this is deployed to prod.

(imported from commit fe2b524424c174bcb1b717a851a5d3815fda3f69)
2012-12-04 18:01:51 -05:00
Zev Benjamin 46f4a5eb38 Add util module
(imported from commit 3844e136fb799c6f57f8823255addf00a07ef686)
2012-11-30 15:04:46 -05:00
Jessica McKellar 37968bc9c7 If necessary, scroll to avoid occluding the message to which you are replying.
(imported from commit adf23d647a3d462d6236d8f1039da89a31b782d5)
2012-11-30 14:32:41 -05:00
Jeff Arnold b52dbe1ca9 Auto-invoke "Load older messages" when at the top of the page
Resolves Trac #445

(imported from commit d7d96fe82e9e1cbef32e0dde284ce217e83aff55)
2012-11-29 14:18:38 -05:00
Tim Abbott aba2192ec2 Restore the time-travel functionality with Waseem's UI.
This restores the time-travel functionality and fixes Waseem's laundry
list of problems with its original UI.

(imported from commit e30e02c25af994435adb815d26284b3669c945a4)
2012-11-28 22:26:31 -05:00