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.
This commit improves the saved snippets UI through the following ways:
- Reduces the space between the saved snippet title and description for
a more interconnected feel.
- Changes the delete icon from the old font-awesome icons to using the
new icon button component.
- Adds line-clamping to the saved snippet description to display two
lines of text instead of one, presenting the user with more context.
Use a more instructive placeholder instead of "Topic" when
topic is not mandatory in a realm.
Updated placeholder:
'Enter a topic (skip for general chat)'.
Since we want the width of the stream name to change responsively,
we need to use either media breakpoints or `vw` to ensure
that the stream name and topic name are visible at all widths.
This commit is a pre commit to a change that will
introduce banners and tooltips as per various
unmet conditions while composing a message.
To accomodate future changes, the toggling is
switched to conditional addition/removal of the
`disabled-message-send-controls` class while
updating the status of the send button.
Also a default cursor is added and the send
area tooltips are disabled whenever the
`disabled-message-send-controls` class is
present.
Renames "Add a new saved snippet" to "Create a new saved snippet" and
"Add saved snippet" tooltip to "Insert saved snippet".
Moves "Create a new saved snippet" button to the bottom sticky area of the
dropdown.