Commit Graph

74 Commits

Author SHA1 Message Date
Keegan McAllister 2c9cc7d393 Restart runfcgi on deploy
(imported from commit b6316135b5ab9e7fcedf404e81dc74b2cf9495c5)
2012-10-17 23:47:10 -04:00
Keegan McAllister 6de3321f02 run-dev: Update for new get_updates URL
(imported from commit 2617ddd1c2ec377d6f17f1aafd0da251226d39b8)
2012-10-17 18:24:15 -04:00
Keegan McAllister 91209f9304 Get initial server generation from first get_updates result
Embedding this in index.html won't work anymore, because the Django FastCGI and
the Tornado servers might have been started at different times.

(imported from commit 187909d0593449cf2989857671f9ca526723e451)
2012-10-17 18:24:15 -04:00
Keegan McAllister 21ed4d2506 Add a script for running a local dev instance of the app
(imported from commit 29813060ef17360d3a7dcc6fe1873992404457c2)
2012-10-17 18:23:01 -04:00
Tim Abbott 5c50375e02 Display a message and disable compose while reloading.
(imported from commit f998d2e4053e7e2d676f7fe08ee274118dd9faba)
2012-10-17 14:59:49 -04:00
Tim Abbott 8a7779ad49 Tab should toggle stream/huddle even if you clicked the compose botton.
(imported from commit a705c7cd0d6067dc05da7a64f29fb3ef42838785)
2012-10-17 12:05:43 -04:00
Keegan McAllister bd8a4cb4ab post-receive: Use a different subject name for each push
(imported from commit 983c34faa52bec9a7af4d26a326bbb8cc4a08bea)
2012-10-17 01:11:33 -04:00
Keegan McAllister 2c9830ac5b post-receive: Truncate long commit subjects
(imported from commit 9d4b04cb4000d6f03d31ecdd5106ca53ba96c152)
2012-10-17 01:11:33 -04:00
Keegan McAllister 110a7afec5 post-receive: Conspicuously display commits removed by a push -f
(imported from commit 6ed7810c2f20e5f7ac618b31880142ca7da63419)
2012-10-17 01:11:33 -04:00
Keegan McAllister 94bc4dae2a post-receive: Use Gravatars in bot message
(imported from commit 7e662173653aed98d47e5204900947bfb12be96c)
2012-10-17 01:11:33 -04:00
Keegan McAllister e843427e6c post-receive: Split into update_deployment and send_bot_message
(imported from commit 3e89cb21cf4aa192f6a31457fd91aa5f52e6baa8)
2012-10-17 01:01:19 -04:00
Zev Benjamin fab64fd7b0 Make the client reload the page when it detects a server restart
If the client is not composing a message, we can just force a page
reload.  However, if he is composing a message, we must preserve that
message while still reloading as soon as possible.

We take the following approach: if the client has not completed the
composition after 5 minutes, do a compose-preserving reload
(described below).  If he sends the message before the timeout
expires, reload the page after a successful send.  If the send fails
(not due to server timeout), however, we do a compose-perserving
reload in case the error was due to the data format changing.  If the
send failed due to server timeout, we don't reload because the reload
will probably also fail.

In a compose-preserving reload, we redirect to an URI that has a
fragment indicating we are doing a reload and containing all the
necessary information for restoring the compose window to its
previous state.  On page load, we check the fragment to see if we
just did a compose-preserving reload, and, if we did, we restore the
compose window (or just try the send again in the case of send
failure).  The URI fragment looks like:

(imported from commit af4eeb3930c24118e088057d4da456748fbd2229)
2012-10-16 15:30:41 -04:00
Zev Benjamin 103bf321b4 Have client and server exchange a server generation number
This will allow the client to detect when the server has restarted.

(imported from commit 89e75916719d967beb2520be6263f79f897d9ec1)
2012-10-16 15:30:09 -04:00
Keegan McAllister 2bd9a6953c django-template-graph: Replace slashes with newlines
Makes the graph fit better on the screen.

