Commit Graph

1701 Commits

Author SHA1 Message Date
Aman Agrawal
a9b51f80ba people: Defer loading user data during app load.
This should greatly reduce the symptoms of a bug where a stale
realm_users cache (missing a newly created user) results in the web
client missing the new user and throwing exceptions.
2025-05-20 13:55:48 -07:00
bedo
465a0ef0d0 message_util: Rename "get_messages_in_topic".
Follow-up commit.

This renaming clearly conveys that
fetched messages are cached.
2025-05-19 00:08:29 -07:00
Anders Kaseorg
8325a51750 unread_ops: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-18 16:22:15 -07:00
Anders Kaseorg
c248459af2 search_pill: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-18 16:22:15 -07:00
Anders Kaseorg
21fc5d71e1 tests: Move tests out from the middle of the Typeahead mock.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-18 16:22:15 -07:00
Anders Kaseorg
77a92100df popover_menus_data: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-18 16:22:15 -07:00
Anders Kaseorg
d8ba3b4ea7 navbar_menus: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-18 16:22:15 -07:00
Anders Kaseorg
26f664be69 hotkey: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-18 16:22:15 -07:00
Anders Kaseorg
f3cb557fb2 compose_validate: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-18 16:22:15 -07:00
Anders Kaseorg
7c6d040fd8 compose_recipient: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-18 16:22:15 -07:00
whilstsomebody
2780360b00 unarchive: Add support for unarchiving archived channels.
This commit adds support for unarchiving archived channels
by introducing the `is_archived` parameter to the
`PATCH /streams/{stream_id}` API endpoint. Sending a PATCH
request with `is_archived: false` will unarchive the specified
channel.
2025-05-16 11:39:40 -07:00
Evy Kassirer
2cbf9e130e drafts: Store DM drafts with user ids instead of emails.
Fixes #34468.
2025-05-16 10:51:29 -07:00
Evy Kassirer
efda73536f compose: Prefer using recipient_ids over recipient_emails. 2025-05-16 10:51:29 -07:00
Evy Kassirer
ea7a2570bf compose_ui: Convert ComposeTriggeredOptions to use PM user ids. 2025-05-16 10:51:29 -07:00
Evy Kassirer
38bf407c9a compose_actions: Migrate start() to use pm recipient ids. 2025-05-16 10:51:29 -07:00
Evy Kassirer
464b7f4540 compose_state: Rename private_message_recipient to clarify it stores emails.
This will add clarity as we move towards using ids more and emails
less.
2025-05-16 10:51:29 -07:00
Sayam Samal
0914732387 settings: Improve enable_or_disable_save_button method code.
This commit reorganizes the code in enable_or_disable_save_button
method, and improves its readability. It also replaces the previous
tooltip logic for the disabled save button in the save/discard widget
with the more standardized methods to handle the same from ui_util.ts.
2025-05-15 11:16:59 -07:00
Evy Kassirer
0b3328f7b3 peer_data: Ensure potential_subscribers is only called with full data.
Work towards #34244.

We can guarantee this because the add subscriber typeahead (and the
rest of the subscribers tab) is only visible once subscribers have
been loaded.
2025-05-14 15:00:45 -07:00
Evy Kassirer
44b87c72dc stream_edit: Fetch subscribers before showing subscriber tab.
Work towards #34244.

Now that we're supporting partial subscriber data, we might need
to fetch the full list of subscribers when opening the subscribers
tab of the edit channel modal.

