Commit Graph

1640 Commits

Author SHA1 Message Date
Jeff Arnold 8d4ddeb57d Keep text in the compose box when another stream/subj is clicked on
(imported from commit f063c92c4378074a7b27e45787dd1591fdde98b7)
2012-12-05 13:12:52 -05:00
Tim Abbott e816604c6e Fix bug where personals might be lost in mirroring.
(imported from commit ed78ca442677f3ee8b3149d61e351f624f437d24)
2012-12-05 12:39:56 -05:00
Keegan McAllister 97bcfbdbb8 activity: Put the three tables into Bootstrap tabs
(imported from commit 508c4b15a82df969b08b430ad892c4b13ed68092)
2012-12-05 12:35:05 -05:00
Keegan McAllister c256fcca15 activity: Right-align numeric columns
(imported from commit a09e961247a8747c96f23b8468c1a0dd5a4edbb8)
2012-12-05 11:42:09 -05:00
Keegan McAllister 3032c94668 activity: Prevent cells from wrapping
(imported from commit d6f9d935b9ed32351804aa153835a171ff093e10)
2012-12-05 11:42:09 -05:00
Keegan McAllister 23eef06ed0 activity: Initially sort rows by time of last activity
Doing this on the server is somewhat easier than making sorttable do it on page load.

(imported from commit 3ed7b127ba874d674d5cfe5b102c62a74be572f8)
2012-12-05 11:42:09 -05:00
Keegan McAllister 3f5d9902ab activity: Color rows for recently active or long inactive users
(imported from commit 5acc9317085acd7b4433b24b96bdf7fdebee5380)
2012-12-05 11:42:09 -05:00
Keegan McAllister 83d86f33ca activity: Clean up table computation a bit
(imported from commit c599d7ca572010c07b457ec15a305eef7dff78dd)
2012-12-05 11:42:08 -05:00
Keegan McAllister 6efe52b935 activity: Decrease table padding
(imported from commit 90bed6ce94442e00e7516f65388b578bdfa920b3)
2012-12-05 11:42:08 -05:00
Waseem Daher f3ba899fe1 Fix responsive layout on Subscriptions and Settings page.
This was a really cute bug where our layout messes up if you resize
the page while "Subscriptions" (or to a less visible extent,
"Settings") is active.

The problem here is that we compute the size of the top navbar
based on the size of main_div -- but when main_div is hidden,
it has a width of zero!

We need to instead look at the width of the pane that *is* active.

Resolves https://trac.humbughq.com/ticket/216

(imported from commit adbef00d190845f90c5cfdb46df4ec7b703635ef)
2012-12-04 23:00:06 -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 a454417843 Prevent users from creating an account that differs only in case from an existing one
Fixes #177

(imported from commit 96c6b4c207c920ec94b5fdd69b2937a88669fa93)
2012-12-04 16:37:55 -05:00
Waseem Daher af401fe659 Fix "resizing window breaks in Chrome" issue.
Ironically, I think this might've bee introduced by
commit ca35321c02d5e79e4f9c439a662805c016a333ed,
'Fix "resizing window breaks in Firefox" issue'.

Basically, when the window is 776px wide according to
window.innerWidth, that's the width not including the
scrollbar. However, in Chrome, the media query seems to ignore the
width of the scrollbar, so from the CSS's perspective, the window is
actually ~766px wide, so it goes into condensed mode.

But the rest of our code doesn't, which causes the break.

A bit more on this browser-specific difference at:
http://www.456bereastreet.com/archive/201101/media_queries_viewport_width_scrollbars_and_webkit_browsers/

So the issue we have is, to match the CSS's behavior:
* In Firefox, we should be listening to window.innerWidth
* In Chrome, we should be listening to window.width

We fix this hopefully once and for all by using window.matchMedia --
aka the exact same query that the CSS itself uses. As discussed in my
last commit, this feature is unavailable in IE<10, so we provide a
potentially more fragile fallback, i.e. what we did before this
commit.

(imported from commit d8e6425b81c90c8e0fdda28e7273988c9bfd67ec)
2012-12-04 14:52:29 -05:00
Tim Abbott 386e9eeb22 Fix load_old_messages being called with NaN argument.
(imported from commit 32cb17c98b81a40861f3d825e17a687575f35542)
2012-12-04 14:13:04 -05:00
Luke Faraone ec0683cd86 Cosmetic fixes to tutorial page and copy.
Make it so the image is not squished, change some paragraphs into
headers, and wordsmith a bit.

