Commit Graph

818 Commits

Author SHA1 Message Date
Zev Benjamin c4d35280ea Make Message's display_recipient field be an object with consistent names for both personals and huddles.
(imported from commit 8b00f16b036ed3fb3f7d56e7393271ec1d458ea5)
2012-10-12 11:34:42 -04:00
Tim Abbott afee537a95 Don't allow users to subscribe to too-long stream names.
Also check for invalid characters when subscribing via the API.

(imported from commit c4730ecb360607c4da264cb1c4b2f9daa2cef293)
2012-10-12 10:48:41 -04:00
Tim Abbott 091bc48926 api_subscribe: Check for too-long stream names.
(imported from commit 20d94eafeb333a9bc09b6b20093e13fd1b241ea8)
2012-10-12 10:45:53 -04:00
Waseem Daher 22099dfe9f Fix scrolling bug related to resize.
When Bootstrap shrinks the divs down into 'tablet' mode, our selected
message might end up being even lower in the screen than it was before
(because more text wraps). But our scrollbar does not automatically
advance to keep it in view -- so we do it manually.

This implementation is a little hackish in that it does some
unnecessary recenter_view-ing in big views (which can be a touch
disorienting) to optimize recentering on resizing for small views.

If that behavior is annoying, we can deal with it by being
smarter about when we trigger the recenter code.

(imported from commit 6834e11f7a37833982c388f15174df661d7f55b3)
2012-10-12 00:17:24 -04:00
Waseem Daher 23cc654847 Condense name and email when we have a very narrow window.
When the window is narrow, vertical space (particularly in
our navigation menu) is at a premium, so let's be more
parsimonious.

(imported from commit 72628827bc108f4d9f2d47a11c48e0e772b769d4)
2012-10-11 23:10:48 -04:00
Waseem Daher 04b0000d83 Embarrassing typo fixes.
(imported from commit 0ea86386e3d4269be63610f4729b1f1762cdc0b7)
2012-10-11 22:49:18 -04:00
Waseem Daher 1c14c461c2 Small "New Message" button when we don't have lots of room.
(imported from commit 58f2bdf0aafec7714d0f3a9be99f953dd8b237b3)
2012-10-11 22:44:28 -04:00
Waseem Daher 3853bf6dd8 In case we start out very small, trigger resize handler on page ready.
(imported from commit b3492eee7299e89ded422527facf9c8e44421c73)
2012-10-11 22:44:28 -04:00
Waseem Daher 7d155850a9 Have the navbar,composewindow,narrowbar look OK in small windows.
(imported from commit 724ecfee79a263919e93c47513332ffdd3c6d286)
2012-10-11 22:44:28 -04:00
Waseem Daher 31840811cf Cleaner HTML for the sidebar.
(imported from commit 2b630a6a37b634e29f0eb90368e9d174c1af3bc2)
2012-10-11 22:44:04 -04:00
Keegan McAllister d19d3d2bd7 Hack around Markdown parser failures for now
(imported from commit dba079d444d40e36c91508b86b243bdc805c6222)
2012-10-11 21:45:22 -04:00
Keegan McAllister eab84fa195 gitignore zephyr/tests/zephyrdb.test
(imported from commit 755213afd778829a6d3f77a4232b9947b5f01c4a)
2012-10-11 16:25:40 -04:00
Keegan McAllister 3ca3be297e Disable Markdown heading markers by padding with spaces
Because # will display literally now.

This still fails in some cases, such as

    > # foo

(imported from commit 40654a4f1dac940ba131f2a104440b6ecb7eafd1)
2012-10-11 16:23:18 -04:00
Tim Abbott fc99d2983a Add an API call to subscribe to a list of streams.
(imported from commit 0a5d46d5f54fb4c8ebfad8c9adb777c0b4938dfa)
2012-10-11 16:20:45 -04:00
Waseem Daher 04c631fd24 Don't let timestamp float over other content.
Before this commit, the timestamps are higher than the narrowbar,
on the z-axis, so they slide over it as you scroll.

As a philosophical aside, I almost wonder if the timestamps should
live in their own table row, that way they can't possibly overlap
with the message bodies. (This would require reverting Tim-style
sometimes-show-date-and-time timestamps.)

(imported from commit 0c59f1feacebd59b88e76bf056d96e05159d2937)
2012-10-11 16:15:19 -04:00
Waseem Daher 97daefee1c Responsive compose window.
(imported from commit 432223391cf158a6c8902370a911a08fd3179401)
2012-10-11 16:15:18 -04:00
Waseem Daher 601488e7df Make the narrowbar responsive as well.
This is one approach, anyway. Another is to keep it inside
message_list, which is what we (currently) do in the composebox.

(imported from commit 64c69b931012e3d21b7a10e3909f7a13f7dcfc4f)
2012-10-11 16:15:18 -04:00
Waseem Daher f13a257087 Make main message area respond better to resizes.
Paradoxically, life is better if we specify a max-width rather
than a min-width!

