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)
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)
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)
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)
For completions, since we have no representation of categories, users
might expect lexical ordering.
(imported from commit d2e27dd4d8452df6ac48d44551802d7e65519115)
Instead of `compressed_js` in the `compress` library, we now use
`minified_js` from the `minified_js` library. (CSS is not affected by
the change.)
(imported from commit 07aea9efbc83d30b354a7e044070563e93f7525a)
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)
Until now, page_params.staging has been dependent on whether DEBUG =
True. On your local server, page_params.staging is true unless you set
DEBUG to False to test minification, in which case, it's false. This
situation still counts as staging IMHO, and the new behavior will be
more useful for testing as well as consistent.
Quick reference chart:
Is page_params.staging true... without this commit? with this commit?
-------------------- -----------------
On a local server, DEBUG=True Yes Yes
On a local server, DEBUG=False No Yes
On staging Yes Yes
On production No No
(imported from commit 6ea960e7945844dde0fbedbe901062508312b051)
We switch to always specifying HostKeyAlgorithms=ssh-rsa because of a ECDSA
key bug in the Debian images which results in the fingerprint not being
printed to the console. Our config later forces RSA after we do a puppet
apply, so we might as well start using RSA from the beginning.
We start out sshing in as "admin", and delete the user (moving keys over to
"root") at the beginning.
We switch to the ops repo instead of backports, and drop the installation
of puppet from backports.
We no longer install humbug-self-signed.key on our servers; instead real
certificates must be installed manually.
(imported from commit cbabe65a4e0ef37df1fece6eaec053a2368f6ef5)
I don't fully understand the need for this, but I have seen some
tracebacks on app that complain:
File "/home/humbug/humbug-deployments/2013-07-11-19-28-10/zephyr/lib/actions.py", line 1289, in handle_missedmessage_emails
timestamp - user_profile.last_reminder < waitperiod):
TypeError: can't subtract offset-naive and offset-aware datetimes
Since timestamp in this case comes from timestamp_to_datetime
that explicitly sets the tzinfo, we know it's tz-aware. The only
other possibility is that user_profile.last_reminder is **not**
tz-aware, though I am not sure why that would be the case.
(imported from commit 67e33f4510e91fa9de504f0c610515581312c98b)
It would show the recipient bar unfaded over a faded message when
narrowed to a stream.
(imported from commit 576e7bd7bdf1fbb3f241f1ba8cd1548c4546257d)
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)
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)
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)
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)
* Allow email addresses surrounded by <>
* Reject things that look like email addresses that have a path after them
This requires adding a new branch to the regex specifically for email addresses.
* Fix comment whitespace
(imported from commit 0383cd4067ae9ee31f3802e6777a200ba1cbccd6)
Be more restrictive on what characters can be part of a URL and what
characters can precede a URL to prevent linkifying other strings that
come just before a valid URL. Allow : and , before a URL.
(imported from commit f072980b39ff652edf20de0585f256f072d04e88)
This is how Reddit does it, and in a way I actually find
it more intuitive -- it's more x => y.
(imported from commit 79e06f8d85d07eea417b9e1ff2d792c3af3f6acc)
Previously we had fancy logic to determine where to focus, but immediately
clobbered any focus choice we made and forced the stream selection to be in focus.
We also incorrectly determined what to focus in the case of clicking the new PM
button when in a stream narrow.
(imported from commit 01e2cec8eca068ee1d45d3cfb21607b981d5034e)
It seems that even though we set the From to be <noreply@humbughq.com>
it's possible that when sending mail via Google it automatically sets
the From: field to be humbug@humbughq.com. Here we set Reply-To to noreply@
in all cases explicitly in order to avoid having replies sent to our
inboxes.
(imported from commit 5fa643be2b78fd632e310836bf1be862d6f1d333)