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)
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 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)
This reverts commit f8fbf70c8502370a78159e24f3cf9589fb9d384f, since
we're waiting on some Firefox and no-hover fixes.
(imported from commit 6b13f5bb9d907303ab311afd7da584bc06538c91)
We did this to check if you sent a message that would progress the
tutorial. Since the tutorial is getting overhauled we don't need this
anymore.
(imported from commit 25ee55ab034fff42a220ddd7b222b3f7459af3a1)
As does the hotkey "i". It's somewhat less appropriate because it's all actions,
but it's where our "info" menu used to be, and we can workshop a better one. "a"
feels weird to me, but maybe it's just me.
You can also hover on the .message_content to see a popover with extra message details
This is for Trac #1334.
(imported from commit f8fbf70c8502370a78159e24f3cf9589fb9d384f)
Trigger a repaint only on the messages that change fade state,
rather than repainting all messages.
(imported from commit d3a225448c004a4b467e51ceb97fda06a7a6f04b)
This change backs off from the always-open-compose-box paradigm,
so that when a user "closes" the compose box, they can no longer
type text, attach files, etc., and instead, they have buttons
to reopen the compose box.
(This change does not affect the feature that when you're in reply
mode, the compose box stays open.)
(imported from commit 32305d5b35f457a83f126a2265defdd98e885a2b)
Hopefully this time with fewer stack overflows. It sets the flag
that will break the cycle *before* triggering another focus event.
(imported from commit 5e3ed74f1eeab8a18e36525ae7c8f1f1c756eb58)
It makes the stream and subject sometimes not auto-fill when replying.
This reverts commit 86603aefbbcd5f766b0c397583483810948046de.
(imported from commit 934e991566fa7a082ab8e2ba661ec973bce46b85)
1) When you send a message, restore the focus to the composebox, targeted at the same recipient
2) If the composebox is completely empty and you press up or down, have that close the composebox and take the appropriate action
3) If you started the compose via a reply option (r, enter, click), don't refocus the composebox if the cursor has changed.
(imported from commit 84545e49d06959eb62e7fd2b22e1387383df6d1d)
Re-focuses on the compose box after a send, under these conditions:
1) narrowed to stream+subject -or- responding to PM/huddle
2) compose was initiated by clicking on a message or hitting "r"/"enter"
3) cursor has not moved since you've started the composition
Additionally, if you are thus narrowed, we will move your cursor when you've sent
a message to that message, assuming that such a message initially appears visible.
(imported from commit 373c858081694e6fc9994639340a847d66edb566)
Re-focuses on the compose box after a send, but only if
the compose-box was opened by responding to the message
at the cursor (by hitting "r", enter, or clicking on the message)
(imported from commit 8e7560c8ea31397b57b2bc3e2e7d9dd996226a6f)
Fix min-height before doing the calculation of how much a
replied-to message is being covered by the compose box. This
change also removes an outdated call to slideDown.
(imported from commit e5a3f35bbacff16dffae62c9e9f6bbc7978a13c1)
The logic for this already existed, but start() was getting called
twice, once from compose.set_mode and once from the click handler, and
the result was the focus always being in the stream input box.
(imported from commit 9a832a118856b5705524975a4412b7e6e547ef5c)
The functional change here is that our code to stop
autoscrolling on certain events, particularly mousemove,
now only runs during system initiated autoscroll events.
If the user had been replying to a message, then the feature
to stop autoscroll was too aggressive.
This patch also starts to put more scrolling-related code
into viewport.js, which will hopefully prevent some code
duplication and give us a single place to control things like
stopping animated scrolls.
(imported from commit e7d5946b0ac7fcfda2eff1d0e2b58a78b44ecc1a)
Specifically:
* Leave the avatar image as inline and round it.
* Move timestamp to the left column.
* Replace the "Info" link with a permanent info sign.
* Move the pointer bar to the left.
* Remove borders
* Change selection background colors, and PM colors.
* Introduce the "narrowing" icon into our FontAwesome set.
* Modify the tests to account for the new "narrowing" icon and fixed a bug in star-finding.
* Clean up CSS and add a more prominent color to private messages
(imported from commit 8a8d6de8acccc52c0d16f5d1ce31aabdc72c88c8)
This removes the large "New stream message" and "New private message"
from the left sidebar. It also makes the default action when clicking
inside the composebox the same as the "New stream message" button used to
do (instead of replying to the stream-subject pair at the current cursor).
(imported from commit 316f03a35b781aca4c42555f74b99c4332ff42de)
The idea here being: if there's only one line, it discourages
me from writing a long message (and also makes me think that
enter will send).
(imported from commit 424d8d305d1965ce3199ce3227dac94b395945bc)
See #1234 for details. When you upload files the old-school way
(no drag&drop), there was a bug where you couldn't upload the same
file twice, due to us intercepting the change event and not clearing
out the file list when we were done. Tested on Chrome, but uses
a known IE workaround.
(imported from commit 8120c2e8bce41f3964f4f5c21aad3a85df0e433d)
The filedrop library has a few canned errors, but it seems to mostly
let server errors come through. We try to trap 413s to give a more
descriptive error than "unknown," but this is just a bandaid fix,
and we should see what's wrong with our prod configuration.
(imported from commit eac26406866d80340f24dbdca9f34408ddb92462)
* Start a compose when we do a file upload
* Restore the "Formatting" and "Feedback" links.
* Dismiss composebox error messages when we defocus composebox
Realistically, the "correct" way to do this is not to have to
explicitly manage the composebox's state, as we do now -- it should
just be 100% visible and ready to send any time you click 'send'; it
shouldn't need to have first been composebox.start()ed.
(imported from commit 7f1725c229ed968a9b5500b25d600306173182a0)
* Properly resize compose area when we cancel out of it.
* Re-enable clicking on 'reply' in popover.
(The issue with the latter is that clicking on "Reply" started
a reply and then bubbled up and triggered our code that canceled
a reply because you clicked out of the composebox.)
(imported from commit 25d0ea58b72d2ee246217baf3eb9cac58fc858f5)
Really, the "correct" way to do this is to undo "scrolltheworld", and
then just have a compose div that always lives underneath the message
list div. (This will also allow us to deal much more reasonably with
the whole "Is the composebox in focus" thing.)
In the interest of prototyping something more rapidly, though, we
adopt the somewhat more hackish approach, with the understanding that
much of it will probably be simplified later.
(imported from commit e2754be155c522b6dac28e7b84c62bd2030217c8)
Changes include:
* New markup for the button in compose.html
* A hidden file input field in compose.html
* Added reference to the file input field in filedrop
initialization in compose.js
* A feature test and a click event binding for
the "Attach files" button in ui.js
* New paperclip icon reference in fonts.css
* New general hidden display classes in zephyr.css
* New composition pane button classes in zephyr.css
Fixes to the "Attach files" button commit e673bda...
Changes include:
* Fixed the feature test for (new XMLHttpRequest).upload so
it works in Firefox.
* Renamed .button to .message-control-button
* Removed stray newlines
(imported from commit c1f0834b74fd7120ec27db64ec380ffb3fa34633)
The internal format of 'message' had changed, so prior to this commit,
the tutorial was receiving (a) internally inconsistent, and (b)
not-what-it-expected versions of the message.
(imported from commit 233b934e6b600bd59125d133fdf7443fd8f6bbf8)