Commit Graph

2337 Commits

Author SHA1 Message Date
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
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
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
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
Tim Abbott 907bb154b1 Support changing one's name without a reload.
(imported from commit 4e7aea017f016494e2674f11b96681e098816f2d)
2013-07-17 10:36:57 -04:00
Jessica McKellar fd0d8799ca Focus on the right text box when you initiate a message edit.
(imported from commit ac55ec174ade75c0ebd987f934e3857dd3d94849)
2013-07-17 10:24:54 -04:00
Allen Rabinovich 5b84b2db87 Add light blue background color on narrow
(imported from commit a007bdc48c802b36fa5185ed9d153503298150fc)
2013-07-16 15:52:18 -07:00
Scott Feeney bd63fdf81c Fix Trac #1511, compose focus when narrowed to PMs
(imported from commit a8fd2f018b6082599524d039826821d2337a6186)
2013-07-16 17:57:54 -04:00
Zev Benjamin eb93f20f95 On MIT, when narrowing to an unclass (or derivatives) also narrow to the base stream
Previously, narrowing to a stream also narrowed to
/^(un)*stream-name(.d)*$/, but not the other way around.

(imported from commit 6643f8d8306a737f4e96d473dd1fdbfdcd56e2a8)
2013-07-16 16:53:08 -04:00
Jessica McKellar 4ac64ed6eb If you unnarrow while scrolling, wait for the scroll to finish.
Otherwise you may end up scrolled to a random place.

(imported from commit 99d73b1876e3bde288b14b00bd48b1013f40e268)
2013-07-16 14:17:42 -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 2d7d98adc7 Kill off typeahead_helper.update_autocomplete() and friends
(imported from commit f486c571911c0b5a62a43c976579c3a036881778)
2013-07-16 13:29:18 -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
Steve Howell 0a7b5e5b6b Rename render_object_in_parts to get_object_parts
(imported from commit b040bb60d166a2f904c8d1280fb51693e0d50977)
2013-07-16 13:29:17 -04:00
Steve Howell b4dd0efc74 Move describe() from narrow.js to search.js.
(This function is only used in the search code.)

(imported from commit 44d53fbd73be56d9d416ebcafdc517c686e7adf8)
2013-07-16 13:29:16 -04:00
Tim Abbott 84a97f5c41 Document how our desktop notifications work.
(imported from commit 991d7541283d7d8d17836f5322abb0da780eba25)
2013-07-16 13:16:24 -04:00
Kevin Mehall 0975cfadf1 [third] Patch bootstrap-typeahead to hide when the source fn returns false.
On the next line, it checks and returns immediately if the source returns
false, but it should first hide the existing box or else it's just left
there until the next typeahead refresh.

This fixes the issue with the typeahead not closing properly when a space
is typed that was introduced in 7aa3f762.

(imported from commit cbe77e2152d889fe53d874e97f41cfc725166929)
2013-07-16 11:35:13 -04:00
Allen Rabinovich 4e043feeb1 Add proper Zulip wordmark to the top left - just retina version for now
(imported from commit 6160b85d742b374adca3299e2e5f48ae24b985d2)
2013-07-15 21:21:49 -04:00
Waseem Daher 6b91d8e51e Update app screenshot on /hello.
This one is also pretty bad, but it's at least correctly branded.

(imported from commit 7a8d7e0320e19809056483257b70e22c2956a06a)
2013-07-15 18:05:28 -04:00
Waseem Daher fc4a8af707 Update /apps screenshot for Windows and Mac.
(imported from commit 2886ffabb0fc7cea4ed30ffda4aba9ee8f5de03b)
2013-07-15 18:05:27 -04:00
Allen Rabinovich 5f60d12152 New zulip favicons
(imported from commit ff88af24bdfeeaaf015c04324467997aacc6407a)
2013-07-15 15:04:52 -07:00
Jessica McKellar f95662bd75 Switch to @zulip.com or the neutral @example.com in example uses of e-mail addresses.
(imported from commit 5d5c291d6d0d0d7c44eb092dddb4406cd278a0e3)
2013-07-15 17:49:00 -04:00
Jessica McKellar 4d19c784d8 Switch from the @humbughq.com to @zulip.com addresses users can contact.
In particular support@ and jobs@.

