Commit Graph

1848 Commits

Author SHA1 Message Date
Tim Abbott 8479b4f0cd [schema] Record and display whether a message was edited.
We also record the historical edits to the message in this JSON format:

 [{"prev_content": "new test message 14", "timestamp": 1369157249},
  {"prev_content": "new test message 13", "timestamp": 1369157118}]

but we don't actually do anything with the information as of yet.

(imported from commit 2d5ca449b87b33ad035ab0e076a22e150c8e7267)
2013-05-24 21:23:55 -04:00
Leo Franchi de8f43fec1 Add all unknown people to people_dict, even if they have only been PMed with
(imported from commit 01ca442127d5289a2cdfa5e9630aa928bea0b6eb)
2013-05-23 10:39:47 -04:00
Leo Franchi 98d8095391 Don't require people_dict to contain everyone you PM with
(imported from commit 003a5bf601366986c0f65d0e945d8e390ad581cd)
2013-05-23 10:15:58 -04:00
Leo Franchi 3be1acebaa Use canonicalized names when processing unread counts
(imported from commit 9a4a1d48221f10489a9dcf3ab2532b73b0c26e4e)
2013-05-23 09:56:43 -04:00
Leo Franchi c12fd08050 Use same canonicalization for stream names when calculating recent subjects
(imported from commit d934f67cb469728162b8ae48b5fc63805bf18d8f)
2013-05-23 09:56:43 -04:00
Allen Rabinovich f69762e612 Modify message box layout and spacing.
* Modify the narrow icon in FontAwesome to make it better align to the pixel grid and display well on Windows+Chrome.
   * Move the message controls to the right
   * Hide the message info icon until the message is hovered / selected
   * Switch the star to a gray version
   * Increase the size of the gravatar
   * Adjust the spacing
   * Add the right-side message pointer
   * Fix private message background colors and mention colors
   * Modify star count test to account for new stars
   * Bug fixes for stream subscription messages and other miscellanea.

(imported from commit 3d3d9de7e03f3658c5c78b492051b2b7f795487d)
2013-05-22 21:55:15 -04:00
Steve Howell 7cdbb0e6b0 Make auto-scrolling less aggressive.
This goes back to only scrolling by the size of the new
message, and it avoids scrolling in certain use cases.

(imported from commit f9e6380b779bb21283ba889715712b6b51633838)
2013-05-22 18:22:09 -04:00
Leo Franchi 2ea52d4200 Don't cut off the empty feed noticed under the tab bar
(imported from commit 1cb77a077665f821df1b62a544ee3652a7560b82)
2013-05-22 18:12:50 -04:00
Leo Franchi 3b7ddd72cf Don't throw an exception if we get an undefined stream
(imported from commit b6bbaf1fa14bec5fc43016f81e15caa32a9fb948)
2013-05-22 18:12:49 -04:00
Zev Benjamin 991630c031 Record basic versions of the operators used in narrows for metrics
(imported from commit 5c7cb3a62ebf0b2c1f0d8e9cae8d845cde9baf56)
2013-05-22 16:20:48 -04:00
Zev Benjamin 2ab5c7dd76 Fix race involving mixpanel load order
Previously, we were referencing the mixpanel objects only once, at
page load time, which meant that there was a race between metrics.js
loading and mixpanel completely loading.  Mixpanel starts with stub
methods and then replaces them once it fully loads, asynchronously.
If metrics.js ran before mixpanel loaded, we'd end up wrapping the
stub methods instead of the real versions.  Adding a layer of
indirection ensures that we always get the right method.

(imported from commit 6a8cfbf249168443956895b7a7e29bf7bb4222aa)
2013-05-22 16:20:48 -04:00
Tim Abbott d8527057d4 Fix compose to stream button in actions popover.
I apparently screwed up my check for whether we were using the old
data-name field, and switching the other stuff to use data-id (which
is needed for the color stuff) is probably not worth it.

