Commit Graph

2337 Commits

Author SHA1 Message Date
Steve Howell fad259d75d Move code from hotkey.js -> navigate.js.
Created up, down, page_up, page_down, to_home, and to_home pretty
mechanically from the old hotkey.code.

(imported from commit 5956b91c2e0122c6440f70db9b92f918c9b599aa)
2013-07-24 23:39:35 -04:00
Kevin Mehall eb6bc91c22 New Relic integration
(imported from commit a108f4c6e90d857263453036f6d5f09279302b7e)
2013-07-24 17:19:36 -04:00
Waseem Daher 04ad610263 Restore old mix-protection mechanism.
This is the moral equivalent of reverting
25ac8c557978a3867eba90d93857d9bd728149e2

(imported from commit dc9ac79c2bed46b836bf666d3718f3bcac11099e)
2013-07-24 17:09:36 -04:00
Waseem Daher 1303327e0c Fix settings dropdown on mobile devices.
Issue reported by user1@customer34.invalid

(imported from commit b3efa08ac7b4249652a6cd0376aa21217c0435fc)
2013-07-24 15:08:40 -04:00
Steve Howell 312452f174 Show 'subset' search suggestions last
(imported from commit 849e151cfeb56b288419e12621d122327e619023)
2013-07-24 13:39:21 -04:00
Steve Howell 782e2d43bf Reverse order of 'subset' search suggestions
(imported from commit 1e5f84e8ea3c5a1ec27eaeaada60db720ccd58cd)
2013-07-24 13:39:21 -04:00
Kevin Mehall f88571f482 Comments documenting the ordering requirements of MessageList._render steps.
(imported from commit 16a493a957e166ee529b9dd8d630cc1717e93456)
2013-07-24 11:48:39 -04:00
Kevin Mehall dfda1d3137 Fix collapse issue introduced by ca50035 while keeping the effect of its fix.
That commit intended to fix a bug where it jumps to the wrong scroll position
(offset by the difference in height from uncollapsed to collapsed) if you load
collapsed messages at the top, either by scrolling up or when it automatically
fetches more 10s after page load, because before, it updated the scroll
position before processing collapsing, which changes the height of messages.

Updating collapsing needs to happen before the viewport is adjusted, but also
needs to happen after the new messages get appended/prepended to the document
because they need to be attached to the document for getClientBoundingRect to
work.

(imported from commit 44d6a6135524e658084ffcf7d880ba898b577e6d)
2013-07-24 11:06:18 -04:00
Jessica McKellar f647596cbb Add a CSS class to unfaded messages.
We already have one for faded messages (which this commit simplifies),
but we also need one on unfaded messages to facilitate styling
experiments.

(imported from commit 41a6e2ef136ce73ce8c24de1e35199244ce56d37)
2013-07-23 21:45:07 -04:00
Kevin Mehall 5f3dcfd104 Make the edit form keep the text in the same place as the normal message.
Trac #1540

    * Make edit content box the same width as normal content
    * Scroll to compensate for the added padding and "Topic" field.
    * Restore the scroll position when exiting edit

It's off by 1px on Firefox 22, but Firefox is simply wrong.

(imported from commit 49154f51b538c648934a41a4a7a217198186ede2)
2013-07-23 18:09:05 -04:00
Tim Abbott 9dbbdb1cdf Avoid get_updates failing to update following bugged update_person events.
(imported from commit 7785277ab967a67135e1bd4aa226a0d64adccaba)
2013-07-23 14:26:33 -04:00
Steve Howell ffa178cf7a Suggest "widening" searches in search autocomplete.
This will allow you to always get Home from the search box,
as well as easily backing out narrows.

(imported from commit 68bcfc83ce0428645f4e734ae46f9589cb562a86)
2013-07-23 13:18:33 -04:00
Jeff Arnold 4b69094ffd For <= 1 message selections, convert emoji into text
<= 1 message selections previously were not being handled
by copy_handler at all

(imported from commit 031ab4ce6db4b1aae4ea202611d09066c87f0faa)
2013-07-23 12:29:52 -04:00
Jeff Arnold ee3806ef5b In the desktop app, paste emoji as text to work around webkit bug
See Trac #1060

(imported from commit 860f16c5a9db626a4fd2d55bcb0dd137e5196560)
2013-07-23 12:25:59 -04:00
Waseem Daher 6cd0b0468d Document Trello integration.
(imported from commit ac28965d1bd0de49a9902c4650e4f5d7835f65cc)
2013-07-23 11:50:31 -04:00
Kevin Mehall 1acc865d19 Don't save the pointer position in the reload after bankruptcy.
(imported from commit b09550d44c0264d7754c47cfd80f1a3639b04b5d)
2013-07-23 11:14:50 -04:00
Steve Howell ba35a7118c Reset search string in ALL cases when you blur the search box.
Until now, we would reset the search string when you aborted
a search, but only if you are in the home view.  Now, we reset
it always.  This makes the search box an accurate reflection of
your narrow.

