Commit Graph

365 Commits

Author SHA1 Message Date
Tim Abbott 84a97f5c41 Document how our desktop notifications work.
(imported from commit 991d7541283d7d8d17836f5322abb0da780eba25)
2013-07-16 13:16:24 -04:00
acrefoot 114eeab026 Revised message actions and message info popovers
Since f8fbf70c8502 had troubles in FF and people did not like the
message-info-on-hover, this commit hopefully will work better. Tables
are likely the culprit with using dropdowns in FF, so when we stop having
the messagelist be at table, we can switch back to dropdowns which are relatively
positioned rather than absolutely on the page.

(imported from commit c49a5cd45f3439d089146771e2aa0cee6431125a)
2013-07-15 11:29:59 -04:00
Zev Benjamin 347b222c79 Make the loading more messages indicator absolutely positioned
It now appears on top of message contents.

(imported from commit ac72a38f2a3062f7107db8125e11de78e40d927e)
2013-07-15 11:13:53 -04:00
Jessica McKellar a1cea767fe Reduce repeated height calculations in get_new_heights.
(imported from commit bc5422519d048d6be6bc53e16bd1597d704c1ff5)
2013-07-15 10:53:03 -04:00
Jessica McKellar ea582d4e12 Use getBoundingClientRect() to more cheaply see if a messages could be condensed.
(imported from commit 34d45fbc95a3597d27d167c9c02e73f9325edbee)
2013-07-15 10:53:03 -04:00
Leo Franchi 92fc542872 Show a on-hover cog for going directly to stream settings page
(imported from commit 9ba04d88daacd475d9b85ce7c8bd925840290535)
2013-07-12 18:34:13 -04:00
Scott Feeney a7963a24f8 Remove compose.set_mode in favor of compose.start
From Trac ticket #1503:

All of the calls to compose.set_mode() should be calling compose.start()
instead. Nearly all are impossible to trigger while already composing,
and by calling compose.set_mode() they just do the stuff in set_mode()
twice. The only case where this would change behavior, that I can see,
is if you press C, Shift-Tab to unfocus the compose box without
dismissing it and then press c (or vice versa). I think it's okay if we
clear the input fields in that unlikely case.

(imported from commit ba7f181ec9d1df90a443b0a754462a3a201dcabb)
2013-07-12 18:26:13 -04:00
Kevin Mehall c2b862e238 Bugfix for 7167ed0: fade class is `message_reply_fade_narrowed` when narrowed.
It would show the recipient bar unfaded over a faded message when
narrowed to a stream.

(imported from commit 576e7bd7bdf1fbb3f241f1ba8cd1548c4546257d)
2013-07-11 17:51:38 -04:00
Scott Feeney 8fcf208815 Use one template for all user presence rows
This will hopefully fix some lagginess when logging in on the Hacker
School realm, especially on Firefox, as the user presence rows are
populated (previously requiring hundreds of template renders).

(imported from commit 67e2d7f91ad62d8d7a2e212ee7c7121bd73f010b)
2013-07-11 16:48:23 -04:00
Kevin Mehall 8df4857524 Revert to old mark as unread on view behavior.
Effectively reverts 185e865 and b67e52d.

(imported from commit e9b95f1fd9e2ab7926f15910044e9e9879ea085f)
2013-07-11 14:01:26 -04:00
Kevin Mehall 674152dae1 Show the recipient bar when the compose box is open, as long as
it's on a message that isn't faded.

Trac #1464

(imported from commit 7167ed0877d3885316b7d38af5f11ec5523d5f7d)
2013-07-11 13:41:49 -04:00
Steve Howell 6347bdfcc8 Starring a message makes it read.
(imported from commit 80c1af9e34f4904266a64d89c57cd82e84c02b48)
2013-07-09 09:57:20 -04:00
Waseem Daher 58e57d7462 Revert "Increase bottom_whitespace to be most of the viewport height."
This scrolling behavior is driving me crazy on staging.
Reverting until we come up with a better alternative.

