Commit Graph

65439 Commits

Author SHA1 Message Date
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
Aman Agrawal
6842615f16 topic_list_data: Extract function to filter topics by search term. 2025-04-10 11:51:20 -07:00
Aman Agrawal
5647be8b9c topic_list: Rename function get search text for topic search. 2025-04-10 11:51:20 -07:00
Aman Agrawal
f87abce487 left_sidebar: Rename topic search element ID for clarity. 2025-04-10 11:51:20 -07:00
Maneesh Shukla
4524225991 delete-code-playground: Fix tooltip being partially hidden.
Co-authored-by: Aman Agrawal <amanagr@zulip.com>
2025-04-10 11:32:43 -07:00
Maneesh Shukla
a062d25aea personal-settings: Redesign buttons in personal settings.
- Changed Alert Words "Delete" button to a danger icon button.
- Updated Uploaded Files "Download" button to an info icon.
- Updated Uploaded Files "Delete" button to a danger icon.
- Changed Muted Users button to use `action-button-quiet-danger`.

Fixes: #34200.
2025-04-10 11:32:43 -07:00
Maneesh Shukla
031b0d3c13 organization-settings: Restyle "Resend" and "Revoke" buttons in Invitations panel.
Fixes part of #34200.
2025-04-10 11:32:43 -07:00
Maneesh Shukla
61acebf0ce organization-settings: Redesign the buttons in the Users tab of organization settings.
- Manage user button -> Neutral icon
- Deactivate user button -> Danger icon
- Reactivate user button -> Success icon

Fixes part of #34200.
2025-04-10 11:32:43 -07:00
Maneesh Shukla
5b46d43f54 organization-settings: Redesign the "Remove from default" button in default channels.
Fixes part of #34200.
2025-04-10 11:32:43 -07:00
Maneesh Shukla
9e2e2da7e1 organization-settings: Redesign edit and delete buttons in settings tables.
Fixes part of #34200.
2025-04-10 11:32:43 -07:00
Maneesh Shukla
2df1e1ff85 trash-icon: Update the existing trash icon svg.
Fixes part of #34200.
2025-04-10 11:32:43 -07:00
Maneesh Shukla
c08e3f160c admin_playground_list: Change the tooltip and aria-label to just "Delete" for consistency.
Fixes part of #34200.
2025-04-10 11:32:43 -07:00
Alex Vandiver
aeed907c50 s3: Support non-AWS S3 providers which do not support request checksums. 2025-04-10 11:11:25 -07:00
Alex Vandiver
33339f89c3 tusd: Use default already set in computed_settings.
Having an additional fallback here is not necessary.
2025-04-10 10:13:11 -07:00
Alex Vandiver
ba5d1108c0 settings: S3 is enabled if LOCAL_UPLOADS_DIR is unset.
We should not key off of `S3_KEY`/`S3_SECRET_KEY`, since those are
optional if the host is in EC2 and using instance profiles.  Instead,
check if `LOCAL_UPLOADS_DIR` is None1, which is the authoritative
source for if the S3 backend is in use.
2025-04-10 10:13:11 -07:00
evykassirer
a09dab5eaf settings: Calculate height of create modal through javascript.
We need this height to be flexible based on if the subheader has
overflowed into two rows or not, and our method of doing this
(with existing examples in the buddy list and stream list) is to
calculate what the height should be when a window is loaded or
resized.
2025-04-10 10:01:57 -07:00
evykassirer
fd34eaa0ab resize: Make helper function for getting element height. 2025-04-10 10:01:57 -07:00
Anders Kaseorg
440864e7c9 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-09 15:46:56 -07:00
Anders Kaseorg
ff4337eee5 eslint: Fix @typescript-eslint/prefer-nullish-coalescing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-09 15:46:56 -07:00
Anders Kaseorg
819504a0e9 stylelint: Fix color-function-alias-notation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-09 15:46:56 -07:00
Anders Kaseorg
f52d7dac76 settings_components: Clean up typing mess.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-09 15:46:56 -07:00
Anders Kaseorg
1ea7933900 widget_modal: Clean up typing mess.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-09 15:46:56 -07:00
Anders Kaseorg
881c9f1146 showroom: Clean up typing mess.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-09 15:46:56 -07:00
Shubham Padia
98950314ba user_groups: Realm admins should be allowed moderator permissions.
For `check_user_has_permission_by_role`, we were using
`user.is_moderator` by default to check whether the user had those
priviliges. But that specific function returns false if the user is an
admin or an owner. So we check `is_realm_admin` too in that case.
2025-04-09 15:30:05 -07:00
theofficialvedantjoshi
194dfbc84d integrations: Add common framework for webhook signature verification.
Fixes: #19774
2025-04-09 15:05:57 -07:00
Sayam Samal
f7129ae550 tests: Fix admin.test.ts failing puppeteer test using waitForFunction. 2025-04-09 11:23:17 -07:00
Sayam Samal
e1acec52eb tests: Fix admin.test.ts puppeteer test case failing.
The puppeteer test case for checking the save discard widget button
states was failing sometimes as the button was being updated too soon.