(imported from commit bed6adce54a55648165c84118d430c44abb5949f)
2013-07-23 10:35:09 -04:00
Steve Howell 65101816d3 Use naturalSearch option for search typeaheads
(imported from commit 0e0b71fbcdb590d40c843ca310100f9fd72e758e)
2013-07-23 10:35:09 -04:00
Steve Howell dc85fa7cf2 Support naturalSearch option in typeahead.
The naturalSearch option immediately updates the search box with
the underlying value of a search suggestion when the user moves to
it.

(imported from commit ad5cb5c2591ef4f71a6d648c8839f288cc125cf7)
2013-07-23 10:35:09 -04:00
Waseem Daher 49619a85dc Give "faded out" messages transparent backgrounds.
This hopefully makes them look less active while still preserving
their readability.

(imported from commit 25ac8c557978a3867eba90d93857d9bd728149e2)
2013-07-22 18:05:40 -04:00
Steve Howell 35c3488bbe Suggest a max of 10 topics in search
(imported from commit 10a70d20edf4f0fe74a1597f46c50e4445cf3da3)
2013-07-22 18:01:27 -04:00
Steve Howell ce4393ef0f Put people-specific search suggestions first
(imported from commit 0daf24af2f91860556dedda9a21f476d1bb3c855)
2013-07-22 17:49:12 -04:00
Steve Howell 369bc02f45 Limit people in search suggestions
(imported from commit 655201100b3a9c39ffd053fd744938b5c5eb75dd)
2013-07-22 17:36:03 -04:00
Steve Howell 8c4982de82 Limit search suggestions to 30
(imported from commit f6c6e6dce11f39fc3fc69d85bd41fbadd78013a0)
2013-07-22 17:36:03 -04:00
Jeff Arnold e35cebd821 Include emoji as plain text in desktop notifications
(imported from commit 26c76ae3420c02b677bcacc4dd0a05797f4f8541)
2013-07-22 16:33:27 -04:00
Jeff Arnold 5190a9692a Hide text for the > icon so that copy paste captures it
Addresses Trac #1296

(imported from commit 650672b971f18b4e1bfb185987768b55504ee1e8)
2013-07-22 16:33:27 -04:00
Steve Howell 6998d0c427 search autocomplete: Show pm-with suggestions when in a PM context.
If you are narrowed to "Private messages", we show you suggestions
of people.  If you are narrows to pm-with, we show you a suggestion
to get back to is:private.

(imported from commit 18405beb1e194514618365d9f913972121c64d12)
2013-07-22 16:05:37 -04:00
Steve Howell 62ad1a86e4 Suggest 'Sent by me' in searches.
(imported from commit 66867191fcc1073fda974c26411cdbb2f00e4efe)
2013-07-22 16:05:37 -04:00
Steve Howell 103625d123 Prevent duplicate search suggestions.
(imported from commit b1fb4d40ee76394ee8eee5aec4e292a408806667)
2013-07-22 16:05:36 -04:00
Steve Howell 04e1567ef8 Suggest special filters like "All" and "Private messages" in search.
(They will show up for empty queries or queries that are prefixes
of either the operator syntax or the label used in the sidebar.)

(imported from commit 3765896e3bc1fc95caf987194e22d89d649ba5ae)
2013-07-22 16:05:36 -04:00
Steve Howell 5574efd016 Show search suggestions for empty strings.
Show Home and all the streams.

(imported from commit 535e59f18590f8feefe55925fd880214fdef9eb6)
2013-07-22 16:05:36 -04:00
Steve Howell 72c3057d34 Don't limit search suggestions per category.
We cap the number of overall suggestions at 50, but we don't
limit within category, since any limit is arbitrary and can
confuse users.

(imported from commit 3b18e9ad4b89e5a5485a058a2c0cd5fcca61ed35)
2013-07-22 16:05:36 -04:00
Steve Howell d329317502 Support helpOnEmptyStrings option in typeahead.
It allows us to provide suggestions when the user types '' in
a searchbox (e.g. by hitting delete when text is selected).

(imported from commit dc27ef86db2b6ec40039e4e9668b8ccc288c6134)
2013-07-22 16:05:35 -04:00
Steve Howell 72f65070f3 Go to Home view if user selects an empty search.
(imported from commit 056ba499e16cce686b4ac60dcd282b26f43ab802)
2013-07-22 16:05:35 -04:00
Jessica McKellar 5a56e7cd29 Make tabbing to Save and Cancel in the message edit form work in Safari/desktop apps.
(imported from commit 74b7e2eedb541c1ed409390c0d61b05c106bebcc)
2013-07-19 17:16:18 -04:00
Waseem Daher ec9c596933 Add unread green dots to the left of the message, which fade out.
This is a heavily adapted version of Allen's commit that did the
same.

