Commit Graph

10 Commits

Author SHA1 Message Date
Daniel Krol
12d36ebfee tests: Remove unused .css = noop.
The front end tests pass without these removed lines. There are a few
such lines that are still necessary.
2025-05-13 12:05:28 -07:00
Anders Kaseorg
1a41a13ea3 upload: Avoid unnecessary .one() usage to simplify test.
Both of these handlers immediately hide the banner, so the difference
between .on() and .one() doesn’t matter.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-08 18:21:57 -07:00
Aman Agrawal
b8651e78e7 upload: Fix send button disabled when compose is closed during upload.
While uploading a file, if you close the compose box, and reopen
it, compose send button remains disabled due to upload in progress
being true.

To fix it, we update upload status for compose when upload is
cancelled.
2025-04-03 12:57:14 -07:00
Aman Agrawal
ad0b616bbd compose: Remove old style compose send disable.
We now use `disabled-message-send-controls` class to control
the disabled status of send button. So, this is not required.
2025-03-25 11:28:43 -07:00
Aman Agrawal
4fbf91c135 compose: Fix buggy tooltip on validation.
Compose send tooltip was not correctly displayed when the compose
box was in an invalid state.

We significanlty improve the logic for displaying the tooltip here
to provide a more robust experience to the user.
2025-03-17 11:35:56 -07:00
Apoorva Pendse
54fd02b173 compose_tooltip: Remove delay for invalid messages.
Does what 714def080f
was trying to do without the side effects.
Fixes: 714def080f
2025-03-11 09:41:22 -07:00
apoorvapendse
0b12c51771 compose: Add tooltip support for invalid messages.
This commit adds tooltip support for various
invalid conditions mentioned in issue 32115.

A `show_banner` positional argument is added
in the `validate` method which has a default
value of true.

The reason behind introducing this is to
not trigger banners on hovering the disabled
send button, since the tooltip message is also
determined using the same validate method.

We want to only disable the button on hover,
which is why the update_send_button_status() method
is called only on "mouseenter" event, which is
added to the send button in compose_setup.js

To incorporate this change a new param is
introduced which determines whether to enable/disable
send_button by running update_send_button_status

Earlier, typing something in the textarea or
recipient box would also trigger
`update_send_button_status` which doesn't
work well since we've introduced a lot of
new booleans which determine whether send
button gets disabled causing send button to
get disabled while typing instead while hovering
Hence this change.
2025-02-23 23:11:18 -08:00
Alex Vandiver
ac7bdc73bb upload: Use the returned JSON from the server for filename and URL. 2025-01-06 15:25:32 -08:00
Alex Vandiver
2d758951b4 upload: Immediately re-enable send after upload completes.
Do not make the user wait for the animation + 100ms to click "send."
2025-01-06 15:25:32 -08:00
Anders Kaseorg
687f1b1651 tests: Rename the Node tests to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00