(imported from commit 1b925bbcca5beb5dc9dadbcf703cbb07ca511a0c)
2013-05-22 14:38:44 -04:00
Tim Abbott e5e53747f5 Shrink the streams page rows slightly.
I think they look a lot better when sized so that the
Subscribe/Unsubscribe button and the labels on the left are both
centered within their respective rows (and also within the blue
regions that hovering over the row displays), and this seems to cause
that to happen within a wide range of font sizes.

(imported from commit d586aecee4b16540ad480509b5b888bd8de02cf0)
2013-05-22 14:21:26 -04:00
Tim Abbott a34d640eb3 Rename message_edit.cancel to message_edit.end.
(imported from commit 5c720100afbf1e86c09eb2567f465c42353f95ec)
2013-05-22 13:04:37 -04:00
Tim Abbott e68c6bb1da Fix race where message editing might be cancelled after rerendering.
(imported from commit 989f1eace526d351cdbd9e15de594964de09a770)
2013-05-22 13:04:32 -04:00
Tim Abbott d0df3d9b37 Revert "Fix that you have to save an edited message twice to complete the edit."
This reverts commit 87226d857845c6f16cb3bc0d6ab5bb748aca5987.

This meant that if for some reason there's a server error or network
failure trying to send in your edit, your changes are silently lost.

(imported from commit 2b5d19716fef1565b061a2b6c7cecc54f183b6f3)
2013-05-22 13:04:32 -04:00
Tim Abbott 4f464d4a5d Be more explicit about which stream in left sidebar popovers.
It's not as clear as it could be which stream you clicked on from the
location of the popovers, so it's worth making the popover clear about
which stream you're modifying.

(imported from commit 289b2e70eab582f4ec12d62410e095fd632f6582)
2013-05-22 12:10:16 -04:00
Tim Abbott 67f84b06f7 Add support for changing colors in the stream popovers.
(imported from commit 30593148500a78c36baec87af5868d8c5a173d96)
2013-05-22 12:10:16 -04:00
Waseem Daher 7ead4c4a1f signup: Make postal stripes work in Safari.
(imported from commit dcafc608ea0b818f3a58e795de4d1c98abe2d493)
2013-05-22 11:32:19 -04:00
Waseem Daher d0bda35911 signup: Add postage.
(imported from commit 826a3d7e9996ccd5c27f44d00572a4a51ea893a5)
2013-05-22 11:32:18 -04:00
Waseem Daher 6656869a92 signup: Rotate through cute placeholder names.
(imported from commit 59c1523d35cd80e904a173fefc614da2543b391d)
2013-05-22 11:32:18 -04:00
Zev Benjamin b565b2adc9 Add a bunch of debugging support for mixpanel
Currently, some browsers don't seem to be sending metrics information
to mixpanel.  This commit will make said browsers noisy, but should
help debug what's going on.

(imported from commit c5050f66d985eb76e38117b2668594fedfc10702)
2013-05-22 10:43:57 -04:00
Zev Benjamin 10dbfd0985 Record narrow metrics
(imported from commit d312115d384dd1f33e05dcd1b3f1dadc86e3fdf3)
2013-05-21 17:56:49 -04:00
Zev Benjamin d35c8f0c81 Track what user action triggered a narrow
(imported from commit 2b110dc27334e4b823810bfef13c3d10d36b3886)
2013-05-21 17:56:49 -04:00
Zev Benjamin d1ac16ee3f Record compose metrics
(imported from commit 194a7d36650cf3e1e52f0dad3f453942179de122)
2013-05-21 17:56:49 -04:00
Zev Benjamin c60a500a8f Track what user action triggered a compose
(imported from commit 3e23dd1f7e9e3a742b0c3b9e1b0eeb85cfa4c736)
2013-05-21 17:56:49 -04:00
Zev Benjamin a4bda36ab4 Add a wrapper to mixpanel so that we can selectively enable metrics collection
(imported from commit 1d72f2e98c4c756a8a988d08731282e4195b8e1a)
2013-05-21 17:56:49 -04:00
Waseem Daher 179b9a7e1f Make our landing page look good on wide monitors.
Constrain the meat of the page to the center 1440px or so.
This is achieved in a slightly more hackish way than I'd like,
but I think it's mostly necessary if you want the long color
bars that extend beyond that main area.

