Commit Graph

8215 Commits

Author SHA1 Message Date
Mateusz Mandera
de37ab28a8 signup: Don't run password_strength form validator in ldap signup mode.
When an ldap user is signing up via the registration form, they are
required to enter their ldap password. This is in contract to "regular"
password signup, where the user sets the password for their new account.

Checking password strength makes sense in the latter case, but not in the
ldap case - the password is already set at the ldap level after all.

In any case, the password_strength validator is not even added to the
form field with `id="ldap-password"`, so this was bugged throwing errors
such as

```
TypeError: $.validator.methods[method] is undefined. Exception occurred when checking element ldap-password, check the 'password_strength' method. at http://localhost:9991/webpack/vendors-node_modules_pnpm_jquery-validation_1_21_0_jquery_3_7_1_node_modules_jquery-validatio-b912f7.js:810
at check .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:803
at element .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:510
at onfocusout .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:310
at delegate .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:441
at dispatch .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:5145
at ../node_modules/.pnpm/jquery jquery/dist/jquery.js?1d73/</add/elemData.handle@http://localhost:9991/webpack/vendors-node_modules_pnpm_error-stack-parser_2_1_4_node_modules_error-stack-parser_error-stac-967546.js:16502
at trigger .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:8629
at simulate .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:8698
at focusMappedHandler .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:5574
```

when interacting with the form.
2025-04-15 18:28:16 -07:00
Anders Kaseorg
c40bd39a01 webpack: Disable cross-origin-header-check middleware.
This middleware in webpack-dev-server 5.2.1 appears to be intended to
plug some undisclosed browser-specific vulnerability that allows
stealing code from closed-source projects.

https://github.com/webpack/webpack-dev-server/issues/5446#issuecomment-2768816082
https://github.com/webpack/webpack-dev-server/issues/5446#issuecomment-2772150109

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-15 16:18:06 -07:00
Kartikay5849
3c450074d4 banner: Prevent duplicate desktop notification banners.
Avoids multiple copies of the desktop notification banner being
added to the DOM. Appends the banner only if it doesn't already
exist.
2025-04-15 16:09:09 -07:00
Sahil Batra
4f80823191 settings: Fix opening settings for guests who cannot access all users.
Opening settings and stream settings UI was not working for guests
if they could not access all users. This was because is_person_active
did not handle inaccessible users correctly, if they were not added in
the users data, when being called in get_group_members to render
group pills.
2025-04-14 11:44:11 -07:00
Sahil Batra
3739081792 typeahead: Fix typeahead showing for disabled inputs.
When user cannot type in the input, because of contenteditable
being set to "false", typeahead should not be shown when clicking
on the input element.
2025-04-14 09:24:53 -07:00
Sahil Batra
722d501107 streams: Don't show confirmation modal if user can subscribe.
Previously, we showed confirmation modal when user was unsubscribing
themselves from the private stream from "Unsubscribe" button in
subscribers list, even when user had the permission to subscribe
to the stream again.

This commit fixes it to not show the confirmation modal if user
has permission to subscribe again. We already have same behavior
when user tries to unsubscribe from the button present at the
right of tabs.
2025-04-14 09:24:53 -07:00
Sahil Batra
d3c06234e2 streams: Fix warning shown when unsubscribing from private stream.
We no longer archive the stream when private stream becomes
vacant, so removed that part from the warning.

When a private stream becomes vacant, everyone in the organization
can lose content access to it if no one has permission to subscribe
themselves or others to the stream. So, the warning is updated to
mention this.
2025-04-14 09:24:53 -07:00
aditya.chaudhary1558@gmail.com
2e59bb0768 empty-feed: Show special banner if muted topics in channel.
If we're in the feed for a channel and it is visibly empty
because all of the messages are in topics that have been
muted by the user, we now show an empty narrow banner that
informs the user about why the feed is empty, how to view
muted topics and links to the help center article on muting
and unmuting topics.

If the channel feed is empty and there are no messages in
muted topics, then we show the default empty narrow banner.

Fixes #31601.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-04-13 20:32:11 -07:00
Harsh
f2b33fc3ee compose: Add banner when topic is moved and recipient is updated.
This commit adds the INFO compose banner for new channel/topic when the
recipient is updated when topic is moved.

fixes: #33445.
2025-04-13 20:29:58 -07:00
Sayam Samal
3701c99b0a popup_banners: Update connection error banner label.
This commit updates the connection error banner label to
"Unable to connect to Zulip. Trying to reconnect soon…" when the user
manually retries the connection via the "Try now" button and when the
retry time is less than 5 seconds. And updates the countdown label of
the same banner to "Unable to connect to Zulip. Trying to reconnect in
{retry_delay_secs} seconds…".
2025-04-13 20:25:01 -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
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
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
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
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
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
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
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