Commit Graph

58506 Commits

Author SHA1 Message Date
Anders Kaseorg 24904f32bb message_list: Remove ids_greater_or_equal_than.
It’s unused since commit c876e12b86
(#23579).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 19:08:08 -07:00
Anders Kaseorg 9cee037f2a message_list: Remove nth_most_recent_id.
It’s unused since commit 748e5b6da6.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 18:56:59 -07:00
Anders Kaseorg 8f0dda3d4b e2e-tests: Fix check_compose_state arguments.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 16:51:36 -07:00
Anders Kaseorg 931f515207 message_list_data: Fix type of first, first_including_muted.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 16:41:50 -07:00
Anders Kaseorg 26fd6be88f billing helpers: Add missing $ prefix to jQuery object parameter.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 15:41:18 -07:00
evykassirer 27b5c61399 composebox_typeahead: Allow for undefined topic in PersonSuggestionOpts.
Fixes this error, which occured when editing DM messages and bringing
up the mention typeahead with "@"

https://zulip.sentry.io/issues/5389123227/events/46ab6c6ca68344ac89af7444fa0f8c39/?project=4504556882821120
2024-05-23 14:55:40 -07:00
Alex Vandiver 5f3d6ac983 sentry: More gracefully handle a value of 0.
If the value at runtime is actually an int, not a float, we should not
try to treat it as a dict.
2024-05-23 14:09:19 -07:00
Sahil Batra 959c78e1e1 invite: Fix rendering invite modal for realms without default channels.
The default channels checkbox only exists in DOM if there are default
channels in the realm, so we should make sure that we check whether
there are default channels in the realm before accessing the
checkbox element in set_streams_to_join_visibility.
2024-05-23 11:32:09 -07:00
Aman Agrawal e6c074e206 recent_view: Fix no topic found at center of recent view.
The bug is hard to reproduce, but I was able to reproduce with #30134
and used the same strategy to fix it here.
2024-05-23 10:39:27 -07:00
Aman Agrawal e530af5013 narrow: Fix combined feed selecting random messages on narrow.
Reproducer:

* Have some unreads in the Combined feed view.
* Scroll up and select a message that was not part of initial fetch.
* Reload.
* Go a another narrow.
* Come back to combined feed to find your at a random message. This
  message is actually last message of the current fetch of
  combined feed view which was returned via `first_unread_message_id`.
2024-05-23 10:37:29 -07:00
Aman Agrawal b22adc1d5f filter: Fix combined feed navigating to muted unread message.
Some we didn't have a check for if topic is muted here which
resulted in combined feed trying to navigate user to muted
unread message if it was the first unread in the narrow.
2024-05-23 09:17:40 -07:00
Vector73 62dfd93a83 api: Add "users/<int:user_id>/status" endpoint.
The documentation Creates a shared UserStatus schema that's used for
the return value of this new endpoint and for the existing user_status
objects returned by the register queue endpoint.

Co-authored-by: Suyash Vardhan Mathur <suyash.mathur@research.iiit.ac.in>

Fixes #19079.
2024-05-22 18:07:22 -07:00
Vector73 d6672c57ff user_status: Rename `get_user_status_dict` function.
Renames `get_user_status_dict` function to `get_all_users_status_dict`
to distinguish it from new `get_user_status` function.
2024-05-22 18:07:22 -07:00
Karl Stolley 20d6dd110a left_sidebar: Align more-topics indicator on topic grid. 2024-05-22 17:24:35 -07:00
Karl Stolley 50a7e3cf2c left_sidebar: Flatten renamed .sidebar-topic-name selector. 2024-05-22 17:24:35 -07:00
Sahil Batra d1bcac0822 realm: Use enums for accessing setting values.
This commit updates code, majorly in tests, to use
setting values from enums instead of directly using
the constants defined in Realm.

We still have those constants defined Realm as they
are used in a couple of places where the same code
is used for different settings. These will be
handled later.
2024-05-22 17:20:37 -07:00
Sahil Batra 52b0199189 realm: Migrate "PATCH /realm" endpoint to typed_endpoint. 2024-05-22 17:20:37 -07:00
Sahil Batra 5d3a0ce94a realm: Add enums for setting values.
This is a prep commit to migrate "PATCH /realm" endpoint to use
"typed_endpoint".
2024-05-22 17:20:37 -07:00
N-Shar-ma 68c83bce44 widgets: Fix bug where `process_submessages()` was run for empty rows.
We now check if the row exists in the current view, and only then do we
process the submessages in it, instead of letting `Error: Failed to
do_process_submessages` happen.
2024-05-22 17:16:54 -07:00
Lauryn Menard 4fcf7945b0 support: Show annual revenue for active fixed price plans.
In the activity and support views, we want to see the annual
revenue for fixed price plans. While on billing pages, we do
not display this information as these plans are renegotiated
annually.

Adds get_annual_recurring_revenue_for_support_data function
to BillingSession class, so that we can get the fixed price
plan data for these views without changing the logic for
what is displayed on the billing pages.
2024-05-22 15:57:59 -07:00
roanster007 3b73f19719 refactor: Extract method to create and update message lists in narrow.
This commit extracts the method to create and update message
lists in the narrow. This is particularly useful in cases when we
need to update the narrow and view with our own message lists.

This is a preparatory commit to #30114, since it involves
creating a new message list from the messages fetched,
which may be of a different narrow from that of the
initial filter, and updating the view and narrow with it.
2024-05-22 15:31:49 -07:00
Karl Stolley 0fbdd02d87 compose: Tune send-controls vdots for narrowest viewports. 2024-05-22 11:36:28 -07:00
Karl Stolley ac6ac58385 compose: Strengthen layout in send-controls area. 2024-05-22 11:36:28 -07:00
Sahil Batra 5737d4c483 create_user: Fix comment in set_up_streams_for_new_human_user.
This commit fixes comment about subscribing to default streams
in set_up_streams_for_new_human_user to explain the current
logic after changes in 69ba580a54.
2024-05-22 11:34:27 -07:00
Lauryn Menard 37afad038c support: Add link to stripe customer dashboard.
Adds a link to the stripe customer dashboard if the Customer
object for an active plan has a stripe_customer_id. If there
is no stripe ID to link to, then the icon is shown without
a link, which is the case for remote server/realm sponsorships
and legacy plans.
2024-05-22 11:32:46 -07:00
Sahil Batra 39c6a01c74 settings: Fix updating realm join restrictions setting.
This commit fixes the bug when updating
"Restrict email domains of new users?" setting by
adding data-setting-widget-type attribute to the select
element as get_input_element_value now expects every
element to have that attribute after 64c8262eaf.

Due to this change, we also need to update the code in
populate_data_for_request function to not send invalid
parameter in the request. This change resulted in some
refactoring which now helps in not passing in the
"disallow_disposable_email_addresses" and
"email_restricted_to_domains" when these fields are
not changed.
2024-05-21 21:20:50 -07:00
Sahil Batra ed8d7ed864 settings: Fix code for updating realm default language.
This commit fixes the bug when updating realm default
language setting by adding data-setting-widget-type
attribute to the relevant element with "prop-element"
class as get_input_element_value now expects every
element passed to it to have that attr after 64c8262eaf.

As a result we can now remove the code from
get_complete_data_for_subsection to handle realm
default language and just let get_input_element_value
handle it and it also helps in passing the parameter
unnecessary to request when the setting is not changed.
2024-05-21 21:20:50 -07:00
Sahil Batra a530311646 settings: Fix user notification batching settings.
This commit solves the bug for user notification batching
setting which was introduced during the typescript migration
of settings_components.js due to assertion error in
get_input_element_value.
2024-05-21 21:20:50 -07:00
Aman Agrawal 0d3e223493 compose: Fix formatting popover persists on wide screens.
Reproducer:

1. Make your window narrow, to get the `...` formatting buttons menu.
2. Open the menu.
3. Make your window wide again.
2024-05-21 14:56:00 -07:00
Lauryn Menard cdacd7929d emails: Update image used in onboarding_zulip_topics.html for channel. 2024-05-21 12:21:53 -07:00
Lauryn Menard 6fc1b7a65a static: Rename images/help/streams-and-topics.png for channel. 2024-05-21 12:21:53 -07:00
Lauryn Menard 3bb3230fd0 static: Update images/help/streams-and-topic.png for channel. 2024-05-21 12:21:53 -07:00
Prakhar Pratyush c91d018b38 user_topics: Make bulk_set_user_topic_..._in_database atomic.
In e726012244, we removed the
@transaction.atomic decorator from the function
'bulk_set_user_topic_visibility_policy_in_database'.

We should keep it to avoid adding it to the caller
of this function, when reused in the future.
2024-05-21 09:24:43 -07:00
Prakhar Pratyush 23c2ce1671 create_realm: Fix channel name and description not being translated. 2024-05-21 09:24:43 -07:00
Prakhar Pratyush 508c5611d1 claim_attachment: Remove the stale 'user_profile' parameter.
This commit removes the unused 'user_profile' parameter
of the 'claim_attachement' function.
2024-05-21 09:24:43 -07:00
afeefuddin 206c8ffedc settings_profile_field: Fix class selector. 2024-05-21 09:09:58 -07:00
Aman Agrawal 1728a2c057 setup-recommended: Make user choose `osxfs` earlier to avoid failure.
Since the docker macOS setup doesn't work without this, it makes
sense for it to be just part of the setup instead of a thing
they fix after running into failure.
2024-05-20 22:46:22 -07:00
Tim Abbott 330439a83b zulip_updates: Wrap differently to workaround bug.
The bold syntax appearing on the start of a line made this render badly.
2024-05-20 18:01:04 -07:00
Alya Abbott 0decaef284 updates: Add update about stream->channel rename and faster loading. 2024-05-20 16:31:55 -07:00
Tim Abbott b196c5026f i18n: Update translation data from Transifex. 2024-05-20 15:19:18 -07:00
Aman Agrawal 7d41c8ce06 narrow: Add minor comment. 2024-05-20 15:01:48 -07:00
Aman Agrawal cd41e5f4fa narrow: Rename save_narrow. 2024-05-20 15:01:48 -07:00
Aman Agrawal 625b07c010 recent_view: Complete TODO to use first unmuted unread message id.
We already had the data at initial request, so we just add
some plumbing to make it available.
2024-05-20 15:01:47 -07:00
Sahil Batra 2007a582a1 message: Optimize checking if mentioning user group is allowed.
This commit updates the code to not call is_user_in_group
function if can_mention_group setting is set to "role:everyone"
group.
2024-05-20 14:43:07 -07:00
Sahil Batra eec80a4a5a message: Fix code to check group mention permission.
This commits fixes the code which checks group mention permission
to handle anonymous user groups correctly. Basically we were
not checking whether the UserGroup is linked to a NamedUserGroup
and directly accessing named_user_group which results in an
error.

We also update the error messages to include the group name
which has permission to mention the groups since now there
might be a comnbination of groups and users who has permission
to mention the group.

This commit also adds tests to check sending and editing messages
when can_mention_group is set to a anonymous user group.
2024-05-20 14:43:07 -07:00
Kenneth Rodrigues ba92cd8b23
search: Include history for is:resolved queries.
The previous logic assumed that all `is:` operators were those like `is:muted`
or `is:starred`, which depend on personal data.
2024-05-20 14:37:08 -07:00
Anders Kaseorg ffb182fb25 compose_popovers: Fix message_type typo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-20 14:30:29 -07:00
Alya Abbott 4179e47578 portico and help: Improve documentation on education pricing. 2024-05-20 14:30:07 -07:00
Anders Kaseorg b545abe1e2 typos: Fix typos caught by mwic.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-20 13:55:00 -07:00
Anders Kaseorg 38cae070ed typos: Fix typos caught by typos.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-20 13:55:00 -07:00