Created up, down, page_up, page_down, to_home, and to_home pretty
mechanically from the old hotkey.code.
(imported from commit 5956b91c2e0122c6440f70db9b92f918c9b599aa)
Because there's no guarantee that Hamlet has message IDs 1 and 2, and
the update_unread_counts function didn't return an error in the event
that you passed it a message that the user never received (it instead
silently succeeded), this test was mostly useless.
I just dumped the test_initial_counts function, because it didn't seem
to be doing anything useful.
(imported from commit 4d76104eb9f3b947727a1a030afc0b57054d0daf)
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)
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)
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)
The code now unminifies all calls in the stack, including those outside
of app.js.
This requires the Python package sourcemap, recently added as a
dependency.
(imported from commit 550c73ad5bfe78a2c7169c11da0c95cbaac238d7)
This will allow you to always get Home from the search box,
as well as easily backing out narrows.
(imported from commit 68bcfc83ce0428645f4e734ae46f9589cb562a86)
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)
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)
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)
(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)
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)
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)
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)
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)
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)
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)
This fixes the bug where the pointer jumps to the top if it reloads
before finishing loading.
(imported from commit 6b2d80acab4d4232f6eb87695193592a83c4466a)
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)
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)
* Redo table borders as inset shadows to make them sharper
* Make the selection highlight a blue border with blue glow
(imported from commit 758884cc7e17952ba68e4aab6215f3e026dc8fe8)
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)
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)
(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)
`process_condensing` before updating the scroll position, because it can
change the height of messages.
(imported from commit ca500351447fcabc3b03bb01a55a8e25bf8e9578)
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)
* 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)
* 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)
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)
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)
Previously, narrowing to a stream also narrowed to
/^(un)*stream-name(.d)*$/, but not the other way around.
(imported from commit 6643f8d8306a737f4e96d473dd1fdbfdcd56e2a8)
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)
* 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)
Fixes issues with e.g. foo@hamlet.com (where hamlet is a user)
The \b was ineffective because @ made it always on a word boundary.
Instead, use the negative lookbehind trick from the URL regex.
(imported from commit fdca9bd686e4f8747e67b412cba1fa7c5c9391aa)