Commit Graph

14 Commits

Author SHA1 Message Date
Karl Stolley
a3a43c2f8b compose: Handle fading with general chat.
This commit also attempts to fix a bug, present in main, where a
draft restored directly to the compose box loses its original topic
upon switching to other topic narrows.

Co-authored-by: Prakhar Pratyush <prakhar@zulip.com>
2025-02-26 13:59:03 -08:00
Karl Stolley
cae48d3faa compose: Rename placeholder update function for clarity. 2025-02-26 13:59:02 -08:00
Apoorva Pendse
8496a40564 compose_banner: Assign banner priority.
Assigns priority to banner errors as
mentioned in #32115.
2025-02-23 23:11:18 -08:00
Vector73
cb6f0fd63c realm: Add setting to notify user on DMing guest.
Added `enable_guest_user_dm_warning` setting to decide whether
clients should show a warning when a user is composing to a guest
user in the organization.

Fixes #30078.

Co-authored-by: adnan-td <generaladnan139@gmail.com>
2025-02-06 12:15:41 -08:00
Steve Howell
0a6a37fcff node tests: Extract compose_helpers lib.
For now compose_helpers only includes FakeComposeBox.
I don't love either of the names, but some of the alternatives
that I thought of have their own tradeoffs.

The compose_helpers module will soon have other
helper classes or functions in it, possibly including
the mock_banners helper from lib/compose_banner.

I don't want to step on mock_banners yet, because
I have two possible plans for improving that code,
and I haven't decided what's best yet, so for now
I don't want to step on it or move it, so I am
just leaving that alone for now.

Gotta start somewhere.
2025-01-09 15:08:17 -08:00
Steve Howell
d0730131a2 compose tests: Create stubs for height and css.
This is a bit of an emergency fix to fix the build, but
it is probably close to what we want.

Any test that cares about the height of the compose box
can probably override this behavior.  Likewise for any
css calls.
2025-01-07 16:34:31 -08:00
Steve Howell
b5d0858632 compose tests: Encapsulate zjquery interactions. 2025-01-07 13:16:35 -08:00
Steve Howell
31bdbd0f67 compose tests: Rename "foobarfoobar". 2025-01-07 13:16:35 -08:00
Steve Howell
9da5b8e7be compose tests: Remove unnecessary zjquery setup.
There is no point creating all this fake DOM if are
not gonna validate anything about it.
2025-01-07 13:16:35 -08:00
Steve Howell
586eb46ef1 compose: Rename enter_with_preview_open.
The old function name sounded like you were entering
preview mode when, in fact, hitting the enter key
in some cases **exits** you from preview mode.

This was particularly confusing to read in the tests.
2025-01-07 13:16:35 -08:00
Sahil Batra
bbf43a2866 stream-settings: Use new "can_send_message_group" setting. 2025-01-07 12:17:36 -08:00
opmkumar
5eb51e2df6 message_edit: Add message length limit indicator in edit message UI.
Adds a message length limit indicator similar to the one in the compose box.
The tooltip message for the disabled save button now appears dynamically
based on whether the message exceeds the length limit or the editing time
has expired.

Fixes #25271.
2024-12-04 11:44:51 -08:00
opmkumar
88727862b4 compose: Refactor functions for handling max length limits.
Refactors `check_overflow_text` and `validate_message_length` functions.
This commit ensures that there won't be any change in the existing UI
of the compose box with the refactoring of the above functions.
2024-12-04 11:44:51 -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