(I encourage you to view this diff with -w)

(imported from commit 10bf4462411146090b0147218d51cc444c3c91a2)
2013-05-21 17:39:14 -04:00
Steve Howell 5e64b9e90b Fix screen geometry for the tab bar.
Use tab_bar_underpadding to find out the top of viewport
that we can view.  Also, eliminate effective_page_size().

(imported from commit 0e2d777790552e77d635989e496f3446cefccb1e)
2013-05-21 14:45:38 -04:00
Jessica McKellar 3e30ccfc74 Style the message edit form.
(imported from commit ddbdb3b90c421ed25b781a172a8fac2581ffb65c)
2013-05-21 14:19:56 -04:00
Jessica McKellar d8afec5cf2 Turn the edit message Save and Cancel links into buttons.
(imported from commit 7892b48269181ca7b7998ac2693202e7cdd24197)
2013-05-21 14:19:56 -04:00
Jessica McKellar 8609c59781 Only show edit subject hint on messages you sent.
(imported from commit 613a023bf22b07f879864690142e9d5e0a56f0ef)
2013-05-21 14:19:56 -04:00
Jessica McKellar f4b99c8177 Fix that you have to save an edited message twice to complete the edit.
(imported from commit 87226d857845c6f16cb3bc0d6ab5bb748aca5987)
2013-05-21 11:04:56 -04:00
Jessica McKellar a6a3110bfb Encourage users to edit placeholder subjects with an edit icon.
(imported from commit 0bfe67876b237ea2fb4f523b23b9cdbbd9a4027a)
2013-05-21 11:04:56 -04:00
Jessica McKellar a3b6758315 Give a placeholder subject when users don't supply one.
(imported from commit ac6f0f7029c6a96c4c20562b02bee656436c70b2)
2013-05-21 11:04:54 -04:00
Jessica McKellar 17842cebd7 Make the subject box even smaller, to encourage shorter subjects.
(imported from commit b01d23db926972fa1618ef830936d65806d6c18d)
2013-05-21 10:24:47 -04:00
Leo Franchi 53415e6986 Restore narrow icon in crumbbar
(imported from commit 0c54d158f0035bb0e483a981b57e59a4e885e36a)
2013-05-20 23:55:03 -04:00
Steve Howell 33dd01885a Fix autoscroll to use ui.message_viewport_info().
This will make it automatically work if we add new tab
bar like things.  The current version of ui.message_viewport_info()
is slightly broken; that's a separate fix.

(imported from commit fa1906b738433223831250e3191dfd8e87d67daf)
2013-05-20 23:55:03 -04:00
Steve Howell 8738f330c5 Fix lint error in unread.js.
(imported from commit 2b6736dfbd03cb8de93ab9e38f471430bdcf6d61)
2013-05-20 23:42:22 -04:00
Steve Howell 62d6360a48 Extracted model code out to unread.js.
Most of the model logic pertaining to unread counts had been in
zephyr.js, along with a couple global variables.  Now the code
is encapsulated in unread.js.  It was a pretty straightforward
extraction with some minor method name changes.  Also, a small
bit of the logic had also been in stream_list.js.

Conflicts:
	tools/jslint/check-all.js

(imported from commit f0abdd48f26ab20c5beaef203479eb5a70dacfff)
2013-05-20 23:42:11 -04:00
Steve Howell c587a18646 Animate "Private messages" when new private messages come in.
Set the background behind "Private messages" to green whenever
a user's unread count goes up for private messages.  Remove
the background after 3s.  Advanced browsers will fade the
green in and out over 6s (3s up, 3s down).

