Commit Graph

1586 Commits

Author SHA1 Message Date
sanchi-t
43932cd6aa stream_edit: Update channel row in settings when channel is archived. 2025-03-14 11:29:51 -07:00
Sahil Batra
48aaeee6dd stream-settings: Refactor filter dropdown related code.
Variable for storing the dropdown widget is now
declared in stream_settings_components and this
commit also adds some helper functions to get
and set the filter value.

This is a preparatory commit to avoid import
cycles in further commits for fixing live
update when channels are archived.
2025-03-14 11:29:51 -07:00
Sahil Batra
c50e8fa406 stream-settings: Move functions to update stream privacy choices.
This is a preparatory refactor to avoid import cycles in future
commits for fixing live update behavior when archiving channels.
2025-03-14 11:29:51 -07:00
Sahil Batra
0c6ed6559a stream-settings: Refactor code to not store filter value in variable.
There is no need to store the archived status filter value in a
variable, instead value can just be derived by calling "value"
function on DropdownWidget.

This is a preparatory refactor for further commits which will fix
live-update behavior when archiving channels.
2025-03-14 11:29:51 -07:00
Aman Agrawal
a393d9d495 user_group: Use double user icon instead of tripe user icon. 2025-03-14 11:07:33 -07:00
Kartikay5849
136be83502 mentions: Warn on non-silent group mentions with unsubscribed members.
Add a warning banner when a user mentions a group (non-silent) where none
of the members are subscribed to the current stream. The banner informs
the user that the mention won't notify anyone.

Fixes #33545.
2025-03-13 15:55:30 -07:00
evykassirer
08ed639763 filter: Validate and parse sender:me when turning into a pill.
Fixes #31315.

We want to parse sender:me with the email when turning it into
a pill, but not before then so that "Sent by me" is still the
search string in the suggestions.
2025-03-13 13:54:14 -07:00
Vector73
b31024be47 saved_snippets: Add support for editing saved snippets.
Fixes #33708.
2025-03-13 10:58:36 -07:00
afeefuddin
6f196c7ec9 composebox_typeahead: Show CrossRealmBots in the typeahead list.
Fixes: #30817
Co-authored-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-03-12 23:11:53 -07:00
roanster007
2c548d4856 settings: Allow "resolve topic" permissions to be managed independently.
This commit separates the "resolve topic" permissions from the
topic editing permissions, through the introduction of setting -
"can_resolve_topics_group" which user group whose members
can resolve topics.

Fixes #21811
2025-03-12 19:32:35 -07:00
opmkumar
4f462970e4 search: Add is-muted search operator.
Add the `is:muted` search operator.
`-is:muted` is an alias for the `in:home` operator.

Co-authored-by: Kenneth <Kenneth012004@outlook.com>

Fixes #16943
2025-03-11 23:18:07 -07:00
opmkumar
4becea3993 search: Fix -in:home muting logic.
Previously, mentions from muted channels were incorrectly excluded when
narrowing down to `-in:home`. Additionally, messages from all muted
topics were missing in the results.
This commit solves the above listed issues.

The relevant legacy logic being removed dates to when we didn't
support unmuting or following topics.
2025-03-11 23:18:07 -07:00
Lauryn Menard
0f5246400b message-edit: Use last_moved_timestamp for edited/moved indicators.
Use both the last_moved_timestamp and last_edit_timestamp to show
edited and moved indicators/tooltips in the message list view of
the web app, instead of parsing the message edit history array.

We still maintain and build the message edit history array as it's
used for calculating the narrow terms when there is a near operator
and a message has been moved to a different channel or topic.

Updates the tooltip for message edit indicators to include both
the moved and edited time if a message has been both moved and
edited.
2025-03-11 16:42:28 -07:00
whilstsomebody
41ec9a3904 stream_settings_data: Exclude archived streams in channel pickers.
These cannot be used for notifications channels, so they are both
distracting, and picking one of them would show an error.
2025-03-11 14:28:44 -07:00
Maneesh Shukla
e3a1ad7a3c settings: Prevent redundant requests by modifying event handler.
Previously, all buttons within .subsection-changes-save were targeted,
potentially leading to multiple requests while a request was in
progress. This change ensures that the triggering element is properly
handled by preventing the default form submission action.
2025-03-11 12:45:57 -07:00
opmkumar
86eb69a68b hash: Fix logic for handling web public narrows.
Previously, `is_spectator_compatible` in `hash_parser.ts` ignored all
operators and operands beyond the first pair in a narrow.
This was fixed by iterating through each operator-operand pair individually.
2025-03-11 12:43:02 -07:00
Quan Nguyen
b4bb708c14
recent_conversations: Improve sorting behavior.
Refine sorting algorithm of recent conversation list so that
it works like spreadsheet sorting, with previous sorting orders
remembered.