(imported from commit 7d42caca478634143c6b291f47a4642acfdd1128)
2012-10-16 01:45:37 -04:00
Keegan McAllister 37c51b80cc Add a tool to draw the Django template inheritance graph
(imported from commit e10bb719d62a76abfea76c7fc69093a3cc33272e)
2012-10-16 01:33:15 -04:00
Waseem Daher b76422d8d0 Cache the window selector as 'viewport' in an attempt to improve performance.
(imported from commit 3e01382260938737fbee663f6a9e94ad495ef21e)
2012-10-15 22:47:42 -04:00
Keegan McAllister 80e60c3120 check-all: Show unused imports if passed --imports
(imported from commit ecae64a3257b3ebd40656717718177270d02111a)
2012-10-15 16:16:10 -04:00
Zev Benjamin 084608ebda Clear compose box when replying to a message
(imported from commit 1fe21a6d1a5f6f946e14583dc81ede961dbf57c9)
2012-10-15 15:45:15 -04:00
Zev Benjamin a85c1f62d2 Visually distinguish when a message is persistently vs. temporarily selected
(imported from commit d626b3460a3a3ad46bd9ebfb65d73a6c267c2251)
2012-10-15 13:25:39 -04:00
Zev Benjamin b42cf1d4c8 Fix persistent message selection across narrows
(imported from commit 958ce299108f8bbc8579e7446053d7fc9f018b81)
2012-10-15 13:25:39 -04:00
Keegan McAllister deffda072f Add a tool for removing stale *.pyc files
(imported from commit c0fcfb171932f523fff13f14f09ecf5b3a6b21de)
2012-10-12 13:28:09 -04:00
Zev Benjamin 35342481dc Scope subject autocomplete to the stream
(imported from commit 6e9972c93d5f56f29db37b522e20768b8fb641df)
2012-10-12 13:15:06 -04:00
Tim Abbott 2f1d68e09a do-schema-change: Recreate the auth_user email index.
This index is important since we are searching by email address.

(imported from commit 49c8dab68a0c7857d1c9620b856e4de5c4b8c669)
2012-10-12 11:09:53 -04:00
Zev Benjamin adf75d48e1 Make pressing escape also un-narrow
(imported from commit 17d2cc3e8074af332f98588ad201ec342476d51f)
2012-10-11 14:30:51 -04:00
Keegan McAllister b3c029472a post-receive: Include an abbrev sha1 in the message
(imported from commit 97eea18bb4426270d085e398680f1db8028235db)
2012-10-11 11:49:24 -04:00
Tim Abbott b5bb6b9921 Rename test-settings.py to test_settings.py
(imported from commit c9ad55821bc66a7c11668ac0b40ca13c2e05986e)
2012-10-10 18:13:45 -04:00
Tim Abbott ac3f4393ff Rename instance to subject.
(imported from commit 6b4693da03f106448c137cf81cf9801cac44f2b8)
2012-10-10 18:01:39 -04:00
Tim Abbott 413fdeb655 Rename class_name to stream_name.
(imported from commit e610f5de5edf756ef0a71c5361fcd507adbb1605)
2012-10-10 17:48:17 -04:00
Tim Abbott ef3b8a2ce5 Rename class_list to stream_list.
(imported from commit c9f5b10acdb20d3e923cf7f32bc5a3f37aa40705)
2012-10-10 17:48:17 -04:00
Tim Abbott 08e832e093 Change send_message to accept a stream, not a class.
(imported from commit 0f58de2502bec227f5f33e44692d03f2f28d6f63)
2012-10-10 17:48:17 -04:00
Tim Abbott 44e9e4cebf Rename Recipient.CLASS to Recipient.STREAM.
(imported from commit a530194163f7260c73921137fa1ff671f14516f6)
2012-10-10 17:47:13 -04:00
Waseem Daher 48cda57d84 Fix issue where arrowing-down near end of page would skip a message.
We had this fascinating behavior where pressing a down arrow near the
end of the page would advance the pointer, call recenter_view, which
would trigger a scroll event, which would call keep_pointer_in_view,
which would notice that we were at the end of the page and advance the
pointer again!

I split out that last part into its own function which is only called
on mousewheel events.

