Commit Graph

3971 Commits

Author SHA1 Message Date
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
Waseem Daher ea0e5c4754 Add :zulip: emoji.
(imported from commit 57e4232f8db6cf752244c4307d4c0cdbb570ec58)
2013-07-18 16:35:34 -04:00
Jessica McKellar b898db424e Don't fade all messages when you narrow to all PMs with the compose box open.
(imported from commit 4041d28988544733243aa3f2494aca9247acd324)
2013-07-18 16:26:01 -04:00
Allen Rabinovich dc7b59bc9f Removing shadow artifacts from composition area
(imported from commit f957f26f60d2aedcb106e555b9558c8363cf9d61)
2013-07-18 12:30:37 -07:00
Tim Abbott 18f94de07f Use standard functions for parsing/validating email addresses.
This adds two new functions for parsing out the domain and username
from an email address, and switches our backend to use them and
django.core.validators.valid_email() rather than custom parsing and
raw email.split("@").

(imported from commit 3d6e997d66908811eccb5f82f2f7fe349b40f238)
2013-07-18 13:58:16 -04:00
Tim Abbott bece588897 Include server deployment location and git commit in blueslip emails.
This should make it a bit easier to figure out exactly what was
running on the backend when an error happens.

(imported from commit d1002a92c24870b8d98d7133dff865eecf1cfffe)
2013-07-18 13:58:16 -04:00
Allen Rabinovich a486579a4f A group of changes to make the selection lighter and more elegant.
* Redo table borders as inset shadows to make them sharper
* Make the selection highlight a blue border with blue glow

(imported from commit 758884cc7e17952ba68e4aab6215f3e026dc8fe8)
2013-07-18 10:54:22 -07:00
Jeff Arnold e19238c905 Don't close the compose box on a click if the click selected text
Addresses Trac #1257

(imported from commit 10351752c4951b3a0f300391477d47f608332211)
2013-07-18 13:06:11 -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 fcb3999996 Support smartSpaceBar option in typeahead.
If you set the option, then hitting space will select the current
suggestion and allow you to keep typing.  If you don't set it,
then it's the old behavior where space allows you to continue
typing without acknowledging your selection.

(imported from commit 8125a322e5a748ac7716361d66fca18c56d5766e)
2013-07-18 11:15:28 -04:00
Tim Abbott 23beabb80c [manual] Rename manage.py subscribe_new_users to process_signups.
The old name was very confusing, and this fits the convention of "the
processor for the signups" queue a la "process_user_activity".

This requires doing a

supervisorctl stop humbug-workers:humbug-events-subscribe-new-users
puppet apply

to deploy the supervisord configuration changes and properly restart
the signups queue.

(imported from commit 0ee2dad837142afa64025446e22956709771a192)
2013-07-17 17:50:19 -04:00
Scott Feeney a33e6a5ec0 Fix @-mention autocompletes when no @ typed
Introduced by my fix to #1418 a few commits back, sorry about that!

(imported from commit 9df9cdaf4226012076ccdfe0c062606ca8026b38)
2013-07-17 15:46:41 -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 6a8a403cc9 Make prefix_sort just use obj itself if get_item is not passed in
(This facilitates using prefix_sort for a list that doesn't require
a function call to get to the object of interest.)

(imported from commit 5a0e550c313b9c57f0434c7246fcea451219d1b8)
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
Allen Rabinovich f1da624353 New selection highlight style
(imported from commit b23e8ddc08af131f74964ba7562eb071eaeb0a64)
2013-07-17 12:29:22 -07:00
Kevin Mehall 8863340e98 Fix scroll glitch when new messages are loaded at top.
`process_condensing` before updating the scroll position, because it can
change the height of messages.

(imported from commit ca500351447fcabc3b03bb01a55a8e25bf8e9578)
2013-07-17 15:25:22 -04:00
Kevin Mehall a0a91163fd Preserve pointer position on automatic reload.
The server only saves the maximum position the pointer has ever had. So
on reload, it often jumped to the end instead of where the user was.

(imported from commit 418ccb1144286c67503578020e88ae7b3869acd6)
2013-07-17 15:25:21 -04:00
Scott Feeney 7c39700549 Fixes for @-notification autocomplete bugs (#1418)
* Fixed highlighting of @-mention autocompletes in the new msg content box
* Fixed emojis activating not after a space (10:30, happy:smile)
* You can now autocomplete multiple names i.e. "@Jessica F"
  for Jessica Foo (this resolves Trac #1418)
* You can no longer autocomplete a full email address, e.g.
  "@lfaraone@h", the second @ stops the autocomplete. We may want to
  change this later, but for now it matches the server-side behavior
  which only completes `short_name`s.

(imported from commit 71fd195c3094484ea940a243102917cca61880d9)
2013-07-17 15:22:55 -04:00
Tim Abbott 4ffdcedae0 If multiple users match a mention, prefer the first one created.
(imported from commit e5e67c6f78a13432b19cff07bc04bddb3bd539e7)
2013-07-17 14:26:39 -04:00
Tim Abbott eecf96b520 Don't consider deactivated users for @-mentions.
(imported from commit 5e85f8c897e2ea9a3c0c37c3199666b490d6e07a)
2013-07-17 14:26:39 -04:00
Scott Feeney 1484bdf0ad Tweak edit box CSS to fit better
* line-height of 18px, same as messages you're not editing
* width of 100%, so word wrapping is more similar
* smaller margins

(imported from commit 81fc4628e0485f66615df90504462465e5805e91)
2013-07-17 14:05:16 -04:00
Scott Feeney 7a5853d41a Automatically size edit box to fit text (#1385)
(imported from commit 37cf8220334af1b70c4c9a781e66660430c19447)
2013-07-17 14:05:16 -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
Jessica McKellar ae31988e42 tutorial: tweak how we describe topics.
(imported from commit 49fb4769a0954ac5bf7ed15989227e6a6f54c6dd)
2013-07-17 12:04:45 -04:00
Jessica McKellar dac5a46fa4 Rename user-visible uses of "subject" to "topic".
(imported from commit 19e08a13624686da8703fcb8b5eefe2e29edf64b)
2013-07-17 12:04:45 -04:00
Steve Howell d61ebc2385 Support J/K as hotkeys for page_down/page_up
(imported from commit f4d092e3a3ccd5fad5e39fb6e6c454fbfeddfa50)
2013-07-17 11:48:47 -04:00
acrefoot d8ad217bab Add sender actions to sender info popover
(imported from commit 803f7e6c51f40dc7131608b2ed295f6760925f8c)
2013-07-17 11:48:41 -04:00
Waseem Daher c7f031dc53 Don't partially color in the composebox on narrow.
(imported from commit 99c3744541b5f0d993d59c5e9589f5fd30495f9e)
2013-07-17 11:03:00 -04:00
Tim Abbott 2cda98609b subs: Update checkbox states when values are changed off-page.
Previously, if you toggled the in_home_view checkbox either in a
different browser or via the button in the sidebar menus, it didn't
actually update the visible checkbox state in the streams page,
resulting in some potentially very confusing interactions.

(imported from commit 3424430231f89a23e970a2f1bfec82c6eb0d6735)
2013-07-17 10:36:58 -04:00
Tim Abbott 56810391de Sync subscription property changes to client.
(imported from commit c0504840ea0f304da67d5e4561ab30465d4567a3)
2013-07-17 10:36:57 -04:00