Fixes #33289.
2025-03-11 10:48:31 -07:00
apoorvapendse
66ca78dbd3 compose_paste: Add test to verify pasting from Mac terminal.
For context, #33569 appears to have been fixed
unintentionally by #33691.

This just adds a test to verify the expected
behavior when it comes to pasting from the
Mac terminal as described by the reproduction
steps in #33569.

We might still end up with some edge case in
the future, that might not work as expected.

CZO: https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.93.82.20surprising.20line.20breaks.20when.20copy-pasting.20.2333569/near/2119422

Co-authored-by: Kislay Verma <kislayuv27@gmail.com>
2025-03-11 09:48:35 -07:00
Apoorva Pendse
54fd02b173 compose_tooltip: Remove delay for invalid messages.
Does what 714def080f
was trying to do without the side effects.
Fixes: 714def080f
2025-03-11 09:41:22 -07:00
apoorvapendse
ef863258c2 compose_paste: Remove title formatting more carefully.
We now start to consider text nodes
with valid content to determine
whether we should remove the styling.

Fixes: #31218.
2025-03-10 17:01:13 -07:00
Sahil Batra
e2d9d069e0 settings: Remove dense_mode setting. 2025-03-10 16:07:37 -07:00
Sahil Batra
6f6059da73 personal_menu: Support changing information density settings.
This commit adds UI in personal popover menu for user to change
font-size and line-height.

Fixes part of #33186.
2025-03-10 16:07:37 -07:00
Harsh
b7a943b8cb left_sidebar: Hide menu option for home view if all messages are read.
This commit hides sidebar menu option button instead of showing
it with "Mark all messages as read" option, for home view when
there are no unread messages.
2025-03-10 13:08:39 -07:00
Sayam Samal
3275fcc96e popup_banners: Redesign connection banner to use new banner component.
This commit serves as the base commit for redesigning the alert banners
by migrating them to use the new banner component. We use a new name
to refer to these banners — "Popup banners", which is more descriptive
about their behavior.

The Popup banners are appended to the container in a stacking order,
i.e., the most recent popup banner appears on the top and the oldest one
is sent to the bottom of the stack. These banners also inherit the
animations from the alert banners for visual appeal.

This commit also fixes the bug where clicking on the "Try now" button
in the popup banner resulting from an error in the `/json/messages`
endpoint resulted in call to restart_get_events in server_events.js
instead of load_messages in message_fetch.ts.

Fixes #31282.
2025-03-10 11:21:11 -07:00
Vector73
c049259d07 user: Remove is_billing_admin user property.
Removed `is_billing_admin` user property as it is no longer used since
billing permissions are now determined by `can_manage_billing_group`
realm setting.
2025-03-10 09:36:30 -07:00
Vector73
158fd58cde settings: Add "can_manage_billing_group" realm setting.
Added "can_manage_billing_group" realm group permission setting
to control who can manage billing and plans in the organization.

Fixes #32745.
2025-03-10 09:36:30 -07:00
Niloth P
6ba3bdc05d filter: Add may_contain_multiple_conversations.
Preparatory commit for #31292.
2025-03-08 17:38:49 -08:00
sanchi-t
423ee27a23 stream_privacy: Add archive icon for archived channels.
Archived channels are now displayed with an archived
icon.
2025-03-07 18:08:41 -08:00
sanchi-t
1aef79078c stream_settings: Display archived channels.
By default, archived channels will be hidden.
2025-03-07 18:08:41 -08:00
sanchi-t
f9babb37a2 delete_sub: Do not remove stream from subscriptions when archived. 2025-03-07 18:08:41 -08:00
sanchi-t
874e7bacf9 popover_menus_data: Hide actions user can't take for archived channels.
Hide actions users cannot perform for messages and topics within
archived channels.
2025-03-07 18:08:41 -08:00
Lauryn Menard
3143662830 narrow-state: Use stream_id in cases where only stream ID is needed.
Updates calls to narrow_state.stream_sub that do not use the
StreamSubscription data, but rather just need a valid stream ID.
2025-03-06 17:47:59 -08:00
Lauryn Menard
51bb8eff59 narrow-state: Add only_valid_id boolean param to stream_id function.
Updates narrow_state.stream_id to have a boolean parameter, that
defaults to false. When true, the function will return an ID or
undefined based on the stream data that we have. When false, the
function will return the operand of the channel narrow term when
it's a valid number or undefined if it's not.