(imported from commit 8051ae5628b7378cde49b160d26b704e7e14bb24)
2013-07-15 17:49:00 -04:00
Jessica McKellar 108ecb3b5b Error pages: Switch from Humbug to Zulip in user-visible text.
(imported from commit ce698d141564d0fce043539e7b1e9c2b9781fee3)
2013-07-15 17:38:18 -04:00
Jessica McKellar 636a5f13e1 JS: Switch from Humbug to Zulip in user-visible text.
(imported from commit 968d4f4ac84a6612492d8d063ede7dab5a2c5786)
2013-07-15 17:38:18 -04:00
Jessica McKellar d7ebd7ed84 Handlebars templates: Switch from Humbug to Zulip in user-visible text.
(imported from commit dc9ee6915454ce8f01bc4e4fafea1070d5be1cc7)
2013-07-15 17:38:18 -04:00
Waseem Daher ba762dbac5 Remove stray <hr> at the bottom of the message info popover.
(imported from commit 9283fcb13b2a3deb265ead9da3f2b3b9b05853cb)
2013-07-15 15:27:09 -04:00
Kevin Mehall 79af591b41 Show an item for @all in the autocomplete list.
Trac #1509

(imported from commit 4bc5f088a354dea4ffaf98ac2d988d9d05b19d51)
2013-07-15 13:26:45 -04:00
Kevin Mehall 191c6b6412 Refactor emoji/mention autocomplete:
* Do the string processing to extract the current token once
   when autocomplete is started in `source` rather than repeating
   it once per potential completion in `match`.
 * Store a property for whether we're completing emoji or mention
   instead of performing different tests on each step.

This reduces the lag on emoji autocomplete.

(imported from commit 7aa3f762eaf4286608809a09a3cddbbe3dfcabf9)
2013-07-15 13:26:45 -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
Zev Benjamin c13c7f9661 Add support for absolutely positioned loading indicators
(imported from commit 749b1e866610c686c27cd0a5a492a04dc4d00bf6)
2013-07-15 11:13:53 -04:00
Zev Benjamin 3f7d01428c Only try to destroy a loading indicator once
This didn't /seem/ to be hurting anything before, but we really
shouldn't be doing it more than once.

(imported from commit 8d4ad7f8376227db723259ec9293262233b0a69a)
2013-07-15 11:13:53 -04:00
Zev Benjamin be0c29252e Make make_loading_indicator take its optional text via an options argument
(imported from commit 935f9049c00183f52bad80d54520f81efceb3e49)
2013-07-15 11:13:53 -04:00
Jessica McKellar b372c516cc Update the minimum message size, which is used in visible message calculations.
(imported from commit 196036b34596657c5a81250a05e1d650c41324b8)
2013-07-15 10:53:04 -04:00
Jessica McKellar 1acca8edfa Rewrite within_viewport much more cheaply using getBoundingClientRect.
(imported from commit b7a4434d426a258f89a276f472e71b04c1997df7)
2013-07-15 10:53:04 -04:00
Jessica McKellar 3ddf0187b9 Remove the narrow/unarrow opacity animation.
It increases the time to narrow without really helping indicate that
you are narrowed.

(imported from commit deacd4480cd07502905cd9f157eb34bc9391f377)
2013-07-15 10:53:03 -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
Tim Abbott 5fc6fb5896 Include a link button after the subject when it matches a realm filter.
This way if you refer to "trac #253" in the subject, it's super
convenient to get from your recipient bar to the ticket.

A note on performance: this part of rendering for 1000 messages takes
about 3.5ms for messages with 1 match; this is small compared to the
overall time for to_dict_uncached for that many message objects, so I
think this is OK for now.

(imported from commit 5bdc2b8415d7599d59eb554739f545c485b78d5a)
2013-07-15 10:41:13 -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
Leo Franchi 550aea8c64 Show a light STREAMS title in the streams list
(imported from commit 675ebca52ba10b8075bb788adf70d293b4d58fde)
2013-07-12 18:34:13 -04:00
Scott Feeney 91831d5ba7 Refactor compose code to clarify API
Renamed show, hide and clear to show_box, hide_box, and clear_box,
to make it a little more obvious what each one does and make them
greppable.

Also, hide and clear weren't being used by any other modules, so
these functions are no longer exported.

This resolves Trac ticket #1503.

(imported from commit 904d596ef5b8dc2154dc01ed7c9c99a54dc9b31e)
2013-07-12 18:26: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
Leo Franchi 017bd6b8b1 Don't limit ourselves to webkit for audible notifications
Previously we were checking for webkit before checking for
$('<audio>') support, but that cuts out non-webkit browsers that support
the basics of the HTML5 audio api.