(imported from commit bc85443e762356e3055f8f88585940a1f11f9124)
2012-10-10 14:29:15 -04:00
Tim Abbott 26b5c11d64 Rename get_zephyr_row to get_message_row.
(imported from commit 2480b0bfe0be58cdb6bdf687760967b26ca38558)
2012-10-10 10:19:46 -04:00
Tim Abbott 06ffd206ae Rename respond_to_zephyr to respond_to_message.
(imported from commit 34e7793601ad6f41d71be2e2060c58138b9d3b53)
2012-10-10 10:18:51 -04:00
Tim Abbott 9a359c8d05 Rename selected_zephyr_* to selected_message_*
(imported from commit 04025c4472b893ce12764775e10c1dc89850b639)
2012-10-10 10:17:58 -04:00
Tim Abbott ae97a88e72 Rename selected_zephyr_id to selected_message_id.
(imported from commit bbb368efdd5010b6dfdaaf60f3f48904b40671af)
2012-10-09 22:42:19 -04:00
Tim Abbott f66124cbe2 Rename select_zephyr(_by_id) to select_message_*.
(imported from commit 91619adf0e610017fbef52d2796020cb16537653)
2012-10-09 22:40:13 -04:00
Tim Abbott f1e90cde8c Rename zephyr_dict and zephyr_array.
(imported from commit 5d93fddc1758c0ee47390cfe599732a60a8d817a)
2012-10-09 22:40:12 -04:00
Jessica McKellar fb62e808d7 Use an associative array for faster subscription checks.
This also helps us manage checking, case-insensitive, for
subscriptions while preserving the casing used by the class creator
for display.

It also fixes a bug where the class_list would become out of sync with
your true subscriptions, allowing you to appear to send messages to
classes to which you had unsubscribed.

(imported from commit 5e8d017bcfb27a71c52f7517733eda7b926d721b)
2012-10-09 17:28:21 -04:00
Tim Abbott 2f910a1629 Show success messages on the subscriptions page.
(imported from commit 771fa4459e6a09ffc4132ccff12372b204334de2)
2012-10-09 15:44:55 -04:00
Tim Abbott 5568e1a79c Move hotkey.js jslint globals into check-all.js.
(imported from commit ec737e658e9f2251025e493abb92e4cf2a7aab72)
2012-10-09 14:11:22 -04:00
Tim Abbott a5c8b5dc7e Detect whether the user is currently in an input area correctly.
Rather than trying to keep track of whether the last thing that
happened was an input area being focused (which had all kinds of
bugs), just detect whether we're in an input area using the
appropriate jquery selector.  Hopefully this has OK performance.

(imported from commit 6150692ffcb0ab9b04244c3d053b5527847ded2d)
2012-10-09 14:11:22 -04:00
Jessica McKellar e351439d0b Don't have clicking on a sender prepare a personal.
It is confusing, and clicking on it should behave like clicking
elsewhere in the message.

(imported from commit e56434e8e143f6fa58b095e1c7d311b4aa24313f)
2012-10-09 11:01:28 -04:00
Tim Abbott ad9f58d90a Rewrite respond_to_zephyr.
The new version is now the only codepath that we use in order to start
a reply to a message.

(imported from commit dd28316d2640fd5fd712f326690d480b7db59c4c)
2012-10-09 10:40:27 -04:00
Jessica McKellar 367feda747 check-all: add new viewport globals.
(imported from commit e163dc07ad196ffd2731f7ccc67bfaada8e8580a)
2012-10-05 16:29:59 -04:00
Tim Abbott c02c6cc954 Display the date when either it or the recipient changes.
This is somewhat experimental and we may need to work on the condition
when it shows up (or move it elsewhere).

Also, maybe it should say "Today/Yesterday" for times super close to
now -- the main issue with doing this is whether it needs to update
without your reloading the page to avoid being super confusing.

(imported from commit e29faf30c83b9574e5d233213f42a24175f9a616)
2012-10-05 15:44:15 -04:00
Tim Abbott 12cd44bd0f check-all: Only check python files in git.
(imported from commit 1c633e048cad0cc4f629977363df6a8300dac65c)
2012-10-05 14:58:42 -04:00
Keegan McAllister c9623ee370 post-receive: Include author names
(imported from commit 7914f47364d014bd17115db7defd0cc634f4ac60)
2012-10-04 17:37:18 -04:00
Keegan McAllister bfa24d75b6 post-receive: Send test-post-receive pushes to class test
(imported from commit 8f187464a4d82da071ffed79abf33ea05b999b95)
2012-10-04 17:37:18 -04:00
Keegan McAllister 2ebd708a8d Remove client-side linkification
It causes problems when [un]narrowing, and we already do the rest of formatting
on the server side.

This reverts commit 90af0192b37bbebbf56d5e7c50f182485ddbca10.
This reverts commit df7e355648d2c4d6319de049933547ed96402fd8.

(imported from commit 99d87f0826ec2f49741f86fad6524ed93e76723f)
2012-10-04 16:52:08 -04:00