Due to this, sometimes the assertion check would execute after the
button label has already been updated — resulting in mismatched results.
2025-04-09 11:23:17 -07:00
Alex Vandiver
5f783ed5ad nginx: Relay the same Host: header that nginx saw.
Unilaterally adding the port can cause CSRF failures when the port is
a default port, and thus optional.  Switch to providing the exact
`Host` header that the original request contained.
2025-04-09 10:44:12 -07:00
Sayam Samal
91efa998ee tests: Improve change signup announcements stream test in admin.test.ts.
This commit makes the test setup in
test_change_signup_announcements_stream consistent with those in
test_change_new_stream_announcements_stream and
test_change_zulip_update_announcements_stream.
2025-04-08 22:42:30 -07:00
Sayam Samal
7b45ff50ba settings: Prevent save discard widget override.
This commit prevents the save button in the save discard widget from
showing the "Saved" label when the user has made some other changes
in the settings while the saving process was in action — which resulted
in the "Save changes" label in the save button, and thus shouldn't be
replaced with "Saved".

This commit also fixes the failing puppeteer tests in
`web/e2e-tests/admin.test.ts` which was introduced in #34081.
2025-04-08 22:42:30 -07:00
Alya Abbott
6e113a8e8a portico: Rewrite /for/communities.
- Describe uses that don't have dedicated pages
- Explain benefits vs. modern alternatives.
2025-04-08 22:40:02 -07:00
Alya Abbott
800130461d help: Reframe moderation capabilities as a toolkit. 2025-04-08 15:27:42 -07:00
Alya Abbott
7bc3249d45 plans: Update number of sponsored orgs. 2025-04-08 15:21:05 -07:00
Alya Abbott
c405f9f879 help: Add missing link. 2025-04-08 15:21:02 -07:00
Alya Abbott
de691113fc help: Permissions intro tweak.
Now that we're done with the conversion, "most" is not necessary.
2025-04-08 15:15:37 -07:00
Tim Abbott
ab068389ff api: Increment API feature level to 378. 2025-04-08 12:45:53 -07:00
Sahil Batra
9d15a11331 streams: Live update UI correctly when archiving streams.
Previously, "delete" event was sent for both archiving streams
and when user lost access to a stream. So, when user lost
access to a stream, the UI was live updated like the stream
was archived, which was not correct. But now "update" event
is sent when a stream is archived, so the webapp code is
changed accordingly to live-update the UI for both cases
correctly.

As a result, some of the changes in 43932cd6aa and a29b6485d6
are reverted as "update" event is sent when archiving and "delete"
event is sent only when a user loses access to a stream as before.
2025-04-08 12:41:09 -07:00
Sahil Batra
7c470f0161 streams: Fix events send when archiving and unarchiving streams. 2025-04-08 12:41:09 -07:00
Sahil Batra
ae579aa25a register: Include archived channels in "streams" field. 2025-04-08 12:41:09 -07:00
Sahil Batra
a6cc33f478 events: Do not compute first_message_id unnecessarily.
"first_message_id" field for subscription objects needs
to be updated when archiving a stream as we send a
notification message, but first_message_id will only
change if the stream did not have any messages previously.

This commit updates the code to update first_message_id
only when required.
2025-04-08 12:41:09 -07:00
Sahil Batra
1b35ad3094 message: Use set instead of list when checking DM permission.
When checking DM permissions, instead of using list of
users, we now use set of users to check if any user is
in direct_message_permission_group because there can be
case when sender can also be one of the recipients.
2025-04-08 12:32:33 -07:00
Anders Kaseorg
8fd04b0f0c version: Bump major PROVISION_VERSION.
Commit 8450f04efc (#34317) should have
been a major bump.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-08 10:52:48 -07:00
Harsh
d59b3699fe settings: Move up privacy settings section in default user settings.
This commit moves up the privacy setting section in default user
settings section and also registers a new handlebar helper
"ternary" for conditions.

fixes: #33421
2025-04-08 10:51:56 -07:00
Harsh
b8f1d0025e settings: Add bottom margin to information density settings.
This commit adds bottom margin of 20px to the
information density settings buttons.
2025-04-08 10:51:56 -07:00