Now we actually run the feature test in order to enable it, and only
check for webkit when enabling webkit-specific desktop notifications

(imported from commit 851eed86af167d0530f7e1793e2ca1f9b4cdd71d)
2013-07-12 17:28:50 -04:00
Kevin Mehall 218a7dc1bd Send message on Ctrl/Cmd-Enter.
Trac #1445

(imported from commit d9d623ea260c1eaffdcdc49773152e8cf18d3f1c)
2013-07-12 16:17:22 -04:00
acrefoot 00684e1632 Sort our emoji list lexically as opposed to the order of emoji-cheat-sheet
For completions, since we have no representation of categories, users
might expect lexical ordering.

(imported from commit d2e27dd4d8452df6ac48d44551802d7e65519115)
2013-07-12 14:33:39 -04:00
Leo Franchi e5b855d883 Add a bulk invite page for the first user in a realm
(imported from commit cf85c9d475209da4591e2f06f142008fb19ac9d5)
2013-07-12 13:07:02 -04:00
Scott Feeney ffa8541818 Remove vestigial parts of old minify code
(imported from commit 692e292528a1697687f1b3024c58371b2cf9b5c9)
2013-07-12 11:59:11 -04:00
Scott Feeney 2c33320746 Reuse minified JS from previous deploys
This is a big change affecting lots of areas:

* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
  minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
  update-prod-static, is used to copy minified JS from a previous
  deploy (i.e., a previous git checkout), if the source files have
  not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
  than Pipeline's compressed_js

Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.

Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.

(Based on code review, this commit has been revised to:
 * Warn if git returns an error in minify-js
 * Add missing output redirects in update-prod-static
 * Use DEPLOY_ROOT instead of manually constructing that directory
 * Use old style formatting)

(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-12 11:59:04 -04:00
Kevin Mehall 7f7843020d Show server errors in the message edit form.
Refactor common code from compose into a util function.

Trac #1455, #1448

(imported from commit 6fb691ac952b833655584b05f6caedaefe41c1a0)
2013-07-12 11:35:09 -04:00
Scott Feeney 86151bb5ef Blueslip: on staging, save stacktrace for easy c&p
(imported from commit 5c6b3ddd789100b011aeef863495ae8cb5cdaac8)
2013-07-12 11:33:17 -04:00
Allen Rabinovich c534d7cde7 A better chevron for message actions dropdown
(imported from commit 4ef172175db927f5385aceb2b369349adc47201a)
2013-07-12 06:13:20 -07: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 4313f2ff1e Set initial user presences in O(n), not O(n²) time
Previous code iteratively called set_user_status() once for each user;
which in turn was rerendering the user sidebar, also once for each user.

I changed the API a bit by replacing activity.set_user_status() with
activity.set_user_statuses(), plural, that takes an object and updates
all the user statuses in one go before rendering.

(imported from commit 1111c9029264f892f25e76d2e5e5ff996dcbc7ca)
2013-07-11 16:48:29 -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
Waseem Daher b2fa0d4b9f Don't have huge left-and-right margins in less-wide windows.
Having a margin of 20px on both sides is rather overkill, especially
when the screen isn't super-wide. (And when it is super-wide, we can
control the width with max-width anyway.)

This actually doesn't really free up that much space -- the main
constraint actually seems to be the width of the column itself -- but
psychologically I feel like it feels a bit better.

(imported from commit 6122f0bd3042ee2faf154921c946c0bd65c956ef)
2013-07-11 15:47:08 -04:00
Leo Franchi 3525b88fa1 Add messages to all our message lists before calculating unread
(imported from commit e216246a045a3ed2de43076e89eb99648c8bac56)
2013-07-11 15:06:32 -04:00
Kevin Mehall 862f07c9d8 Update fade when returning to home view.
Fix a minor bug where if you return to the home view with a recipient
filled out, it would be unfaded.

(imported from commit d81d974dcb054c63d8a5dd5afec7b072c99d4e3f)
2013-07-11 15:00:10 -04:00
Kevin Mehall 5062a148df Don't fade when subject box is empty.
Otherwise it fades all messages.

Trac #1468

(imported from commit 393514f9f3b2b7f46945878d93e8c12e4685afeb)
2013-07-11 15:00:10 -04:00