(imported from commit 81295e1a8ddd4f1ecd4532c4dfb8a38467bb530e)
2012-12-04 13:12:01 -05:00
Zev Benjamin bc67d9d1d7 Prevent race during get_updates that can cause clients to miss messages
This fixes #174

(imported from commit d900957e468815bcb99de67d570dfd7ce4413220)
2012-12-04 12:44:44 -05:00
Zev Benjamin f4898ea490 do_send_message: use JSON for the user list instead of joining/splitting with commas
(imported from commit 85d94ca647d0e6707f4f96e2b7a7b330f76db9d9)
2012-12-04 12:44:44 -05:00
Zev Benjamin 2907c3ca01 Create the Message and associated UserMessages in the same transaction
(imported from commit 96daa925142c97e34e68fae8e4bef713731b4173)
2012-12-04 12:44:44 -05:00
Waseem Daher 3867cc3fe2 Add a "tutorial" page at /new-user
This is an interim strategy for user education that'll be a stopgap
until we build something in the app itself.

(imported from commit 9022d4ceffca98e127f7045f73c012857fe6fc54)
2012-12-04 12:05:56 -05:00
Waseem Daher 3d69853784 Shrink inline gravatars.
This causes our deploy message to be less huge.

(imported from commit 5649eb42df0429a6bbaf8c8fd6f8048a66d22aa8)
2012-12-04 11:28:52 -05:00
Tim Abbott a289efb425 populate_db: Request a new DB connection after run_parallel.
This is the only code change needed to make our code
postgres-compatible.

(imported from commit a94ad0856c46ead2892674fe18d86d49876a6160)
2012-12-04 10:59:26 -05:00
Tim Abbott eea553ce40 banish_broken: Fix handling of jesstess|MIT.EDU@mit.edu.
(imported from commit 50e596261dc678a1aa4b28bec34a6f592c8dc748)
2012-12-04 10:59:26 -05:00
Tim Abbott d850bc764f Fix stream name case issues in populate_db.
When we changed our stream name model to treat stream names as
case-insensitive, we didn't update populate_db to do the same.

This commit makes that update, which is to use the lower-cased stream
name for dictionary lookups and deduplication, but the original-case
stream name for actually creating streams.

(imported from commit fc32ec75a5ae286bce7ec86c6e6fb6893888cbd0)
2012-12-04 10:59:25 -05:00
Tim Abbott cf31374497 bulk_create_streams: Fix missing select_related().
bulk_create_streams was taking about 10 seconds to run with prod data;
this should be a basically immediate operation.  The cause was a
missing select_related on one of the loops through all streams.

(imported from commit 8b82f0c41facc3999bb699dbc350708ac69797e9)
2012-12-04 10:55:31 -05:00
Tim Abbott 2ad1b14f23 Set zephyr_mirror_active to False for new MIT users.
(imported from commit ffa0513561c994da1b561c0ad50728b8351e22e8)
2012-12-04 10:55:31 -05:00
Keegan McAllister 7907be735e hotkey: Make Enter an alias for 'r'
(imported from commit 9bf1b97304a4a4c1100826fefbba8edf1e4cff12)
2012-12-04 10:52:44 -05:00
Jeff Arnold f014163aed When narrowed, we want to load messages older than the oldest message
in the narrowed view, not messages older than the oldest message in
the home view

Tim provided most of the code for this patch

(imported from commit ec0bbfd344cac351f56a456fc560848603721135)
2012-12-03 15:58:26 -05:00
Jeff Arnold 5ea4e30caf Proprely handle get_old_messages when narrowed to personals with yourself
(imported from commit 3ace5655d093f4568b4dea512a6e1bbbd6245f10)
2012-12-03 15:58:26 -05:00
Keegan McAllister f61c26c361 preventDefault for modal mousewheel events but not e.g. subscriptions tab
Fixes mousewheel scrolling on the subscriptions tab.