(imported from commit 80ed9661d9eec1d697f3259854037d7e145615cd)
2013-05-20 23:41:40 -04:00
Tim Abbott fc5949d9b7 Properly quote subject value in message edit form.
(imported from commit aa81b300c4528ffe751348578008c8bee22ac6ae)
2013-05-20 23:41:35 -04:00
Tim Abbott 2bdecd130a Add user interface frontend for editing messages.
The only known outstanding bug with this is that it doesn't properly
handle the updating of a message's highlighting/presence in a narrowed
view (e.g. in theory, a message should disappear if it is edited such
that its subject doesn't match your narrow or it no longer matches
your search).  I think I'll just open a trac ticket about that once
this is merged, since it's a little hairy to deal with and kinda a
marginal use case.

Also it's not pretty, but that should be easy to tweak once we get the
framework merged.

Conflicts:
	tools/jslint/check-all.js

(imported from commit 2d0e3a440bcd885546bd8e28aff97bf379649950)
2013-05-20 23:40:57 -04:00
Tim Abbott d467a93877 Add support for updating messages after they've been received.
Currently the interface for editing messages is limited to a
command-line API tool; it's great for testing with e.g.:

./api/examples/edit-message --message=348135 --content="test $(date +%s)" --site=http://localhost:9991 --subject="test"

The next commit will add a user interface for actually doing the editing.

(imported from commit bdd408cec2946f31c2292e44f724f96ed5938791)
2013-05-20 23:40:26 -04:00
Luke Faraone 83508e8136 Enable two additional vector icons.
(imported from commit a14bc26114ab65afa65011366017162a99cdaf62)
2013-05-20 23:40:21 -04:00
Allen Rabinovich 93a2e23e96 Change the layout of the message boxes in the message pane and make other message-related adjustments.
Specifically:
   * Leave the avatar image as inline and round it.
   * Move timestamp to the left column.
   * Replace the "Info" link with a permanent info sign.
   * Move the pointer bar to the left.
   * Remove borders
   * Change selection background colors, and PM colors.
   * Introduce the "narrowing" icon into our FontAwesome set.
   * Modify the tests to account for the new "narrowing" icon and fixed a bug in star-finding.
   * Clean up CSS and add a more prominent color to private messages

(imported from commit 8a8d6de8acccc52c0d16f5d1ce31aabdc72c88c8)
2013-05-20 23:40:17 -04:00
Allen Rabinovich dc738d01a4 Added new "narrow" icon to FontAwesome and placed it in the message headers and composition pane header.
(imported from commit e8f927f464f78b680a03e1647128541abe872cde)
2013-05-20 23:40:12 -04:00
Steve Howell bafbc777e8 Allow scrolling during compose.
(imported from commit 0e39ba2048e7f0d2d91cc48f13e07fc69a5c4fc1)
2013-05-20 23:37:57 -04:00
Steve Howell 4ce6a6ea25 Fix auto-scrolling by not calling within_viewport.
The geometry used by within_viewport() is a little off to
begin with, but we don't want to check it at all in this
situation, because if the last messages falls out of the
viewport, we still want to scroll.  The relevant thing
to check is that available_space_for_scroll exceeds zero.

(imported from commit a0a6f0d23db2eab8d9f22fc9ad523031cf7f7ec2)
2013-05-20 23:37:57 -04:00
Steve Howell ecd3903007 Fix geometry for autoscrolling (part 1).
The prior code was subtracting out the compose box from the
calculation of available_place_for_scroll, which didn't make
sense when the compose box is at the bottom of the screen
and you're scrolling the current message up.  You could see
the symptom pretty clearly by seeing autoscroll stop exactly
the height of the compose box from the top.

(imported from commit cfceb85c8be80cca957ac4a3ad0bbf0de7425c48)
2013-05-20 23:37:57 -04:00