Commit Graph

64015 Commits

Author SHA1 Message Date
Alex Vandiver
fd127b4191 messages: Remove unconditional topic indexes. 2025-03-18 09:34:11 -07:00
Alex Vandiver
d978363a75 topic: Enforce is_channel_message=True on topic queries. 2025-03-18 09:34:11 -07:00
Alex Vandiver
33e1d583bf messages: Add new conditional versions of subject indexes.
Indexes on topic ("subject") are polluted by the existence of DMs,
which all have empty topics, and as such skew the statistics greatly.
This is particularly important given the new use of the empty topic
for the "general chat" function -- left as-is, the database makes bad
query plans because it believes the topic is vastly more common than
it actually is.

We move the old indexes to a new name with `_all`, and
recreate (concurrently) the same indexes but with a condition on
is_channel_message.  These new indexes are unused at current, until
the query-building logic adds limits on is_channel_message; see the
following commit.
2025-03-18 09:34:11 -07:00
Alex Vandiver
eba1c3afd4 messages: Mark is_channel_message as non-null. 2025-03-18 09:34:11 -07:00
Alex Vandiver
bca862e243 migrations: Backfill is_channel_message. 2025-03-18 09:34:11 -07:00
Alex Vandiver
47d55c4b6f messages: Add an is_channel_message flag. 2025-03-18 09:34:11 -07:00
Aman Agrawal
e365ac6d11 move_topic_to_stream: Tag text for translation. 2025-03-18 09:12:23 -07:00
Karl Stolley
e0aeb5cb52 recent_view: Enable avatars and overflow marker to scale. 2025-03-18 09:12:01 -07:00
Karl Stolley
0f17d6e7ef compose: Remove browser-default outline on Send button. 2025-03-18 09:10:54 -07:00
Karl Stolley
9b33a81351 compose: Remove focus-visible color from Send button. 2025-03-18 09:10:54 -07:00
Aman Agrawal
d14b1b1085 popover_menus: Fix tippy instance being undefined.
Since the reference element can be removed from DOM, we rely on
`popper` here to access the tippy instance which is reliable.
2025-03-18 09:09:46 -07:00
Aman Agrawal
1314aec7e1 compose_validate: Add additional debug info on invalid compose state.
This will help us debug sentry error when compose send button
is unexpectedly in a disabled state.
2025-03-18 09:08:58 -07:00
Shubham Padia
9af5def4aa message: Add acting_user to internal_prep_private_message.
When a user was getting subscribed to a private stream, the stream name
was not linkified since acting_user was not passed. We also pass the
acting user in user_groups.py, even though it doesn't introduce any
behavioural change.
This commit does not attempt to pass acting user in similar message
functions and just focuses on fixing the problem of a private stream not
being linkified.
2025-03-18 09:08:00 -07:00
Prakhar Pratyush
4b9f01ebcf version: Bump API_FEATURE_LEVEL.
This change was missed in 5f3896710f.
2025-03-18 09:07:29 -07:00
Alya Abbott
33ffd8c040 updates: Add update message (level=14). 2025-03-17 18:58:24 -07:00
Sayam Samal
9fee2bc507 popup_banners: Redesign reloading application banner.
This commit redesigns the reloading application banner to use the new
banner styles.

Fixes #31289.
2025-03-17 18:31:44 -07:00
Kislay Verma
a3a0419e9c popup_banners: Improve connection error banner.
This commit makes the following changes:
- Prevents the codepath in load_messages in message_fetch and
  get_events in server_events from interfering with each other.
- The banner label now displays the time interval after which the
  connection will be retried.
- The loading indicator now shows on the banner when the retry is in
  progress via the JS logic.

Co-authored-by: Sayam Samal <sayam@zulip.com>

Fixes #33924.
2025-03-17 18:25:32 -07:00
Kislay Verma
4ec32a170d buttons: Use module level counter instead of Date.now.
This addresses https://github.com/zulip/zulip/pull/33823#discussion_r1987779689
2025-03-17 18:25:32 -07:00
evykassirer
194c338b30 search: Increase min width of search pill label. 2025-03-17 17:04:28 -07:00
evykassirer
07d72a1d39 search_pill: Use sizes in grid declaration to improve narrow screen UI.
This makes sure the padding around the label is always present and that
the avatar and exit buttons don't get squished.
2025-03-17 16:56:16 -07:00
evykassirer
ba55ddf1d0 user_pill: Use variables for sizing and scale with font-size.
Using variables because they'll be used in the next commit
for search pills.
2025-03-17 16:56:15 -07:00
Alya Abbott
3029032d0b help: Clarify how content access requirement works. 2025-03-17 16:54:19 -07:00
Alya Abbott
cb1731566e help: Note permissions to join or leave a group. 2025-03-17 16:54:19 -07:00
ubaidrmn
5f4753256b input: Remove usage of propertychange event.
The `propertychange` event is deprecated and was only
supported in older versions of Internet Explorer.

This commit removes all instances of `propertychange` event.
2025-03-17 16:53:51 -07:00
Tim Abbott
e18a87ce6c lint: Fix ruff-format violations.
Apparently these were masked by commits after
ac9b7b5fa1 in the PR fixing them.
2025-03-17 14:28:02 -07:00
Shubham Padia
6def6cb77a user_topics: Use a list instead of tuple for muted_topics.
Tuple is converted into a list by orjson, which in turn causes mismatch
in the initial state and the hybrid state after using apply_events.
Using a list instead helps us prevent that.
2025-03-17 14:21:37 -07:00
Shubham Padia
ac9b7b5fa1 user_groups: Rename UserGroupMembersDict to UserGroupMembersData.
UserGroupMembersData is not serializable by orjson. We will be
introducing a TypedDict (which is serializable) in the next commit
called UserGroupMembersDict. This rename will help us distinguish
between the two.
2025-03-17 14:21:37 -07:00
Tim Abbott
29f3acaf1e message_edit: Use brand colors for save button.
Matching the blue/info color that we're using for the send button
hasn't felt good.
2025-03-17 14:15:12 -07:00
Tim Abbott
a6c5ddf102 compose_validate: Fix buggy separated handling of empty compose box.
When I adjusted 4fbf91c135 to no longer
do a full re-validation on every character typed, that unmasked bugs
in how the compose_setup handler code and compose_validate split
responsibility for validating 0-length messages.

