Commit Graph

2109 Commits

Author SHA1 Message Date
Aman Agrawal
c9a4660911 header: Avoid using .dropdown for class name.
This is avoid conflict with styles defined for `.dropdown` in
bootstrap.
2024-01-12 08:40:51 -08:00
Aman Agrawal
9d1e977e2a portico: Don't use dropdown-toggle class.
We want to avoid using `dropdown-toggle` class to avoid
properties leaking from bootstrap.
2024-01-12 08:40:51 -08:00
Aman Agrawal
70ecdf2add helpers: Remove dead bootstrap tabs code. 2024-01-12 08:40:51 -08:00
Anders Kaseorg
be13557ead playground_links_popover: Remove wrong $ prefix for non-jQuery variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-11 18:15:59 -05:00
Anders Kaseorg
43e53d9b9d user_status: Fix parsing of partial user_status events.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-11 14:06:11 -08:00
Karl Stolley
272b62138e message_row: Remove styles and JS for nonexistant .sender-status. 2024-01-11 12:53:29 -08:00
evykassirer
4b14f0efad stream_topic_history_util: Convert module to typescript. 2024-01-11 12:45:39 -08:00
evykassirer
8bd9a91216 stream_list_sort: Convert module to typescript. 2024-01-10 17:43:08 -08:00
evykassirer
a75253cdba stream_list_sort: Use more accurate stream_id name. 2024-01-10 17:43:08 -08:00
evykassirer
426e345e65 stream_list_sort: Use a flag instead of checking for undefined list. 2024-01-10 17:43:08 -08:00
Aman Agrawal
c58c12911c typing_events: Show typing notification in a proper topic narrow.
It is possible to have multiple topic / stream terms if user
is searching or if the URL is malformed. So, we should check
if the user is in a proper topic narrow before showing
typing notifications.

This fixes the error of topic being undefined due to there
being multiple topic terms in narrow when trying to display
notifications.
2024-01-10 09:08:38 -08:00
evykassirer
cd58655a4b stream_topic_history: Convert module to typescript. 2024-01-10 09:02:17 -08:00
evykassirer
8a1fa8b161 stream_topic_history: Simplify add_or_update params. 2024-01-10 09:02:17 -08:00
Sahil Batra
dcac272afc user_group_popover: Convert module to typescript. 2024-01-09 16:47:37 -08:00
roanster007
69de75ec0b compose: Fix display of compose banner when dm disallowed.
Previously, when the compose bar was open with any DM recipient,
and the organization wide setting to disallow DM is toggled, then
the DM not allowed banner is not displayed on the compose until
it is reopened.

This is fixed by changing the server event dispatch of
private_message_policy from noop to a method to  check for
the compose's posting policy status, and display the banner.

Fixes #27774
2024-01-09 12:35:02 -08:00
N-Shar-ma
ed949fbc92 compose: Fix duplicate warning banners for the same private stream.
Earlier, a new banner would be showed for each mention of the same
private stream in the compose box. This commit fixes that by checking
if the private stream warning banners already shown include the private
stream just mentioned, and if so, not showing a new banner.

This implementation is in line with the one for warnings for mentions of
users not subscribed to the current stream.

Fixes: #26914.
2024-01-09 10:44:43 -08:00
Anuja Patil
a3252e0de7
typeahead: Improve slash command typeahead text.
Update the text displayed in the typeahead suggestions for slash commands 
(/poll, /todo, /me) to be cleaner and clearer.

Fixes #27391.
2024-01-09 10:34:05 -08:00
Aman Agrawal
2c6a811468 upgrade: Fix free trial showing annual schedule.
If localstorage has `annual` schedule set, upgrade page for
free trial will show annual schedule. We fix it was overriding
the schedule if it was set to be fixed to a value by us.
2024-01-08 14:41:22 -08:00
N-Shar-ma
f99635d582 refactor: Pass only stream id, not name, to compose_actions.start().
As part of the process of moving from stream names to ids, we now only
pass the stream id in compose args to `compose_actions.start()`.

For when we still need the stream name, and have access to the compose
args, we compute it from the id exactly where needed, to localise the
instances of stream names.
2024-01-07 16:39:56 -08:00
Varun Singh
af3b15ef10 read_receipts: Convert module to TypeScript. 2024-01-05 11:52:59 -08:00
Tim Abbott
c5a9c78af7 settings_realm_domains: Fix linter error.
This got through into main because the linter error is new.
2024-01-05 11:32:04 -08:00
Varun Singh
4b04716237
settings_realm_domains: Convert module to TypeScript. 2024-01-05 10:50:08 -08:00
evykassirer
979ace1cea message_util: Convert module to typescript. 2024-01-05 10:47:12 -08:00
evykassirer
c20df9d64a message_list: Return consistent data structure from add_message.
This was weird, and I think incorrect. Places that call add_message
seem to expect consistent data structures.