This commit handles a slow load with a loading spinner while we fetch
the data, and also makes sure to ignore the data if it's received after
it stops being relevant (in case the user has another stream's data open).
2025-05-14 15:00:45 -07:00
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
Karl Stolley
a82921f32c markdown: Experiment with custom bullets, counters. 2025-05-12 18:08:28 -07:00
Evy Kassirer
25c0b279f7 invite: Fetch full user set for get_unique_subscriber_count_for_streams.
Work towards #34244.
2025-05-12 15:11:50 -07:00
Anders Kaseorg
61c04078cc server_events: Extract interface for compose, transmit to new module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-12 11:07:12 -07:00
Aman Agrawal
1ace8b80f5 hash_util: Set channel URL based on user setting.
We now render channel feed URL or channel topics list URL in
all elements based on user setting.
2025-05-09 15:13:56 -07:00
Aman Agrawal
97c69e3038 inbox: Show inbox channel view based on user setting.
Fixes: #29574
2025-05-09 15:13:56 -07:00
Aman Agrawal
903e65aba8 util: Fix spelling mistake. 2025-05-09 15:13:56 -07:00
Anders Kaseorg
5bdb734cde support: Avoid $(callback) to reduce zjquery complexity.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-09 09:04:39 -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
Anders Kaseorg
147a2c40b2 reactions: Correctly convert template output to a jQuery object.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-08 17:13:25 -07:00
kash2104
2320a8917e channels: Include unsubscribed channels in move selectors.
For channel dropdowns in move messages and move topic modals
only subscribed channels are included.

To fix it, a new function is made to include subscribed
and unsubscribed channels to which the acting user has
content access. Each group is sorted respectively with
subscribed channels followed by unsubscribed channels.

To avoid unsubscribed channels from getting included in the
compose box dropdown and saved snippets UI, a separate function
get_stream_for_move_messages_widget is made. This function
is used to include unsubscribed channels in move selector
dropdown only.

Fixes #33670.
2025-05-08 12:20:54 -07:00
Evy Kassirer
9577dc9da7 typeahead_helper: Fetch full subscriber list while sorting.
Work towards #34244.
2025-05-08 10:10:36 -07:00
Evy Kassirer
798f59a01b drafts: Remove noop setting of private_message_recipient in tests.
If we stub out `set_from_emails` as a noop, then setting the private
recipient is a noop and doesn't need to happen.
2025-05-08 09:36:36 -07:00
Evy Kassirer
497ba6bd25 compose_action: Move missed PM recipient into compose_defaults. 2025-05-08 09:35:53 -07:00
Evy Kassirer
1ade634728 compose_actions: Reset start_called in tests. 2025-05-08 09:35:53 -07:00
Evy Kassirer
cbc4dfb086 compose: Fix broken logic in 'finish' test.
It doesn't make sense that there would be no compose pill user ids
if there were compose pill emails, and there needs to be permission
to send a direct message or the message won't successfully send.

This was working before because `user_ids_string` ended up empty
in `validate_private_message`, which incorrectly returned true
for `check_dm_permissions_and_get_error_string`.
2025-05-07 09:32:02 -07:00
Evy Kassirer
b210456e35 compose_actions: Fix on_narrow tests to pass opts correctly. 2025-05-07 09:31:19 -07:00
Karl Stolley
2ae2589494 thumbnails: Constrain thumbnails to 10em height only. 2025-05-06 13:16:00 -07:00
Evy Kassirer
8fab9a23ce compose_validate: Fetch all subscribers before private channel warning.
Work towards #34244

This is the only call to `peer_data.is_subscriber_subset`, so after
this commit all calls to that function work with our new model for
partial subscriber data.
2025-05-06 10:26:36 -07:00
Evy Kassirer
768f8bc968 compose_validate: Fetch subscribers before unsubscribed user mention warning.
Work towards #34244.
2025-05-06 10:09:36 -07:00
Evy Kassirer
4b9515e181 compose_validate: Remove invalid email messaging.
This should no longer be possible because we validate emails
before creating user pills.
2025-05-06 09:53:47 -07:00
Anders Kaseorg
c1a95b8ed6 channel: Remove PATCH as POST workaround.
Fixes part of #1403.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-05 12:13:00 -07:00
Evy Kassirer
24c469f9c9 peer_data: Add ability to retry failed subscriber fetch. 2025-05-05 09:27:53 -07:00
Sahil Batra
1af039d87b stream-settings: Fix live update of subscribers UI.
Changes done here are -

- Previously the pill input, "Add" button and tooltip shown
when user did not have permission were not live updated when
updating can_add_subscribers_group and can_subscribe_group
stream level settings or can_add_subscribers_group realm
level setting. This commit fixes that.

- Also, when the UI was live updated to give user permission
to subscribe others, "Add" button was enabled even when
input was empty. This is also fixed in this commit.
2025-05-02 16:23:52 -07:00
Evy Kassirer
2be8277a68 peer_data: Return null if fetching subscribers fails. 2025-05-01 17:15:40 -07:00
Evy Kassirer
b0aff0af77 peer_data: Store peer add/remove events that come during fetch requests. 2025-05-01 17:15:40 -07:00
Evy Kassirer
8efe6a7b67 buddy_list: Fetch full subscriber data before showing user counts.
Work towards #34244.

Note that this doesn't show the right counts when the counts appear, because
yet. We can double check functionality after that change is complete.
2025-05-01 17:15:40 -07:00
Evy Kassirer
e2474d8e44 peer_data: Rename get_loaded_subscriber_subset.
We have added an ability to partially load subscribers,
and this function name makes it more clear what it returns,
in contrast to an upcoming `get_full_subscriber_set`.
2025-05-01 17:15:40 -07:00
Evy Kassirer
2f2cd72f26 activity: Delete render_empty_user_list_message_if_needed.
This was added in b387ca4, before we had
`buddy_list.update_empty_list_placeholders`

Now it's not only duplicating that functionality, but will soon
maybe run at the wrong time once the buddy list `populate` starts
making `void` calls to `async` empty list placeholder code.
2025-05-01 17:15:40 -07:00
Harsh
c6dddfe580 drafts: Show "No DM recipients" when recipients aren't specified. 2025-05-01 16:38:09 -07:00
Harsh
cfdb80ed48 typeahead: Replace code block language hint text with more clear options
This commit
- Replace the blank option with an italicized option that's the current
   default language, if there is one selected with "default" label.
- Make the "text" option more informative by adding (no highlighting)
   to the label.
- Remove the hint for "text".
- Prioritize as left to right, before start typing:
   blank/default language, text, quote, spoiler, math, everything else...

fixes: #33682
2025-05-01 16:36:20 -07:00