Commit Graph

1464 Commits

Author SHA1 Message Date
Tim Abbott b62d37c151 Add a few more explanatory comments for modifying the trac plugin.
(imported from commit 9995e51bcfdbe46d8211e54b692b0c4f4215f282)
2012-10-24 18:04:05 -04:00
Tim Abbott 89d3f8c2f4 Add Humbug trac plugin.
(imported from commit 4f08a4be6d2dfdb749a9084fb13be86fb406ab5b)
2012-10-24 18:00:40 -04:00
Keegan McAllister b5cc259f5b Set input/textarea font to match the rest of the page
(imported from commit 69b7d6399e6db46dc5a4f777395e3cd636427023)
2012-10-24 17:16:43 -04:00
Tim Abbott 811604021e puppet: Install requests module on servers.
(imported from commit 2aa2e5740065e9e46020cca0d22854e57e81a407)
2012-10-24 16:24:02 -04:00
Keegan McAllister 26c97729d4 bugdown: Generate HTML, not XHTML
Our pages are declared as HTML5:

    <!DOCTYPE html>

The markdown library only supports HTML4, but that's probably closer than XHTML.

(imported from commit c78be9ae9bccf029def8d94d3647b0ccce8b2252)
2012-10-24 16:02:15 -04:00
Keegan McAllister ab34200648 Make sure that Markdown rendering really happened, if requested.
This is a security issue because it's where we escape HTML.

(imported from commit 10dea1899eb6d7e0e40128ae1a4787abad38fa73)
2012-10-24 15:43:46 -04:00
Keegan McAllister b30b5f396e to_dict: Include the content type with each message
(imported from commit 413ce08029832c6bed2a43f27a1caf809fb962b6)
2012-10-24 15:43:43 -04:00
Keegan McAllister 734411369b format_updates_response: Default to apply_markdown=True
It's the safer default to prevent introducing XSS holes.  And in our current
code, we always provide this parameter.

(imported from commit 73897f5315ba54a5d3fa95dd19efb9d20c081a8a)
2012-10-24 15:32:12 -04:00
Keegan McAllister e8dfb41f70 Return messages from return_messages_immediately, rather than calling handler.finish
(imported from commit 0da3356c6712614cf1816d330b891e8f6d13bac7)
2012-10-24 15:32:10 -04:00
Keegan McAllister 7da2ddea8e Reorganize to[_log]_dict
(imported from commit 2f811cf6a42e5b5661679158c0053dd4ebb40dbd)
2012-10-24 15:07:14 -04:00
Tim Abbott 75d150efc7 Fix being unable to send messages with a trailing comma in recipients list.
(imported from commit 5c075c4aa1da8c2a153b33ed4d061fac88de48e7)
2012-10-24 14:25:55 -04:00
Keegan McAllister 9e7e4fda91 Explicitly size Gravatars in message bodies
Should make the page jump around less on load.

(imported from commit a4b52a545b84117d149a2d5852ea0ddb71862748)
2012-10-24 01:02:10 -04:00
Keegan McAllister f3f9fb545d Narrow by recipient when the user presses 'S' on a huddle
(imported from commit 7e7c3d27b0824a60f7e8379c282ec05704d842f6)
2012-10-23 23:04:42 -04:00
Keegan McAllister 8fa0e687ae Disable manual compose box resizing
Vertical resizing is controlled by Autosize, and horizontal resizing is just
weird.

(imported from commit ff0b0e5d26678abfad1bec82fb5cf17b846160eb)
2012-10-23 22:20:13 -04:00
Keegan McAllister 143665a22c Enforce a maximum compose box textarea size
The Autosize plugin reads and honors this value.
Nicely done, Autosize plugin!

(imported from commit 554149afd7cc6cd436590bd8c5ef77608645ea07)
2012-10-23 22:13:52 -04:00
Keegan McAllister 899e6d1042 Resize the compose box on show
It doesn't work to do this immediately after we clear the contents, for some
reason.

(imported from commit b24e2464afc7a4703d4a679ab0b51ac150f1ce89)
2012-10-23 22:08:47 -04:00
Keegan McAllister b976aa621c Set a starting height for the compose box
(imported from commit a70a473523a2ab97996230ecf29e3ecd86341246)
2012-10-23 22:08:47 -04:00
Keegan McAllister af065005fc Automatically resize the compose box
(imported from commit 7e9cb632bdca47fee6ad0897a55d1d3c004c34b3)
2012-10-23 22:08:44 -04:00
Keegan McAllister 3c4ddfdaf9 Import jQuery Autosize
http://www.jacklmoore.com/autosize