Some gotchas:
* Because the unread count indicator is not in the message content,
  we can't center it in the middle of the message content (we'd
  need to put it inside the div to do so).

* Awesome Gecko bug surrounding tables makes this also somewhat
  annoying, so watch out for this if you're making changes here.

> In Gecko, if you have a positioned <table> element inside a
> positioned block element, such as a <div>, a position: absolute;
> styled element inside the table would be positioned relative to the
> outer <div> rather than the table, which is the nearest positioned
> ancestor. This is a bug, and has not been fixed.

(imported from commit 45c00c37f3721c211331b228e84d46283e1cc9ba)
2013-07-19 16:41:26 -04:00
Jessica McKellar 12a37ed2b8 Always keep the compose box open after sending.
(Some cases are disabled on outside of staging still due to mix
protection concerns).

(imported from commit 26fcb95c055640ddd87c5df424990ebd865a336a)
2013-07-19 15:48:12 -04:00
Steve Howell f177147f7a Show topic suggestions as "Narrow to stream > topic".
Terse suggestions are better for scanning, and we reinforce the
">" convention.

(imported from commit f586b74b29088e4cd76797aa5305d97fab34832f)
2013-07-19 14:17:08 -04:00
Steve Howell 84fda6ad04 (search) Don't show topic suggestions when a topic is already entered.
We already had provisions for the common case, but this code fixes
the situation where the user explicitly types topic:foo stream:yo.

(imported from commit 4dfa4cc8337acd4f0daed25a5b82a556804b3c18)
2013-07-19 13:49:33 -04:00
Jessica McKellar 8e23848384 Refocus in the content box after you change your Enter-sends state.
That way you can continue typing or press Enter to send.

(imported from commit 45501211f95657c9a4f6aba4d9cd0c4232d75c63)
2013-07-19 12:20:54 -04:00
Steve Howell df9daf70a2 Fix number of topic suggestions
(imported from commit 08096cc0e27054dd11f394d5b642b72ec8724b1b)
2013-07-19 12:12:05 -04:00
Steve Howell 7b48c46037 Suggest topics during search autocompletion.
(imported from commit c4335cb89689110ec67b47f1a7195efad7d6419a)
2013-07-19 11:49:06 -04:00
Steve Howell cd76add2de search.js: Clean up local variables a bit
(imported from commit 5094017271994a0aa50ec8cccc633360b46e90dc)
2013-07-19 11:49:05 -04:00
Steve Howell 616ed68440 Correctly encode stream suggestions.
Before this fix, if you used the "Narrow to stream foo bar" suggestion,
it would search for "bar" within stream foo.  Now it goes to the "foo bar"
stream.

(imported from commit 0be5f259842c119936d678a292a1a79af58defa2)
2013-07-19 11:49:05 -04:00
Steve Howell b3ef7760c6 Fix smartSpaceBar option in typeahead.
If you have smartSpaceBar turned on and hit space, the code
now calls lookup(), so that the app code can reload new
suggestions.

(imported from commit 6776babba0a2c9b8a954a4640aa7b81a970ed88e)
2013-07-19 11:49:05 -04:00
Steve Howell fa1151c8ed Export narrow.unparse()
(imported from commit dfee6523b5fd71a789b89c0c6c65a1d353e35046)
2013-07-19 11:49:05 -04:00
Waseem Daher 3ccb5e9d66 Make `Esc` properly dismiss message info popover.
(imported from commit ed95bc09803d2829710909d91096fa56bd8b048c)
2013-07-18 17:50:31 -04:00
Jessica McKellar 45fc7ced28 Show the total unread count in notifications, even if narrowed.
Previously we'd display the unread count for the current narrow.

(imported from commit 4939fc5cf0efcf9662b2b359f2247f915a334ac8)
2013-07-18 17:47:19 -04:00
Kevin Mehall 8b3cd91d39 Don't save the pointer on reload if we don't have one.
This fixes the bug where the pointer jumps to the top if it reloads
before finishing loading.

(imported from commit 6b2d80acab4d4232f6eb87695193592a83c4466a)
2013-07-18 17:36:04 -04:00
Jessica McKellar fbe55f733c Enable arrowing breaking out of an empty compose on prod.
(imported from commit 85a5826c3f454e268c3b31fc9487e58de1528d53)
2013-07-18 17:11:36 -04:00