Steve Howell
91b05ffe88
Make sure stream:x foo suggests stream:x topic:foo
...
There was some misguided code that eliminated the suggestion when
the user typed out the full topic, and since then there is more
generalized protection against duplicate suggestions.
(imported from commit 857e74458d10995170d312b77d99d839706ae680)
2013-07-25 18:11:50 -04:00
Steve Howell
e8fbe96a62
Suggest streams more aggressively in search.
...
Before we'd autocomplete d to [stream:design, stream:devel].
Now we also autocomplete stream:d to [stream:design, stream:devel].
(imported from commit d7ecbd032a3414828bf649698d741f0d6a6e3af2)
2013-07-25 16:45:27 -04:00
Steve Howell
3430bc8ff3
Remove unused parameter in get_topic_suggestions()
...
(imported from commit d32cf560376d2b96b1b974a27158aba5ac6401d3)
2013-07-25 12:17:14 -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
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
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
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
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
72f65070f3
Go to Home view if user selects an empty search.
...
(imported from commit 056ba499e16cce686b4ac60dcd282b26f43ab802)
2013-07-22 16:05:35 -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
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
0e9e102324
Make the space key smarter for search typeaheads.
...
Hitting the space key accepts the current selection and allow you
to continue typing.
(imported from commit f902d051807b9296009896e40853bcefca434752)
2013-07-18 11:15:28 -04:00
Steve Howell
3af905db66
search.js: extract get_suggestion_based_on_query
...
(imported from commit 6c242fa9dd9ad9f73976fe9b1265521610326c5d)
2013-07-17 15:39:35 -04:00
Steve Howell
c9ec96cab3
search.js: Eliminate get_query and get_person
...
(imported from commit c785f33378a0a5a436d9a7cb236a4af29c94921a)
2013-07-17 15:39:35 -04:00
Steve Howell
98d2c5361f
search.js: Simplify get_person_suggestions
...
(imported from commit 44f22923a73633c5693a99ae9ce788f10cd5f505)
2013-07-17 15:39:35 -04:00
Steve Howell
c515ad4cbb
search.js: Simplify get_stream_suggestions
...
(imported from commit 0fd00a2f22cc0241945767b4bf1151b811f00a63)
2013-07-17 15:39:35 -04:00
Steve Howell
ed622c457b
search.js: eliminate action concept
...
(imported from commit 224997bd656a1c1b39260cf7fdec97988f9854b6)
2013-07-17 15:39:35 -04:00
Steve Howell
87e025602c
search.js: kill get_search_string
...
(imported from commit 5979832ba697386a660ca9cdc6487fa79257511b)
2013-07-17 15:39:35 -04:00
Steve Howell
c201354e6b
search.js: slice earlier when building typeahead objects
...
Slicing earlier means less work to do on items that were gonna
be sliced anyhow.
(imported from commit 743c51c478679a14f101e6cf7c14eafb9d719a58)
2013-07-17 15:39:34 -04:00
Steve Howell
e6e56ef97e
search.js: sort earlier when building typeahead objects
...
This sets up a later optimization.
(imported from commit 49d285ce4e30fff222c8160d12fd345b9afeb417)
2013-07-17 15:39:34 -04:00
Jessica McKellar
849b49b22d
Make "subject" an alias for the "topic" operator.
...
(imported from commit 52c11ff48a286533906b99ed62839e6ae3e35b17)
2013-07-17 12:04:46 -04:00
Jessica McKellar
1defcf5718
Support operator aliases, and introduce the first, from: canonicalizing to sender:.
...
This also normalizes the casing of operators, which makes
Sender:wdaher@humbughq.com work when it would previously give an
"unknown operator" error.
(imported from commit fb3f748a474e1c9c710547ae3c05a4ace86c3230)
2013-07-17 12:04:46 -04:00
Steve Howell
68f2991746
streams.js: Simplify narrow_or_search_for_term
...
(imported from commit 8b8faf7ec35acdb7c7506ea57890901e0e04af71)
2013-07-16 13:29:19 -04:00
Steve Howell
e3392eeca6
search.js: label -> search_string
...
(imported from commit 5201c0d7d242d060d405692ff166f7febfc581cd)
2013-07-16 13:29:19 -04:00
Steve Howell
f8cad17c75
search.js: kill off labels, mapped, update_typeahead()
...
(imported from commit e0320b5315762d1776ef198fe57663ee6b74d7f8)
2013-07-16 13:29:18 -04:00
Steve Howell
73f013f077
search.js: Simplify stream suggestions
...
(imported from commit b12395a2b3415065e0c25a637d22bc385dbdda8b)
2013-07-16 13:29:18 -04:00
Steve Howell
6e385bc85d
search.js: Simplify people suggestions
...
(imported from commit ff3683f63e85e4d021de299d62bf2585fd6b99d9)
2013-07-16 13:29:18 -04:00
Steve Howell
82233a5de9
search.js: Introduce search_object var
...
(imported from commit ce4b32891011c548b0b9f6851537f3110d0f2329)
2013-07-16 13:29:18 -04:00
Steve Howell
b4e05d3430
search.js: Construct descriptions while constructing suggestions.
...
(imported from commit 5de6d0799de6d132e6e7ac28658d0f25b71cc7ed)
2013-07-16 13:29:18 -04:00
Steve Howell
d216069e29
search.js: Kill off get_object_parts()
...
(imported from commit fabfa6c3bf8cb0749ba1379882eda8cb9c8316ed)
2013-07-16 13:29:17 -04:00
Steve Howell
ec7a5c0ea5
search.js: Simplify operators suggestion
...
(imported from commit 55f84b69be5e8f75a8e0ab5a7a00ba6f88873db8)
2013-07-16 13:29:17 -04:00
Steve Howell
9041b1f7ac
search.js: Isolate person suggestions
...
(imported from commit afec996b39b662c5000f7f2217e139b872bee990)
2013-07-16 13:29:17 -04:00
Steve Howell
200a4d2d83
search.js: Isolate stream suggestions
...
(imported from commit 627a57d0be0b53ed4027408be949c060e6674224)
2013-07-16 13:29:17 -04:00
Steve Howell
e2634042a0
search.js: Avoid sorter callback
...
(imported from commit d930af6e0beca6165c750dfecf85b092475e868c)
2013-07-16 13:29:17 -04:00
Steve Howell
ba71dd212b
search.js: Avoid matcher callback
...
(imported from commit aa5289b174dfeb3e89debc344b106a8446b4f6a5)
2013-07-16 13:29:17 -04:00
Steve Howell
eca2ca675b
search.js: Decouple object labeling from object rendering.
...
(imported from commit f761401d3e287aa2771ce4203f1b2b8f57c7ca86)
2013-07-16 13:29:17 -04:00