I tried looking a bit into it, and couldn't find anywhere where
returning true made more sense. I'm sort of confused this hasn't
caused issues though.
2024-01-05 10:47:12 -08:00
evykassirer
4e66e8742f rows: Convert module to typescript. 2024-01-04 12:45:42 -08:00
evykassirer
e3e0125092 rows: Throw exception instead of returning NaN.
We don't expect this to happen, and we don't want
to try to maintain the difficult task of gracefully
handling errors that we don't expect to happen
anyways. This will also make the conversion
to typescript easier.
2024-01-04 12:45:42 -08:00
evykassirer
17bc9af106 message edit: Select message id before getting row.
Getting the row was sometimes causing errors because
the row wasn't in the DOM at the time of trying to
get it. By selecting the message id first, we ensure
it's in the DOM before we call `get_row`.

More conversation here:
https://chat.zulip.org/#narrow/stream/464-kandra-js-errors/topic/Error.3A.20Caller.20should.20pass.20in.20a.20single.20row.2E
2024-01-04 12:45:42 -08:00
N-Shar-ma
48d0d49fde compose: Clear stream id when prompting user for stream selection.
Now we clear the stream id from the compose state on opening the stream
selection dropdown when no stream is specified.

This fixes the bug where the compose box placeholder text would refer to
the previously selected stream, even when the open stream dropdown had
no stream selected.
2024-01-04 10:59:36 -08:00
evykassirer
434b67caf5 message_feed_top_notices: Convert module to typescript. 2024-01-03 14:39:26 -08:00
Sahil Batra
9197a2c3e2 user_pill: Add support to not allow adding inaccessible users manually.
We previously allowed adding pills for inaccessible user by typing
the email manually. This commit updates it to handle inaccessible
users like we handle invalid emails.
2024-01-03 11:04:35 -08:00
Sahil Batra
ede88191a8 input_pill: Define a type for pill_config object. 2024-01-03 11:04:35 -08:00
evykassirer
cd9a479a7e narrow_banner: Convert module to typescript. 2024-01-03 10:28:10 -08:00
evykassirer
08bee0f180 message flags: Convert module to typescript. 2024-01-02 16:48:45 -08:00
evykassirer
a87b1d5ad8 filter: Use terms instead of operands.
Operand is a confusing name because this
data structure has an attribute *called*
operand. This commit renames references to
this structure to "term", short for "search
term".
2024-01-02 16:24:53 -08:00
evykassirer
c0719e0285 pm_list_data: Convert module to typescript. 2024-01-02 10:27:02 -08:00
Anders Kaseorg
06d439e0b2 typing_events: Fix early read of page_params.
For spectators,
page_params.server_typing_started_expiry_period_milliseconds has not
been initialized yet at module load time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:39:10 -08:00
Anders Kaseorg
45c8dcc9c3 typing: Fix early read of page_params.
For spectators,
page_params.server_typing_started_wait_period_milliseconds and
page_params.server_typing_stopped_wait_period_milliseconds have not
been initialized yet at module load time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:39:10 -08:00
Anders Kaseorg
80432c8c06 stream_create: Fix early read of page_params.
For spectators, page_params.realm_create_public_stream_policy,
page_params.server_web_public_streams_enabled,
page_params.realm_enable_spectator_access have not been initialized
yet at module load time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:39:10 -08:00
Anders Kaseorg
8f069ac1d8 settings_profile_fields: Fix early read of page_params.
For spectators, page_params.custom_profile_field_types has not been
initialized yet at module load time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:39:10 -08:00
Anders Kaseorg
2a69545bec page_params: Move initial_pointer and friends to message_fetch.
These aren’t sent by the server; they’re client-side global variables.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:37:50 -08:00
Anders Kaseorg
e8e7142ed1 page_params: Move events_queue_expired to server_events.
This isn’t sent by the server; it’s a client-side global variable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:37:50 -08:00
Anders Kaseorg
8514c8d739 page_params: Fix types of narrow, server_sentry_dsn, user_id.
page_params.narrow may be undefined, page_params.server_sentry_dsn may
be null but not undefined, and page_params.user_id may be 0 (for
spectators) but not undefined.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-29 14:16:19 -08:00
Anders Kaseorg
a5d51a0895 people: Don’t reference nonexistent page_params.is_bot.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-29 13:05:30 -08:00
sayyedarib
b430ba2bd5 navbar_help_menu: Migrate module to typescript.
Signed-off-by: sayyedarib <sayyedaribhussain4321@gmail.com>
2023-12-29 12:15:08 -08:00
Anders Kaseorg
2cf8f1c063 page_params: Move page_load_time to zulip_test.
This isn’t sent by the server; it’s a client-side global variable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-29 11:58:58 -08:00
evykassirer
baf6c68ab8 starred_messages: Migrate module to typescript. 2023-12-28 18:24:40 -08:00
evykassirer
baba72df91 compose_banner: Restrict banner to only JQuery, never htmlString.
Co-authored-by: Anders Kaseorg <anders@zulip.com>
2023-12-28 16:53:46 -08:00
evykassirer
1f21510dd4 compose_notifications: Convert module to typescript. 2023-12-28 16:53:46 -08:00
Varun Singh
62a636068e subscriber_api: Convert module to TypeScript. 2023-12-28 15:05:16 -08:00
evykassirer
6157d83d3a unread_ui: Convert module to typescript. 2023-12-28 11:26:37 -08:00