Commit Graph

939 Commits

Author SHA1 Message Date
Waseem Daher 9ecb978388 Hide the composebox's personal-message bar by default.
The form decides which fields to require based on whether
or not the personal-message bar is showing. Hide it by
default.

(Otherwise, both the 'Stream' and 'Huddle' prompts show up,
and you're obligated to fill out both of them.)

(imported from commit 13521ed5b7849f41c0335157d468f5e463c7f62d)
2012-10-05 19:05:14 -04:00
Tim Abbott 358351d423 Use the new_zephyr form for personal zephyrs, rather than a duplicate.
(imported from commit 741a785efba9ea40b5c1022d710360f086a2d859)
2012-10-05 17:44:55 -04:00
Tim Abbott 71d87499d8 Fix bug where hotkeys would still work in the compose box.
Just for the record, here's what happened:

If you click on a class message to start a reply, then click outside
to unfocus, then click on a huddle message to reply to that instead,
the system would end up calling the focus handler twice and _then_ the
unfocus handler once (why are we unfocusing something?  Because we
have two compose windows -- new_zephyr and new_personal_zephyr, and
we're switching between them).  the end result is that we'd re-enable
hotkeys with that unfocus handler.

Fix this by being sure to explicitly disable hotkeys after we setup a
reply to a message.

(imported from commit a7735d9a63f0c3c9f6c12d94e8bb107bf3675f44)
2012-10-05 16:38:09 -04:00
Waseem Daher 56bb7ae614 Make extra room when you press down on the last message.
This essentially reverts commit 0d6c3e4d0a70e06b9b2f6e5830b3a9650e44441a,
though also adds support for this behavior with the 'j' key.

(imported from commit 36c51e0f6bd03c53b84abddc75097cb06fc04e16)
2012-10-05 16:32:47 -04:00
Jessica McKellar 367feda747 check-all: add new viewport globals.
(imported from commit e163dc07ad196ffd2731f7ccc67bfaada8e8580a)
2012-10-05 16:29:59 -04:00
Jessica McKellar a282f7b32b Have PageDown at the bottom/PageUp at the top select the last/first zephyr.
As opposed to inching towards it message by message.

(imported from commit 31e833dd06bf27336d9b1f293ab992e99537bc21)
2012-10-05 16:06:10 -04:00
Waseem Daher 6de37bc9ad Break long words in a messagebox.
(It's not totally beautiful, though, in that it causes
your timestamp to appear in a weird place, but it's
better than the alternative.)

(imported from commit 217b6545330f7850f2892df2e82df18976463361)
2012-10-05 15:57:59 -04:00
Luke Faraone 6e4daba2aa Implement respond-to-author bound to the 'R' keypress.
(imported from commit d38b57d175a10423c566549371ae70032b02c29d)
2012-10-05 15:53:40 -04:00
Luke Faraone b16c3f1982 Make hotkeys case sensitive.
Previously we triggered all hotkeys on keydown. Now, if the keydown event
is in the range of a character we bail and wait for it to be handled by the
keypress function instead.

We also redefine all of the keycodes for characters to be their lowercase
versions.

(imported from commit 534199de92174c2858220abb21ce774e1ee0e1d3)
2012-10-05 15:53:40 -04:00
Luke Faraone 6094f46b3a Rename simulate_keypress; we're really faking a keydown event.
(imported from commit 2574afb738787311bc32885d36eaed862925d39c)
2012-10-05 15:53:39 -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 d9f03d9842 Import xdate javascript library.
(imported from commit 6a9344a07672c377f38d29f6d8a5d866684c8456)
2012-10-05 15:42:54 -04:00
Tim Abbott fc71233b9a Show the sender line again if there is a delay between messages.
(imported from commit fffdb5d5fb5804c44af24e8e8037a7b4af14833a)
2012-10-05 15:42:54 -04:00
Waseem Daher 0c3ace82d5 Use throttling on our handling of scroll events.
This actually is a bit cleaner than our last approach,
because (I believe) we run our scroll handler code
even after the final scroll event, which prevents the
pointer from getting hidden by rapid scrolls.

(imported from commit 3bde4e8f067cd2406f90c04425c6e4ffb81ea784)
2012-10-05 15:39:10 -04:00
Waseem Daher 8333d44f31 Add jQuery plugin: throttle-debounce.
Minified version from
http://benalman.com/code/projects/jquery-throttle-debounce/docs/files/jquery-ba-throttle-debounce-js.html

As found on http://ejohn.org/blog/learning-from-twitter/#postcomment

(imported from commit 6a64017aeb93eacc524d9726f0d3c6baddca8828)
2012-10-05 15:39:10 -04:00
Tim Abbott 38c76266bf Escape pound sign before running markdown parser.
(imported from commit 418f4f76c579b5db9ec7f30cfc92c3f815323756)
2012-10-05 14:59:23 -04:00
Tim Abbott 9cfa8a868f populate_db: Read from the correct messages log path.
(imported from commit ec7ef103ddf06cdc89c02659ceefcab1f64c89e4)
2012-10-05 14:59:23 -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
Waseem Daher 10adfee7b0 Clicking "New Message" no longer resets your position on the page.
The issue was that our 'button' was actually a link with href='#',
and we didn't actually cancel the event; so it jumped to the
top of the page.

(imported from commit e66decb3a202ea22176ec539a1ec1d405faf0117)
2012-10-05 14:52:46 -04:00
Jessica McKellar 7a88fd71e6 Fix broken math for scrolling at the top or bottom of a stream.
(imported from commit 2ba6ab58800b86cd5b31a1b6e235c0be51d985c1)
2012-10-05 14:50:28 -04:00
Jessica McKellar 3166921057 Implement Barnowl-style pointer centering.
This keeps the pointer in the middle 3/5ths of the screen and
asymmetrically handles going above or below those bounds.

(imported from commit 9a6033f53365e6d6cd8f82eb096af849e3b22542)
2012-10-05 14:50:28 -04:00
Waseem Daher 0eb6817d6b Remember scrollbar position as you switch tabs.
(imported from commit d71112acd81901fd5e6c6d8ddfae3c9f0a8ff4db)
2012-10-05 14:25:27 -04:00
Waseem Daher 32758e2e4b Don't have scrollhandler fire when the 'home' tab isn't active.
(imported from commit 242591730e5ce108c511e4eeaad7589d768b1b94)
2012-10-05 13:35:23 -04:00
Waseem Daher 6d37154a36 Better, but still not great, small-window behavior.
I'd like it to ultimately be the case that if you make the window
too narrow, the menubar goes to the very top and has small icons.

(imported from commit 0a5fe548d4d848c0358c9780df7af1fe1abc93fa)
2012-10-05 11:50:40 -04:00
Waseem Daher c59cb40a71 CSS cleanup.
Try to adhere to Bootstrap grid system a bit more consistently.
Unstyle subscriptions page for consistency.
Still not sure why the "affix" jumps when we switch to "Subscriptions."

(imported from commit 1c28de4e2ef3d6ed3d1bdcfd143eadefba2b46cb)
2012-10-05 11:50:40 -04:00
Tim Abbott 6a7ce4cfe8 Comment out instance validation until we figure out what we want.
(imported from commit a1c22f9744f28635c67602a682bdb00cba0037ae)
2012-10-04 18:11:12 -04:00
Tim Abbott cfc78d6631 api: Clean up code duplication and add automatic retries on 503s.
(imported from commit 5c0654d1048a97a0f451c560544266a4261d9426)
2012-10-04 18:08:20 -04:00
Luke Faraone 8fc22ab5b4 Clicking on a zsender should populate the stream box, too.
(imported from commit d933053c9b081457cb523d90fee4daa0cc65fae1)
2012-10-04 17:59:04 -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
Tim Abbott 33a5157afd Rewrite API to use the Python requests library.
(imported from commit 314cf906eb25ea46f580ca70852b9d3478531229)
2012-10-04 17:25:58 -04:00
Tim Abbott 6895ae7c7a Forward messages with non-null non-ping opcodes.
(imported from commit 4b1a8749f05624891f4d9996188e9597eeb234f1)
2012-10-04 17:25:58 -04:00
Keegan McAllister 8bf693224c Fix up attributes on links (whether auto-linkified or not)
(imported from commit cf362db2a2c9500f62b03a89055ac4585ba00a96)
2012-10-04 16:52:10 -04:00
Keegan McAllister b8fb58968e Implement conservative linkification on the server side
(imported from commit 970bcb4adf980d386442602fbb6297919fcee4d9)
2012-10-04 16:52:10 -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
Keegan McAllister 3e57097ccc Exclude test-settings.py from check-all
(imported from commit d12d38b85846fa5ea42f123dd81674ae85e92667)
2012-10-04 16:50:27 -04:00
Keegan McAllister 70482d032d Put the 'import *' back into test-settings.py
This broke the test suite, which expects all settings to exist in this file.  Whoops.

This reverts commit e4108333c53afb0caf55348837b739cb7e5510dd.

(imported from commit e6b58004059e834d4e30ea9c63463eb84179cc1e)
2012-10-04 16:49:26 -04:00
Luke Faraone 8f81dc5670 Changing your gravatar should be in a new window.
(imported from commit 4877bcdfc1ad2b0597a13078816c39a8768bcd71)
2012-10-04 16:46:20 -04:00
Tim Abbott 12ea2895ea Add a json_success style result to updates responses.
(imported from commit 6492f98f1e1f5b7622caa2f3427ae60bdfd3df0e)
2012-10-04 16:38:44 -04:00
Tim Abbott 27fdb10cbd Return clean invalid user errors using the API.
(imported from commit 2f1687cbe8797ce42e66b340e87400720acd4054)
2012-10-04 16:38:44 -04:00
Waseem Daher 738fe500f0 Unbreak settings/subscriptions windows with some div cleanup.
(imported from commit 427ead3b0cb6ddaf399394ca6c3e363cc8264efe)
2012-10-04 16:35:53 -04:00
Luke Faraone c3a9d60741 Partially fix a test that wasn't actually setting a variable.
This still doesn't work for blocking reasons, but that's a TODO for later.

(imported from commit 8a1ebb5d0d964be95c9f458c254ef5767526bb24)
2012-10-04 15:59:15 -04:00
Waseem Daher e28373ec13 Properly handle refocusing pointer on both scroll and mousewheel events.
When you're at the top of the page, you don't get scroll events
anymore if you're scrolling with a mousewheel. So we need
to listen to mousewheel as well as scroll.

(Why not *just* mousewheel? Because then the scrolling done by
 PageUp and PageDown no longer causes the pointer to refocus,
 because those trigger scroll events.)

(imported from commit 4ee23004f6e090abaabb836f0a9d7b59d0394ced)
2012-10-04 15:47:21 -04:00
Waseem Daher 93dbb21aff Prevent glitching on scrolling.
This duplicate call to scrollTop is the source of our problems.

(imported from commit 4374e0837d2af5eb20545449469fade7b5d47aca)
2012-10-04 15:47:21 -04:00
Waseem Daher 14daa08726 Restore scrolling behavior in this brave new scrolltheworld world.
There still seems to be some glitching when arrowing around,
which still needs some investigation.

(imported from commit 9c4d8f2b0b55fda5077e2fba70cbe4bcd50b823a)
2012-10-04 15:47:21 -04:00
Waseem Daher a436745ab6 Remove dead CSS: bottom-nav.
(imported from commit a1bcadc6933b2c2b8a5ac19f960d96592fc1ab5e)
2012-10-04 15:47:20 -04:00
Waseem Daher fe3fcd334e Remove dead code.
This code is the start of something that would make your
narrowed-on message remain in the same place post-narrow,
which is possibly a good idea.

(imported from commit 0a557d6492de470928245b33f95ae8c0102db0a6)
2012-10-04 15:47:20 -04:00
Waseem Daher 0fcec1aad9 Remove high water mark code.
(imported from commit 308148b2b54709354d219fd7c0ba1ae63f7e7503)
2012-10-04 15:47:20 -04:00
Waseem Daher c7175f5f43 Delete code that repositioned window on last message.
I believe we'll get this for free with the new version of
select_zephyr and our bottom_whitespace div.

(imported from commit 0d6c3e4d0a70e06b9b2f6e5830b3a9650e44441a)
2012-10-04 15:47:20 -04:00
Waseem Daher 59a00cb1ab Eliminate scrolling-tab.
scrolling-tab used to be used to target which tab would be a recipient
of the scroll events generated by PgUp, PgDn, etc. Since we now let
the browser handle these natively, we don't need to worry about it.

(Instead, when we hook the 'scroll' event, we should make sure that
home screen.)

(imported from commit c555d960da995a09b370867c96d17f4ce4f2171f)
2012-10-04 15:47:20 -04:00