Replaces all uses of narrow_state.stream_sub()?.stream_id to
instead use the updated stream_id function with only_valid_id set
to true.
2025-03-06 17:47:57 -08:00
Tim Abbott
8cbd5e3612 buddy_data: Fix inconsistent subscriber status test.
The `subscribed` state elsewhere in this test has the current user
subscribed, so they should be there in peer_data.
2025-03-06 17:44:36 -08:00
Lauryn Menard
61fa5ccbf1 narrow-state: Return undefined for a channel ID that would be NaN.
When the channel operand would return NaN for the ID value, we now
return undefined, so that there is only one invalid value being
returned by narrow_state.stream_id.
2025-03-06 17:42:50 -08:00
Lauryn Menard
edc9853a3e narrow_state: Refactor get_first_unread_info to take a defined filter.
This function is called when entering a message feed view. Therefore,
it should always have a defined MessateListData filter.

Follow-up clean up from reworking the home view to use a Filter
object.
2025-03-06 17:42:50 -08:00
Lauryn Menard
c78d5acddd narrow-state: Refactor and rename is_for_stream_id.
Renames is_for_stream_id to narrowed_to_stream_id, and updates it
to use narrow_state.stream_id for the comparison check instead of
getting the full StreamSubscription object.
2025-03-06 17:42:50 -08:00
whilstsomebody
9b0477d771 search_query: Prevent overflow of long search queries.
Previously, when searching for extremely long queries,
they would overflow beyond the screen.

This commit fixes the bug by ensuring that long
search queries do not overflow.

Fixes: #29568
2025-03-06 13:13:38 -08:00
Kislay Verma
86643f3406 composebox_typeahead: Show topic suggestions for markdown stream links.
This commit enables topic suggestions for
channel links of the format
[#channel name](path)>some topic.
Previously no typeahead suggestion was shown
for above format.

Selecting a topic will result in link of format
[#stream name > topic name](topic path)

Typing `>` after the fallback md stream link also
shows topic suggestions, parallel to the standard

Fixes #32556
2025-03-06 13:04:18 -08:00
Kislay Verma
10995ded0e topic_link_util: Add function to unescape html characters.
Co-authored-by: getmeapencil@gmail.com
2025-03-06 13:04:18 -08:00
Tim Abbott
be0bc77300 people: Remove is_current_user legacy helper.
This does lookups by email address, which is very much a legacy way to
do things, and could throw exceptions if trying to lookup details on
an unknown user ID.
2025-03-05 15:56:57 -08:00
Karl Stolley
80dcd53b59 youtube: Request medium-quality preview images. 2025-03-05 13:59:58 -08:00
whilstsomebody
b9c037e0ee realm_playground: Use Intl.ListFormat rather than .join(",").
Fixes: #26936

Co-authored by: CIC4DA <dhruv.jain9100@gmail.com>
2025-03-04 16:58:23 -08:00
whilstsomebody
6c6d5fbb6a people: Use Intl.ListFormat rather than .join(",").
Fixes: #26936

Co-authored by: CIC4DA <dhruv.jain9100@gmail.com>
2025-03-04 16:58:23 -08:00
whilstsomebody
cface068cb util: Add function to format array output based on "and" preference.
This is a pre-commit to add the function
"format_array_output_based_on_and_preference()" which will take
two parameters- string array and a boolean whether we want and
based output or not. This function return a string formatted
using Intl.ListFormat.
2025-03-04 16:58:23 -08:00
Harsh
411fd9c4fe navbar: Show "Muted user" instead of muted user's name.
This commit shows the string "Muted user" instead of
muted user's name in DM's navbar.

fixes: #33673
2025-03-04 15:43:25 -08:00
Lauryn Menard
cb8e67a0e6 narrow-banner: Pass filter for showing/picking an empty narrow banner.
We expect to have a message list and therefore a filter when we show
or pick an empty narrow banner.
2025-03-04 15:35:18 -08:00
apoorvapendse
b5e123a613 user_groups: Disable actions for deactivated groups.
Joining/leaving the group as well as
adding or removing others is disabled.
2025-03-04 13:36:30 -08:00
opmkumar
1d33214b55 narrow: Allow spectators to use is:resolved.
Fixes #33568.
2025-03-04 11:37:21 -08:00
opmkumar
85eb8e554f hash: Fix navigation issue with negated operators.
Previously, for spectators, when a negated search operator was
present, navigating forward or backward triggered the "signup/login"
modal.
This commit fixes this issue.
2025-03-04 11:37:21 -08:00