With line endings converted to UNIX format.

(imported from commit bb23cb01a9587df842af60e67dd85bf34abab9c0)
2012-10-23 21:49:24 -04:00
Keegan McAllister eaecaab7f4 Rename narrow.all_personals -> all_huddles
(imported from commit 6258ddd1548b6ee8cf20c28c9b18e229ebf4e720)
2012-10-23 20:43:23 -04:00
Keegan McAllister f0bebe1cc0 Change 'p' hotkey to 'h', for 'huddles'
(imported from commit 3415f1d3f679be41cb5b92827036b09829a99734)
2012-10-23 20:41:54 -04:00
Waseem Daher 8ce8a083bb Slightly hackish way of stripping out &nbsp; in narrowbar tooltips.
(imported from commit 414738408cd1e4e53f0268b0851c903c6a1a9eda)
2012-10-23 20:30:58 -04:00
Waseem Daher feff1d811d Allow icons in narrowbar without putting their HTML in the title text.
Before this commit, a hover read "<i class='icon-whatever'></i> All huddles with..."

(imported from commit e5a20678b87355d6709ec3b8776469114c92b2f6)
2012-10-23 20:21:51 -04:00
Waseem Daher 689014fe23 Don't allow userinfo popover contents to overflow.
In particular, long email addresses.

(imported from commit 3ee9121c577e01277ac7888bed13bdb654ef77b9)
2012-10-23 20:18:20 -04:00
Keegan McAllister f31526e37e Set tab order on the compose box
The order is:

    - Stream/huddle selector buttons
    - Stream name or huddle recipients
    - Subject (in stream mode only)
    - Body
    - Send button

In huddle mode you can't Shift-Tab back to the selector buttons.  I'm not sure
how to fix this.

We leave gaps in the numbering, BASIC style, to simplify future changes.

(imported from commit 562742c8e7d31620eac3ef171397d830b5eb3bb8)
2012-10-23 20:03:24 -04:00
Keegan McAllister 718018bbf6 select_message_by_id: Fix return value when already selected
(imported from commit c86509f6cf040d6acb771764d7fe2b40afa72fe3)
2012-10-23 19:34:54 -04:00
Keegan McAllister 20ae526963 [third] Bootstrap: Slightly lower threshold for widest responsive layout
...from 1200 to 1180 pixels.

The monitor I use for Humbug is exactly 1200px wide.  With the scrollbar I come
in just under the original Bootstrap threshold, so I get a scrunched-up nav
sidebar next to a bunch of empty space.

It's annoying to do this in our own CSS because we basically have to duplicate
the whole @media block to make everything fit together.

I don't love editing third-party files like this, but if it gets reverted by a
later update, the consequences are minimal.  If we have important hacks like
this (or just a lot of them), we should decide on a better way to manage them.
For now I have just tagged the commit subject with "[third]".

(imported from commit ef3022b7eb0fdfc8862083bdbb1fb805fbeba2c7)
2012-10-23 18:31:45 -04:00
Tim Abbott bcfe06c69c Don't show floating recipient bar when narrowed to huddle/subject.
(imported from commit b7cbd83035292ed447a3da666df9326d75aac35e)
2012-10-23 18:29:54 -04:00
Keegan McAllister 0c477fac47 Always display the scrollbar
When the scrollbar appears/disappears, it changes the window size for the
purpose of responsive layout.  This made the nav sidebar jump around as you
switch tabs.