(imported from commit 38d214fd53a478f3076dbfa4d7942ff13ec61369)
2012-12-03 15:35:46 -05:00
Keegan McAllister 2401fab25c Replace home_tab_active with home_tab_obscured
(imported from commit fb8c47079e63594a22c3d47fcf373887bda6e499)
2012-12-03 15:35:46 -05:00
Jessica McKellar c9c94c6696 Add unit tests for subscription color requests.
(imported from commit 6eeeefcfe75b78d36cd94c4d02ca3a1f1a3df3ac)
2012-12-03 12:46:27 -05:00
Jessica McKellar dbcd6684a2 Add error handling to subscription color requests.
(imported from commit b2f65feeb44abe37397de88c616fa1aa01cf8277)
2012-12-03 12:46:27 -05:00
Jessica McKellar 55e68fc89a Log subscription color changes so they can be replayed by populate_db.
(imported from commit 5c7f46ed0d727926e9819cb2d71eb31f241e2e34)
2012-12-03 12:46:27 -05:00
Jessica McKellar 2fd3eb521c Refactor colorizing requests into a subscription properties model.
(imported from commit da4bfee4a12e941d4ec4c9f140973bb138c82c93)
2012-12-03 12:46:27 -05:00
Jessica McKellar 1dbb2c6ed5 decorators: split authenticated_json_view into POST and non-POST versions.
(imported from commit cdcfdb51c379c07e94ebc763cf925e6a73747fc0)
2012-12-03 12:46:27 -05:00
Jessica McKellar 6a316daee8 Add frontend support for colorizing streams.
(imported from commit 48395ba915d6b22d8a7a8c7fbfb5e462680cef09)
2012-12-03 12:46:27 -05:00
Jessica McKellar 505d35ac9b Add backend support for colorizing streams.
This includes JSON requests to fetch and set stream colors.

(imported from commit 92e19c9a3b72e9012df0178348068ea033b5f060)
2012-12-03 12:46:26 -05:00
Jessica McKellar 71371823f8 [schema] Add a StreamColor table.
(imported from commit 2906c30ad326373bc6265bf30dd0a70e11d69c7d)
2012-12-03 12:46:26 -05:00
Waseem Daher f71affdc11 Layout for colorizing streams.
(imported from commit 50d359ed44f46a0c666778bf510dafbb3e6e6f97)
2012-12-03 12:46:26 -05:00
Waseem Daher bbd2ea4c5a Add spectrum.js (color picker).
(imported from commit 7d25ecab2cb0126df0f165b6cce42a3b266b772c)
2012-12-03 12:46:26 -05:00
Tim Abbott 988b0ce7ba Fix missing transaction decorator in get_user_activity.
The transaction.commit() line inside the except IntegrityError clause
doesn't work unless we've entered transaction management.

(imported from commit 2ae520e05c9a19ec35af7c244631b01d4b9598d6)
2012-12-03 12:30:13 -05:00
Tim Abbott 79f8e2a6a3 get_public_streams: Return only streams someone is subscribed to.
This makes subscribing to zephyr classes for the zephyr class
mirroring bot a lot faster, since we don't need to subscribe to the
third of our streams on which no users will actually receive messages.

(imported from commit 029b7fb260b480db5599e3c9f9effc502f6d8b59)
2012-12-01 09:36:36 -05:00
Keegan McAllister aeb64959dd exunge_log: Ignore default_streams entries
(imported from commit e7b2cd62be0ba868498db286e9e1671441bf07e6)
2012-11-30 17:24:37 -05:00
Keegan McAllister 3715583d29 Implement a command to expunge old UserMessages and Messages from the database
(imported from commit a4873dfa8737c483411d12f30daaebebebf859f9)
2012-11-30 17:24:37 -05:00
Keegan McAllister c8b6e72cbf Implement a command to expunge old entries from log files
(imported from commit 28bc40bf12dd8cea0ff9b842f72e7713640e55a6)
2012-11-30 17:24:37 -05:00
Keegan McAllister 5caf67f27d Implement a framework for data retention policies
And add customer1.invalid to it.

(imported from commit 32b0293bc48abf5d9a3bd36f14f6b16d48ea6ff2)
2012-11-30 17:24:37 -05:00
Keegan McAllister 36816c46e2 Add a function to remove all Messages that are not referred to by any UserMessage
(imported from commit cdad013aed0fd8d1bc6ec8c2dcf5905390a01339)
2012-11-30 17:24:37 -05:00
Zev Benjamin c5bf05ad0a Make clicking on 'Find <search term>' work
(imported from commit 756bd6cb3533e985e031954ece9228a146c5160e)
2012-11-30 17:03:52 -05:00
Zev Benjamin 0af3199d7c Desynchronize web client reloads
(imported from commit 216df5996f597ccd47bbc80e3f2fdaae751789d0)
2012-11-30 15:04:46 -05:00
Zev Benjamin 46f4a5eb38 Add util module
(imported from commit 3844e136fb799c6f57f8823255addf00a07ef686)
2012-11-30 15:04:46 -05:00