This reverts commit 41954fecd9efb43820ed1ccb5210283c17752f51.

(imported from commit 2db602cf51ca734b00ec1bd454c39204468fa024)
2013-07-08 21:04:52 -04:00
Scott Feeney 6030abb888 Fix clicks not dismissing popovers (Trac #1435)
A cleaner, more general solution would be nice but this fixes at least
the most obvious cases for now.

(imported from commit fc7260e25a4f2172eee74af9c2d9384898947ad3)
2013-07-08 18:53:20 -04:00
Scott Feeney d23e8d8a30 Simplify and fix preventDefault -> stopPropagation
(imported from commit 3cb84804027b67662392e5a7c75bfb0603b9318d)
2013-07-08 18:53:03 -04:00
Scott Feeney c42bf9b9b2 Refactor popovers into their own file
(imported from commit 36ad3c61e4d7eb05751f9b886d15edceab656d71)
2013-07-08 18:53:03 -04:00
Tim Abbott e5c96fb3ad Increase bottom_whitespace to be most of the viewport height.
This has two benefits:

(1) Users can scroll their last message to near the top of the screen,
which decreases how often one needs to scroll down to track current
messages.

(2) It makes scrolling bugs near the bottom of the screen a lot easier
to find, because scrolling down too far isn't blocked by being unable
to scroll messages off the screen.

We should probably later convert this to some formula that varies
dynamically based on the height of the last message.

(imported from commit 41954fecd9efb43820ed1ccb5210283c17752f51)
2013-07-08 17:32:17 -04:00
Tim Abbott f48097b609 recenter_view: Always place the initial pointer at the center.
It turns out that this code tries to place the initial pointer 1/7
from the top; the only reason something reasonable happened
historically is that bottom_whitespace was only 40% of the screen, so
the pointer message ends up landing in the center anyway.

(imported from commit 56d4c2acd018d9a87551c82a43c214c6d80bfb90)
2013-07-08 17:32:17 -04:00
Jessica McKellar dd53c1fbe3 Keep the compose box open on a buddy list-initiative PM.
(imported from commit aabfec328a3c1b64aab653ddcbe04568f5742727)
2013-07-08 16:36:32 -04:00
Jessica McKellar b535037d25 Always show the onboarding checklist if it's unfinished.
(imported from commit da5a84f7b70f5240f9bdd54b25719c3ed88fc1ee)
2013-07-07 19:30:12 -04:00
Steve Howell 249252f700 Put spaces after "function" in JS code (cosmetic).
(imported from commit 7579547bfed70b3e53122109d0d6f30ea01f5ac3)
2013-07-05 16:32:32 -04:00
Waseem Daher 51f9ace595 Revert "Chevron icon on each message now causes a dropdown menu; hover on message for info"
This reverts commit f8fbf70c8502370a78159e24f3cf9589fb9d384f, since
we're waiting on some Firefox and no-hover fixes.

(imported from commit 6b13f5bb9d907303ab311afd7da584bc06538c91)
2013-07-03 17:44:35 -04:00
Kevin Mehall 22c1a66da8 Don't mark messages as read by visibility.
Trac #1428

(imported from commit b67e52d7434220e397ca20ffa49915de6633519c)
2013-07-03 17:10:15 -04:00
Waseem Daher d9aca91662 When you change your name, properly update it in the presence list.
This fixes Trac #1163.

(imported from commit 065f33484004635104d59d3a004cc25c12fa1d2b)
2013-06-30 14:23:02 -04:00
acrefoot bea702dd17 Chevron icon on each message now causes a dropdown menu; hover on message for info
As does the hotkey "i". It's somewhat less appropriate because it's all actions,
but it's where our "info" menu used to be, and we can workshop a better one. "a"
feels weird to me, but maybe it's just me.

You can also hover on the .message_content to see a popover with extra message details

This is for Trac #1334.

(imported from commit f8fbf70c8502370a78159e24f3cf9589fb9d384f)
2013-06-28 12:24:03 -04:00
Allen Rabinovich d9f5b98aea Put recipient bar color in the message's left column.
Previously, we'd highlighted the top of the block. The theory here is
that it will make things less visually cluttered/noisy, which should
improve readability.

(imported from commit f94ec6b8e55aef9c2413718aea23b1124f5308e7)
2013-06-28 10:52:05 -04:00
Jessica McKellar 24b41351a6 Clean up the message we display while bankrupting you.
(imported from commit 007c97eded421a021cd6aefb7f38fe8f4946b26c)
2013-06-21 11:00:44 -04:00
Jessica McKellar e0b109c6ae Remove the bankruptcy button on the Settings page.
(imported from commit 3f67422df3e96b0902b315c8d055c607e07bc533)
2013-06-21 11:00:43 -04:00
Jessica McKellar 30ab99d765 Offer to bankrupt a user if they are way behind.
(imported from commit 5483bb548a55e6cbf788b71a8885b3c990b94b77)
2013-06-21 11:00:43 -04:00
Tim Abbott 6cc45b89b1 Revert "Hide pointer until a hotkey is used"
This reverts commit fec64815c879f9704847795cc163e2b517b4190d.

We've decided this experiment didn't work out.

(imported from commit 04f38e15c8ef19fbaa022a06bbcca3b0c67ec5ad)
2013-06-20 18:02:18 -04:00
Tim Abbott c87e12ad41 Revert "Tweak hotkey behavior when pointer isn't shown."
This reverts commit 74fb298c711e61ae98c210d0ed11c875ce6ba591.

We've decided this experiment didn't work out.

(imported from commit 8acd3a030b692f9397155a20a9f89e63ed6a6cf7)
2013-06-20 18:02:18 -04:00
Scott Feeney f06c0fbdc8 Only focus textbox if streams page opened directly
If you click on "Streams" from the gear menu, we want to focus the
textbox to create a new stream. But if the Streams page is brought up
programmatically (e.g. to jump to a specific stream's settings), this
commit makes it not focus the textbox.

(imported from commit 900bdafb701180eac1d284120a91ea2a84d7177b)
2013-06-19 18:31:06 -04:00
Scott Feeney a7eaddefa5 Fix race condition for sidebar "Stream settings"
The sidebar link now uses a one-time event handler for a custom event,
subs_page_loaded.zephyr. If the streams page is already open, we can't
rely on the event so we expand the stream in question immediately.

(imported from commit 3c22e1791d238a3be4a73edcfb5456e392cee608)
2013-06-19 18:31:05 -04:00
Steve Howell b055698317 Work around possible jQuery issue in building buddy list.
(imported from commit 17ad22f0bb3b30333cb9675cb710b9b5e2141198)
2013-06-19 16:35:35 -04:00
Scott Feeney scott@humbughq.com 42d2c40464 Add link to stream settings from sidebar popover
(Trac #1375)

(imported from commit 92fdbc9906f1394f3ae484a91919226224f43631)
2013-06-18 18:03:38 -04:00
Kevin Mehall 9322e63d32 Refactor typeahead for user names (PM and @reply).
Get data directly from the main user list, rather than maintaining a
separate list just for autocomplete.

Fixes trac #1362 -- Does not depend on historical messages, so
will do the correct autocomplete after a single reload.

(imported from commit 6b35a709dba3384530082e8cfacf0151f9e0eb26)
2013-06-18 17:52:39 -04:00
Steve Howell a46a371677 DRY up sent-by-me checks with messages.sent_by_me.
This is a pure refactoring.  We set messages.sent_by_me inside
add_message_metadata(), which gets called early in a message's
lifetime.

(imported from commit 2f6270f92ecdf0e4a64401030f86d89a8fb7be2e)
2013-06-18 16:01:09 -04:00
Steve Howell 943a29dc34 Show correct avatar for desktop notifications.
This updates desktop notifications to use avatar_url from the
server (in case users have uploaded their own avatar).  It
also removes the unneeded stamp parameter from the URL, and
it unifies URL handling with message_list.

(imported from commit 6bb43a25c01cc3d26f30fc167780a477d1c5d023)
2013-06-18 16:01:09 -04:00
Kevin Mehall b06c2f7ccf Tweak hotkey behavior when pointer isn't shown.
Disable the hotkeys that act on the current message, except Enter
immediately shows the cursor without moving it.

(imported from commit 74fb298c711e61ae98c210d0ed11c875ce6ba591)
2013-06-14 13:50:03 -04:00
Kevin Mehall 0cd90cbe4a Add a close button to the compose dialog (since users may not know to use Esc)
(imported from commit 47dca0b2c76449be1d885b74c1cf6b036aa459c7)
2013-06-14 13:47:57 -04:00
Kevin Mehall 6cb7baf598 Hide pointer until a hotkey is used
(imported from commit fec64815c879f9704847795cc163e2b517b4190d)
2013-06-14 13:47:07 -04:00
Steve Howell 83c80e1ba5 Change ? to & in gravatar URL query string.
(imported from commit f12738d1f8dc5b367eee32240ac0a29fb6255d1e)
2013-06-13 17:26:09 -04:00
Steve Howell 4093021f97 Stop polling for gravatar changes after the first update.
This is essentially a bug fix.  It was pretty clear that the
original author intended to stop polling once the gravatar was
updated, but they checked for the updated flag before the callback
completed, instead of inside the success callback, so it wouldn't
stop polling regardless of the update.

(imported from commit 7998c6890a26a008810b8a6d8e7998a53c6e175d)
2013-06-13 17:24:05 -04:00
Leo Franchi 969e0dd827 Clean up subs.have by splitting it into logical pieces
(imported from commit 0fe55aa62ccc95cae5c9aba565b0e4c04692fb46)
2013-06-13 10:06:34 -04:00
Kevin Mehall 5b4493926f Clicking a message that is being edited should not open the
main compose dialog for a reply.

(imported from commit 0a91b3c2ddba12ec33daf993dd13c1e7a7f4065c)
2013-06-11 13:53:59 -04:00
Waseem Daher eaad981def Remove font size menu.
This, in effect, reverts ff0c27ccb177ddc69a31bf8997d31e7cfb5b78b5.
The rationale here is that actually we look pretty good with the
browser's own zoom/font-size-resize in Chrome and Firefox, and it's
better to let the browser handle these kinds of changes than us.

(imported from commit 5949b57bdaf20d4fdf2bbd7ed89d1285a8b8e453)
2013-06-10 14:57:29 -04:00
Leo Franchi 0fa857d524 Add a fixed: option to bootstrap.popover and use it
(imported from commit fe8768b8a320df7670c204880bffb3932568cc5e)
2013-06-10 14:25:28 -04:00
Tim Abbott f41d9c8c5d Fix traceback when clicking on right sidebar unread counts numbers.
If you clicked on the unread counts span inside the right sidebar
links, e.target would not be the link itself but instead the count
span inside the link, so the extraction of the user's email address
was incorrect.

(imported from commit 559d93622078e4d909f60de794df3f039ea7e5f2)
2013-06-06 17:50:33 -04:00
Tim Abbott dbeaeeaa3f Fix buggy computation of a user's name for user actions popover.
(imported from commit 4ee8aab9ece6ebf699c706cf0368180e714dcd6f)
2013-06-06 14:18:49 -04:00
Steve Howell 1cd113db10 Move message_viewport_info() from ui.js to viewport.js
The message_viewport_info() function encapsulates our logic
around the compose box and other elements blocking the viewport,
so viewport.js seems like a more logical home for it.  It also
makes ui.js, one of our largest modules, a little bit smaller.

(imported from commit 7838668b28175e161b87a6d7a8124b73012f0ff3)
2013-06-06 11:59:45 -04:00