(imported from commit 8174a8571131ddf2b195cf9bfb5e427cd07b4378)
2012-10-23 18:13:48 -04:00
Waseem Daher 037f523990 Hide unimplemented, currently-greyed-out options in navbar, etc.
(imported from commit f33c3949979530b691743e29fb05f54808111b4e)
2012-10-23 18:07:04 -04:00
Tim Abbott f1e4a27106 Optimize populate_db's common code for setting up real users.
(imported from commit 074b30ac88101f8e00ddcb60b5b05defc0a11998)
2012-10-23 17:52:10 -04:00
Tim Abbott 1b67b6b711 Don't deliver messages to "fake" Zephyr users created by populate_db.
(imported from commit c88760a88382ffc07cf5f79f3093a2bfec429d53)
2012-10-23 17:52:10 -04:00
Keegan McAllister afdd3af1b6 Handle having no selected message more gracefully
(imported from commit ba00c012061b35dfe490bf1312b3fa78a4f6582f)
2012-10-23 17:03:31 -04:00
Keegan McAllister 0744332658 select_message: Reliably return success or failure
(imported from commit 5e6b4066bd53a9b958ec0e752550feb423e52de5)
2012-10-23 17:03:31 -04:00
Waseem Daher 0af3a0cd19 Typo fix.
(imported from commit 1ed0841b5ff5eea44ad064062942183db266d104)
2012-10-23 16:59:42 -04:00
Waseem Daher 9440c356da Don't highlight "You and" on-hover in the composebox.
(imported from commit 901b7a2a943a7e60bb71e38d3ce53180aba9c93f)
2012-10-23 16:53:25 -04:00
Zev Benjamin d4c2fd6cb6 Don't update the pointer on the server when the client receives messages
(imported from commit 54a0d10e94d2f4d39a29d4c8596bf4712c1eb45b)
2012-10-23 16:39:05 -04:00
Zev Benjamin 8a39292b5d Fix bouncy pointer from pointer updates
The previous code path was buggy.  We now do separate pointer update
checking for the cases where get_updates returns immediately vs. when
it returns from a callback.

(imported from commit f236a80cd0b94bc097dbd17f113d7a9d27368025)
2012-10-23 16:39:04 -04:00
Zev Benjamin 5ee6982a7e Use a different format function when we don't respond to a get_updates immediately
For now, the new function, format_delayed_updates_response, just
calls format_updates_response.

(imported from commit dd332125fe0d47cb3990373f74e85e64604f58a3)
2012-10-23 16:39:04 -04:00
Zev Benjamin c8dd5229ed Rename updater_session to pointer_updater
(imported from commit 7646b8e636393d64ef07d0251f8c83beecf114aa)
2012-10-23 16:39:04 -04:00
Zev Benjamin 6c4b56517f Revert "Temporarily disable pointer sync"
This reverts commit 7d8f673559ca6359923aa0bdd48edebe0955e921.

(imported from commit 32f7ad925cc4df72220a191602487620a9970f43)
2012-10-23 16:39:04 -04:00
Keegan McAllister e7746e97e8 select_message: Fall back to the last, not first, message
This seems more likely to be what people want when e.g. viewing all huddles.
Later we can get more clever and select the nearest huddle, or something.

(imported from commit 8ec1aa02c050dd25eb868b1e317d114743525c7b)
2012-10-23 16:31:05 -04:00
Keegan McAllister 37ac9d2a91 select_message: Misc cleanup
We can safely call .is(':hidden') on an empty jQuery result and get false.

(imported from commit a73932f63b8fec7c43d8603fca95adcd4f164317)
2012-10-23 16:28:40 -04:00
Keegan McAllister d34bebc584 select_message: Properly fall back to the first visible message
Our old selector here was picking up the floating recipient label, or
something.  This was breaking narrow-to-all-huddles when on a stream message --
you get no selection and the code is sad.

(imported from commit d25fab03bd6d745df6d787c0b1b6452c8c539e32)
2012-10-23 16:28:40 -04:00
Tim Abbott 7be626ff2f Run trac on top of Apache rather than the standalone server.
(imported from commit 2e9ee69a6f36b4c145d83abdf975bbe5d7ec1c7d)
2012-10-23 15:58:02 -04:00
Keegan McAllister b049749cb2 New hotkeys for narrowing
- s for stream or huddle
  - S for subject
  - p for all personals (still buggy)

We've eliminated the 'g' prefix entirely.  And the old 'g-a' un-narrow sequence
has no new equivalent, but you can still use Esc.

(imported from commit 6bdaacce9639e3f749418e06622a317937e7d014)
2012-10-23 15:28:07 -04:00
Zev Benjamin ce3ea9f019 Temporarily disable pointer sync
(imported from commit 74e6bb347e0b8c01b6450914a50448b78b9749c9)
2012-10-23 15:24:00 -04:00
Tim Abbott c5f262987f Add apache2 site configuration for trac.
(imported from commit 81d173070a449168d6d8e08a557134dbda66f2bb)
2012-10-23 14:52:04 -04:00
Tim Abbott 7079efba8d puppet: Make humbug's authorized_keys file owned by humbug.
(imported from commit 4237203722d7782cb5c479e408966494bc703149)
2012-10-23 14:52:04 -04:00
Tim Abbott 7a56448a35 Move humbug-self-signed.key to new certs directory.
(imported from commit ed8ff32739e21cca3d6173e19bb425da8a3a18ea)
2012-10-23 14:52:04 -04:00