Commit Graph

64332 Commits

Author SHA1 Message Date
Vector73
b3efb901fc tools: Use .md extension for temporary API changelog files. 2025-04-13 20:22:53 -07:00
Shubham Padia
349e88adc6 settings: Exclude nobody from channel and group settings typeahead.
We have filtered the group in the get_user_groups argument of
set_up_pill_typeahead. We could have done it in `set_up_combined` but
that would have made that function non-generic and specific to these two
settings. We could also have filtered it in get_all_realm_user_groups by
adding an argument on whether to exclude it or not, but that would have
been very hard to read and track. This seemed like the better of the
options we had.

Fixes https://chat.zulip.org/#narrow/channel/9-issues/topic/.22Nobody.22.20group.20in.20UI.20to.20add.20subscribers.2Fgroup.20members
2025-04-13 20:22:26 -07:00
Sahil Batra
c5b005833c groups: Do not prefetch can_access_all_users_group setting.
This commit updates code to not prefetch can_access_all_users_group
and can_access_all_users_group__named_user_group fields using
select_related. We can just use get_realm_system_groups_name_dict
function to check if setting is set to "Everyone" group when
needed and can avoid unnecessarily fetching groups for every user
query.
2025-04-11 17:37:06 -07:00
Sahil Batra
7e77100433 users: Remove unused variable in get_user_dicts_in_realm. 2025-04-11 17:37:06 -07:00
Sahil Batra
7ebea853be user_groups: Refactor user_has_permission_for_group_setting.
This commit refactors user_has_permission_for_group_setting
to accept setting group ID instead of UserGroup object.

We only need ID in checking the permission and this helps in
further commit to avoid prefetching can_access_all_users_group
setting.
2025-04-11 17:37:06 -07:00
Jitendra Kumar
8682db5573 message_feed UI: Update logo dimensions for better scalability.
Change 'z' logo dimensions so that it scales according to chosen font
size.

Fix: #34266
2025-04-11 17:02:08 -07:00
Prakhar Pratyush
68b7deac72 messages: Clarify comment on zerver_message_edit_history_id idx.
This commit removes a misleading comment regarding
'zerver_message_edit_history_id' index.

We added the index in 0679 to use in 0680 but later the 0680 migration
was reworked resulting in the index not being used in 0680.

We didn't drop the index as we expect it to be helpful for other
things.

The comment was misleading hence removed.
2025-04-11 12:38:11 -07:00
Alex Vandiver
e1aa8b1cb0 tusd: Use GCS upload backend when the endpoint matches.
This works around tus/tusd#322, which in turn is caused by
aws/aws-sdk-go-v2#1816.  This requires separate authentication via
service account key.

Fixes: #34186.
2025-04-11 12:16:03 -07:00
Alex Vandiver
cf51013bb7 tusd: Reject tusd terminations after we insert them into our database.
The tusd protocol allows DELETE requests ("terminations") at any
point, including after a file has successfully been uploaded.  This
can allow tusd to remove a file from the bucket, out from under Zulip.