(This has the side effect, though, of sometimes having our message
boxes, etc. be ~548px rather than 640px, but philosophically
it's kind of nice if that all scales nicely).

(imported from commit 7f41c147b727348a148197c74b299cb31636f83b)
2012-10-11 16:15:18 -04:00
Keegan McAllister 0a0bd31407 Remove unused strip_html
(imported from commit 21747b9b5cbbe7b1935905fc9254f4de64db20aa)
2012-10-11 15:01:54 -04:00
Keegan McAllister 2c3d7d6116 HTML-escape messages on output
(imported from commit f199fddf887ffbd22ebac76448accb4c48b64a24)
2012-10-11 15:01:54 -04:00
Keegan McAllister 3fadaae574 Don't escape message metadata as it enters the system
(imported from commit b98deb3dcdc389b079055a06ffafaf138bc79c70)
2012-10-11 15:01:54 -04:00
Keegan McAllister c06aa1a3da Don't escape user metadata as it enters the system
We believe that our output escaping is sufficient.

(imported from commit 4c9d4d79682ef5689bc1eec12a3bbcc34de013a4)
2012-10-11 15:01:54 -04:00
Keegan McAllister 7137787984 Escape variables interpolated into <script> within index.html
Django's escapejs prevents breaking out with an embedded </script> tag.

It only works on bare string contents, not JSON-ish lists and such.  So we
generate stream_list and people_list with template loops now.

(imported from commit 07fe4bebaa3fa11bc479b4378b8989560ce77f6f)
2012-10-11 15:01:54 -04:00
Tim Abbott 83f494b1a4 Add API queries to show public streams and the user's subscriptions.
(imported from commit 5f24e35a9bdd1e40406e2acb0c3713a6517d139b)
2012-10-11 14:43:23 -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 9811bd5f8a Get UserProfile by email with a join, not two queries
(imported from commit 0698ebb88615cea54196181aeabe869ec466dbc1)
2012-10-11 14:05:53 -04:00
Tim Abbott 676e650a08 Fix mit_sync_bot bug causing constant API requests.
(imported from commit dfa845b98a7e22ee69a9589b8b98ac5a49077793)
2012-10-11 13:00:50 -04:00
Tim Abbott 2de4d1d448 Add social and test to default subs added after DB dumps.
(imported from commit 828c733c9f5d1bdd5fc0aa2e162b800f8db7b22f)
2012-10-11 11:53:57 -04:00
Keegan McAllister 5a7ff70c11 Remove obsolete views
This functionality is part of the home view now.

(imported from commit 5f0327eb62840bf98af49566e6f3c0b86ca43b8d)
2012-10-11 11:23:22 -04:00
Keegan McAllister 48ec15c46d Don't duplicate realm query when registering
(imported from commit b1e3b7144f564c5b2fc23fbf548bf0672deb2932)
2012-10-11 11:08:52 -04:00
Waseem Daher 97e3c36d4b Experiment: Color huddles a little in an attempt to make them stand out.
(imported from commit be19446631831a4fc13cb8bf758902ea9f8304ae)
2012-10-11 10:40:28 -04:00
Tim Abbott eb63177a56 Fix timestamps in logging
(imported from commit c23570fa00ea682681a0065ffddd86670e5c59af)
2012-10-10 21:34:57 -04:00
Waseem Daher 4f8df0c32e Make navbar look a little more visually distinct.
In preparation for maybe changing the background color.

(imported from commit fbab4bfcbdb4067b13eec9ea48e63966abb92a71)
2012-10-10 19:04:11 -04:00
Waseem Daher d35b4f7dbb Add a little padding to the left of the message stream.
(imported from commit 186436195b16588ac11f249162089b860dcbf898)
2012-10-10 18:26:01 -04:00
Tim Abbott a5a8a07370 Increase the maximum instance length to 60.
(imported from commit e1d79e059324be03ecb84d1bdd93f83bcc4a1a8d)
2012-10-10 18:19:38 -04:00
Tim Abbott 4c4cca0945 Fix removal of stale zephyrdb.test files.
(imported from commit 2f3f8b1f05d43ed2fe9e3b5427f0be2e2b05b51b)
2012-10-10 18:13:45 -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 8dca315a18 Rename s/class/stream/ in code local to various js files.
(imported from commit c441f9d7d4155ff3c4b171a2a4a3db4ffbb60ac4)
2012-10-10 17:48:18 -04:00
Tim Abbott 0562e52974 Rename newstyle_class to newstyle_stream.
(imported from commit b5b9dc1a899c31a07c9c5eba84fd4846aeb4cd08)
2012-10-10 17:48:18 -04:00
Tim Abbott f2fef23d82 Rename classname to streamname.
(imported from commit 098bf15c39080797ea5fbc2a9dc3d5842c934eaf)
2012-10-10 17:48:18 -04:00
Tim Abbott 5509419084 Rename #class* to #stream*.
(imported from commit a8f15f636f3801ba1152f1020e885240984d070e)
2012-10-10 17:48:17 -04:00
Tim Abbott 98ba39700c Rename is_class to is_stream.
(imported from commit 6a68581c8a3ab72b13907af651a772a4a190ac40)
2012-10-10 17:48:17 -04:00
Tim Abbott 873f8fd2bb Rename class-message to stream-message.
(imported from commit fe69222bdca28bab303adca8ea8448a6aac35e40)
2012-10-10 17:48:17 -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 081f82c50c Rename narrow_class to narrow_stream.
(imported from commit 4654718c1226f7d0d945436f8dafdfa64d74c92c)
2012-10-10 17:48:17 -04:00
Tim Abbott 613010675c Rename class => stream in populate_db.py.
(imported from commit 8546b2e7823f8df0f69b317bb3c6df1a4da49537)
2012-10-10 17:48:17 -04:00
Tim Abbott 10d6106e36 Rename class => stream in tests.py local variables.
(imported from commit 9fe439a71f49dc0d03d50844dc40d4db33050008)
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