The user-facing result was the send button not enabling properly when
starting to type.

Fix this by moving the 0-length message validation into
compose_validate, where we already handle issues of too-long messages,
sharing the same basic logic for determining when to do a full
validate() call.

A benefit of this reworking is now all of the logic for handling the
`invalid` class is in one place in validate, rather than split with
the compose_setup module.
2025-03-17 14:15:12 -07:00
whilstsomebody
24ada051dd Subscriptions: Fix the left offset of the group name.
This commit fixes a bug reported on CZO where the group
name appears offset to the left by a few pixels compared
to the description and other settings.

See CZO:
<https://chat.zulip.org/#narrow/channel/9-issues/topic/name.20of.20user.20group.20is.20misaligned>
2025-03-17 14:08:12 -07:00
Anushrut pandit
889c9a0a94 dropdown_container: Fix dropdown list focus outline clipping
Adjust the focus style for dropdown list items in inbox and recent-view.This ensures the focus outline is fully visible
across different zoom levels and fixes #34020
2025-03-17 14:07:33 -07:00
Tim Abbott
c8444fc0ce right-sidebar: Isolate hide-right-sidebar persistance from spectators.
Spectators don't have a right sidebar, and apparently combining the
right-sidebar hiding logic with that results in a glitchy search bar.

Avoid either setting or reading from the right sidebar persistence
configuration. We don't do anything with the left-sidebar toggle,
since that living in local storage seems reasonable.

Fixes #34007.
2025-03-17 14:02:09 -07:00
Karl Stolley
61f5bd6a4c spectator_view: Improve righthand alignment of standalone search icon.
Fixes: #34007
2025-03-17 13:54:39 -07:00
Karl Stolley
589c713c13 search: Simplify grid for standalone search icon. 2025-03-17 13:54:39 -07:00
Tim Abbott
4602a22057 compose: Remove unnecessary mocks in node tests.
These became unnecessary in my final bug fix to
4fbf91c135.
2025-03-17 11:48:44 -07:00
Sayam Samal
d00b4cb0bd banners: Scale with base font size. 2025-03-17 11:43:57 -07:00
Aman Agrawal
5b30736b9f compose_validate: Fix tooltip content not updated.
When the user is hovered on the send button and uses keyboard
to update the compose box, the tooltip was not updated. This
fixes that edge case by hiding and showing the tooltip again.
2025-03-17 11:35:56 -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
Vector73
d43c877a91 api: Update saved snippets edit endpoint.
If no data is provided to the `saved_snippets/{saved_snippet_id}:patch`
endpoint, do no-op instead of throwing error.
2025-03-17 11:03:25 -07:00
Vector73
9c5535f447 saved_snippets: Use intent="neutral" for edit icon. 2025-03-17 11:03:25 -07:00
Sahil Batra
aa02eb1eba stream: Modify warning shown when archiving announcement stream.
This commit updates how we show the text mentioning that archiving
a stream which is used for new user, new channel or update
announcements will result in the announcements not being sent.

Fixes #33379.
2025-03-17 11:02:55 -07:00
Sahil Batra
526b46828c stream-settings: Show archive button to channel admins.
Previously, stream archive button was only shown to realm admins.
Now button is shown to all the users who can administer the
channel.

Fixes part of #33379.
2025-03-17 11:02:55 -07:00
Aman Agrawal
5c1bba369d message_list_hover: Optimize code for show edit message icon.
Doing a lot of DOM manipulation on message hover leads to
tooltips being not hidden / displayed when they should be.

This commit is an attempt to optimize that code to do minimal updates.
2025-03-17 11:00:04 -07:00
Prakhar Pratyush
4cc0d52f74 move_topic: Improve placeholder when topic is not mandatory.
Earlier, we used to show "general chat" as the placeholder.

This commit adds support to show "Enter a topic (skip for general
chat)" as the placeholder when topic is not mandatory in the
move-topic-new-topic input box.

We show "general chat" (as we show in compose topic input box)
when move-topic-new-topic input box is not focused and topic="".

Fixes #33846.
2025-03-17 10:56:01 -07:00
ahmedgulabkhan
d69d2d8b9f settings: Update bot icons to be vertically aligned.
Current bot icons were not aligned vertically, this commit fixes it.
2025-03-17 10:52:25 -07:00
ahmedgulabkhan
d9573a62d4 user-admin-invite: Update icon for invite users in admin panel.
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-03-17 10:52:25 -07:00
Lauryn Menard
e853f3cb9b help: Rename and redirect "Edit a bot" to "Manage a bot".
Fixes #32887.

Co-authored-by: ahmedgulabkhan <demoncommand97@gmail.com>
2025-03-17 10:52:25 -07:00
ahmedgulabkhan
3ece6ca196 user-settings: Update icon for managing a user or bot.
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-03-17 10:52:25 -07:00
ahmedgulabkhan
c0b3fb1bbe user-settings: Update icon for deactivating user or bot.
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-03-17 10:52:25 -07:00
ahmedgulabkhan
50582b72b6 user-settings: Update icon for reactivating user.
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-03-17 10:52:25 -07:00