We use the new-in-2.7.0 pre-terminate hook to look up the file which
the client is requesting to terminate, and reject the termination if
it is a file that the Zulip database is already aware of.
2025-04-11 12:13:07 -07:00
Alex Vandiver
21eff33875 puppet: Upgrade tusd to 2.8.0. 2025-04-11 12:13:07 -07:00
Karl Stolley
c24d935f7c left_sidebar: Keep filter box from touching highlihted edge. 2025-04-11 12:08:00 -07:00
Karl Stolley
faa56e5f67 left_sidebar: Remove unnecessary high-specifity selectors.
These were introduced in #34340, but removing them does not seem
to affect sidebar display--and it also restores the specifity of
selectors for hiding the grouping brackets in the zoomed-in view.
2025-04-11 12:08:00 -07:00
Karl Stolley
1025fd559e left_sidebar: Correct stale #filter-topic-input refs. 2025-04-11 12:08:00 -07:00
Alex Vandiver
309876796e kandra: Add a couple useful command-line tools. 2025-04-11 11:25:58 -07:00
Alya Abbott
f4a337c656 contributor docs: Update info on icons in the help center. 2025-04-11 11:21:52 -07:00
Aman Agrawal
cd439c0232 message_overlay: Fix restore tooltips detached with message content.
To avoid restore tooltip of message from being displayed outside
the overlay, we define a boundary, outside which the tooltip
cannot exist. Popper library is smart enough to render the tooltip
correctly by respecting the provided boundary and flipping the
tooltip placement if required.
2025-04-11 10:40:35 -07:00
Alex Vandiver
b11cbbab01 smokescreen: Move metrics port from the default 9810, to 4760.
This prevents errors if Smokescreen is running on a host with more
than 10 Tornado shards.
2025-04-11 10:29:26 -07:00
evykassirer
8d57bf30ac settings: Split CSS for two-pane-overlay and settings.
No changes, just shuffling things around for ease of reading
future commits.
2025-04-11 10:27:25 -07:00
evykassirer
3be4951e5e subscriptions: Move 40% width to just the left style block.
This is overwritten to ~60% in the .right style block and
shouldn't be in the shared style block.
2025-04-11 10:27:25 -07:00
evykassirer
e84c318e10 settings: Move stream_sorter_toggle CSS to subscriptions stylesheet.
It's only used for subscriptions so it makes more sense for it to
live there.
2025-04-11 10:27:25 -07:00
evykassirer
3539142479 settings: Remove margin for subheader title.
The margin doesn't scale with font size, so it looks
extra weird at small font sizes, and also the text
is already being centered with flex so we don't need
margin.
2025-04-11 10:27:25 -07:00
evykassirer
6b0dd9e063 settings: Move subheader CSS out of main CSS block.
In a future commit in (#34125) we'll add a classname for the
subheader and use that to scope these rules.

This commit has no changes in CSS rules. It only moves them around.
2025-04-11 10:27:25 -07:00
Sanchit Sharma
d5c83e02c3 streams: Return archived web-public channels. 2025-04-11 08:12:53 -07:00
Kartikay5849
32e6383779 settings: Show desktop notifications warning when permissions needed.
Display a warning banner in the desktop notifications settings
when browser permissions are not granted.
Hide "Send test notification" button unless permissions are granted.

Fixes: #33222.
2025-04-10 16:46:40 -07:00
Harsh
6f0ae8633f left_sidebar: Fix Enter key behavior on "Show all topics" link.
This commits adds href attribute so that pressing down
Enter key works on the anchor element and also makes the focus styling same topic names.
2025-04-10 16:23:01 -07:00
Anders Kaseorg
ad31ef22f2 narrow: Fix get_base_query_for_search access restrictions.
The type_id is the id of a UserProfile, Stream, or DirectMessageGroup,
not the id of a type.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-10 15:26:57 -07:00
Shubham Padia
de7efd23bc streams: Simplify send_peer_subscriber_events logic.
Earlier, we used to check whether the length of altered_user_ids was 1
and then create a dict of that user id and the streams that they were
added/removed to/from, and optimise our event sending that way. But that
was making the code harder to read.
Now, we just keep the key of user_streams as a concanated list of
user_ids and then add streams accordingly to user_streams.
Furthermore we do not check for peer_user_ids before modifying
user_streams anymore, since it is very highly unlikely that it will be
empty and if it is, send_event can handle it just fine.
2025-04-10 15:08:48 -07:00
Shubham Padia
1014de23a8 streams: Send different peer events for web & non-web public streams.
Earlier, we used to send a single event for all web-public and public
streams. But public streams can have guests, which means the peer user
ids for each of them can be different based on which guests are
subscribed to which channel.
In the previous code, we were using the last stream id from another loop
to get subscribers, which was causing a lot of non-deterministic
failures in our test, since that stream id could keep on changing.
Moreover, it doesn't make much sense to use that id here.
This commit still keeps around the optimisation for public channels with
non-guest users. It will send one event for all public channels with
non-guest users, one for web public channels and for the rest of the
channels it will send an event for each channel with a different set of
peer user ids.
2025-04-10 15:08:48 -07:00
Anders Kaseorg
bdd11577bf webpack: Use CORS requests for stylesheets.
This seems to be required for webpack-dev-server 5.2.1, for reasons
that have not yet been made public.  This relies on the
Access-Control-Allow-Origin: * header that we already set for static
content in both development and production.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-10 15:02:27 -07:00
Karl Stolley
ab24eea83e thumbnails: Place play button on all media with grid. 2025-04-10 12:55:15 -07:00
Karl Stolley
162a9ce29a thumbnails: Bump contrast higher on thumbnail hovers. 2025-04-10 12:55:15 -07:00
Karl Stolley
72c89404f3 thumbnails: Audition darker borders on typical images. 2025-04-10 12:55:15 -07:00
Karl Stolley
2421ddfb6e thumbnails: Audition thicker borders. 2025-04-10 12:55:15 -07:00
Karl Stolley
9392a1c8a6 cleanup: Move thumbnail values to CSS variables. 2025-04-10 12:55:15 -07:00
Karl Stolley
356028729f thumbnails: Handle dinky thumbnail images.
Fixes: #31502
2025-04-10 12:55:15 -07:00
Karl Stolley
d9f0fe882d thumbnails: Restore legacy values on video thumbnails. 2025-04-10 12:55:15 -07:00
Karl Stolley
61e8aef597 thumbnails: Style for portrait or landscape orientation. 2025-04-10 12:55:15 -07:00
Karl Stolley
d22c6318db thumbnails: Add height and width attributes to images. 2025-04-10 12:55:15 -07:00
Karl Stolley
4e19e82f64 thumbnails: Reference media anchors, images, and video by class. 2025-04-10 12:55:15 -07:00
Karl Stolley
1dc87be1db thumbnails: Remove unnecessary margin on media first-children.
This was made unnecessary by a patch submitted and merged
in #34271.
2025-04-10 12:55:15 -07:00
Aman Agrawal
c5425a6dab filter: Add more asserts for has_exactly_channel_topic_operators. 2025-04-10 11:52:04 -07:00
Aman Agrawal
6fe93a3ff6 inbox_ui: Remove extra effort to return message object.
There is no difference in this case when a message object is
returned vs not. So, we just return as soon as we have the
requried data.

This will useful when won't have message ids associated with topic
easily when rendering inbox style channel view.
2025-04-10 11:52:03 -07:00
Aman Agrawal
30862738d3 topic_list: Extract some params to be passed from child classes.
This will allow child classes complete control over these parameters.
2025-04-10 11:52:03 -07:00
Aman Agrawal
f5714a0c55 topic_list: Generalize use of TopicListWidget.
We introduce a different class to be used for left sidebar which
inherits TopicListWidget. More specifically, we allow the
children classes of TopicListWidget to pass their own method to
filter topics. This will later be used by inbox view when showing
channel view in center pane.
2025-04-10 11:52:03 -07:00
Aman Agrawal
88f71f28cc topic_list: Add method to check if topic list is empty. 2025-04-10 11:52:03 -07:00
Aman Agrawal
3547900800 inbox_row: Only show unread counter if there are unreads in topic. 2025-04-10 11:52:03 -07:00
Aman Agrawal
c8d509eeda left_sidebar: Use more specific selector for CSS styles.
This will avoid conflicts when the same list is displayed in
inbox channel view.
2025-04-10 11:52:03 -07:00
Aman Agrawal
22b50e2312 hashchange: Hide other views when showing a view in the same call.
Instead of having two calls everywhere to show a view and hide other
views, we move the logic to hide the other views inside the show
function of the view.

This will help as we will add other views to the app to keep the
logic to hide other views in the `show` function of the view to show.
So, the logic calling `show` for a view
doesn't have to iterate through hiding all the other views first.
2025-04-10 11:51:58 -07:00
Aman Agrawal
5ea42823ba topic_list: Rename function to specify use for left sidebar. 2025-04-10 11:51:20 -07:00
Aman Agrawal
1b012f1eb3 filter: Add function to check if narrow has only 'channel' term.
s
2025-04-10 11:51:20 -07:00