This helps to prevent an edge case where clicking the
new-topic button, `[+]`, in the left sidebar when the
topic box was already empty caused an unexpected flash
of the *general chat* topic.
The transitions here do not work correctly across all
states, and directly interfere or look goofy with the
transitions in the recipient-row area.
Particularly with the removal from #message-content-container,
that had the annoying effect of just delaying the
appearance of the focus border, regardless of whether
focus was established via keyboard or mouse.
Previously, if the mouse cursor were in the vicinity of
the compose box, we'd see transitions even on keyboard
interactions, which should not have been happening.
This also allows instantaneous highlighting for keyboard
users, as well as avoiding any transitions when a
mouse user clicks into a recipient-row element (at
which point the hover transitions will have already
run).
This commit shows "Only general chat allowed in this channel" tooltip
close to the topic text instead of in the center of topic input by updating
the topic input box "max-width" to "fit-content".
Note that this establishes a 30px by 30px box at
Vlad's original font-size, 15px. His spec called for
a 30px by 28px box, but does not reflect the height of
the Send button, which is 30px tall. So to maintain
that height and perfectly center the icons, we create
a 30px square for the button.
Previously, canceling an upload in preview mode &
returning to editing left the syntax unchanged
(e.g., still showing "Uploading"). This happened
because the `replaceFieldText` function does not
work when the text area's display is none.
To fix this, instead of hiding the textarea in
preview mode, we use a grid to overlap it with
the preview container. This is the same thing we
are doing in the compose box. We have also added
css to ensure the textarea remains hidden behind
the transparent preview container
in preview mode.
This commit replaces direct `.css("visibility", "...")` calls
with `.addClass("visible")` and `.removeClass("visible")` to
manage the `$topic_not_mandatory_placeholder` visibility.
This improves maintainability by keeping styling in CSS.
This reverts commit 9243fa3d52.
This commit appears to have caused the same issue with the compose box
borders at other size/zoom configurations that may be more common.
We'll figure out a better fix and apply that.