Commit Graph

58953 Commits

Author SHA1 Message Date
Varun Singh f2c3207538 stream_topic_history_util: Use `raw_data` and `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Varun Singh 3d64fb6cda message_edit_history: Use `raw_data` and `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Varun Singh f553142c7c settings_linkifiers: Use `raw_data` and `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Varun Singh 4186cac151 stream_edit_subscribers: Use `raw_data` & `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Kenneth Rodrigues 245332eef4 new conversation: Show correct tooltip when dms are disabled.
Earlier the `data-conversation-type` attribute of the new conversation
button was being set to `direct` only if dms were enabled. As a result a
stale tooltip was being shown when dms were disabled.
This commit updates the attribute to `direct` reagardless of dms being
enabled or not.

Fixes #29916.
2024-06-21 11:21:37 -07:00
Karl Stolley 2820bd277f pygments: Fully isolate light and dark themes.
Co-authored-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 11:15:34 -07:00
Karl Stolley 8936febbd3 pygments: Remove legacy Zulip customizations.
These styles were from before opting to work with themes maintained
by the Pygments project. Their removal will make it much easier to
upgrade Pygments themes in the future, and more importantly,
reduce the effort required to square syntax highlighting in the web
and mobile apps.
2024-06-21 11:15:34 -07:00
Varun Singh 80cf16a303 stream_edit_subscribers: Convert module to TypeScript. 2024-06-21 09:54:08 -07:00
Varun Singh 894cafe3c0 subscriber_api: Fix types of function parameters. 2024-06-21 09:54:08 -07:00
Varun Singh 5891a9ef24 subscriber_api: Don't return unused channel request objects. 2024-06-21 09:54:08 -07:00
Vector73 5230aada2b python_examples: Validate error responses.
Adds assert statements to validate error response for "400" error code. The
current validation using `validate_against_openapi_schema` doesn't work for
"400" responses.

Adds separate functions to validate "200" and "400" responses and removes `validate_response_result`.
2024-06-21 09:49:07 -07:00
Anders Kaseorg ce71e5ad8c starred_messages: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg 9a94cb2269 people: Validate paramters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg b93509019d people: Mark possibly missing fields as optional.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg 02e236f58a realm_user_settings_defaults: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg 282ea2d77f realm_user_settings_defaults: Fix user_list_style type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg bb8f044a35 scheduled_messages: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg ed1c169bfb user_settings: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg fd253539e0 ui_init: Use Zod to split state_data.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Alex Vandiver be9369541a create_user: Copy the avatar before announcing it. 2024-06-20 23:06:08 -04:00
Alex Vandiver 35f8c3c455 avatar: Clean up one callsite of deprecated avatar_url_from_dict. 2024-06-20 23:06:08 -04:00
Alex Vandiver fd50f12548 requirements: Remove now-unused cairosvg. 2024-06-20 23:06:08 -04:00
Alex Vandiver 5ff4d9f88a integrations: Generate avatars using pyvips. 2024-06-20 23:06:08 -04:00
Alex Vandiver 215c22ec3d generate_landing_page_images: Rewrite in pyvips. 2024-06-20 23:06:08 -04:00
Alex Vandiver 475d4800f9 thumbnailing: Add pyvips dependency. 2024-06-20 23:06:08 -04:00
Alex Vandiver 3ce06361c8 models: Document UserProfile.avatar_hash as LDAP-only. 2024-06-20 23:06:08 -04:00
Alex Vandiver b36ad31f0e backends: Early return in sync_avatar_from_ldap. 2024-06-20 23:06:08 -04:00
Alex Vandiver 0153d6dbcd thumbnailing: Move resizing functions into zerver.lib.thumbnail. 2024-06-20 23:06:08 -04:00
Alex Vandiver 2c5dff7f59 thumbnailing: Remove unnecessary os.path adjustment.
This is a library file, not a binary; os.path is already set up.
2024-06-20 23:06:08 -04:00
Alex Vandiver 846cffe2fa name_restrictions: Reserve "avatar". 2024-06-20 23:06:08 -04:00
Aman Agrawal 32b4aa0883 navbar: Remove empty space to the left and right. 2024-06-20 16:11:19 -07:00
Anders Kaseorg 139d6ff81b markdown_timestamp: Remove incorrect space.
The space wasn’t visible because it was narrower than the padding on
`.rendered_markdown time`, but it showed up in copy-and-paste.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-20 16:04:30 -07:00
Sahil Batra 6164a41864 realm: Remove create_private_stream_policy setting.
This commit removes create_private_stream_policy setting as
we now use new group based setting.

The "/register" response includes realm_create_private_stream_policy
field to return a value representing superset of users who have the
permission to create private channels, as older clients still expect
this field.
2024-06-20 15:48:14 -07:00
Sahil Batra e19524ba92 settings: Use new group setting to private channels creation permission.
This commit updates webapp code to use new group based setting to check
permission for creating private streams.
2024-06-20 15:48:14 -07:00
Sahil Batra 0bae59fa4b streams: Check permission to create channels based on group setting.
This commit updates code to use new group based setting when
checking permission to create private channels.
2024-06-20 15:48:14 -07:00
Sahil Batra 27171d103e realm: Add new group setting for who can create private channels.
This commit adds new group based setting to control who can create
private channels.
2024-06-20 15:48:14 -07:00
Sahil Batra 428d4284f9 users: Update has_permission to accept realm as argument.
This commit helps in using the realm object which has the
prefetched group settings so that we can avoid extra queries
when calculating fields like can_create_public_streams.
2024-06-20 15:48:14 -07:00
Sahil Batra 69e88f8787 tests: Extract common function to test realm group based settings.
Test for "can_access_all_users_group" setting does not use the
common function as it allows different options as of now.
2024-06-20 15:48:14 -07:00
Sahil Batra 048221212e realms: Do not prefetch settings in get_realm.
There is no need to prefetch group settings using select_related
in get_realm as we only need to save queries when computing the
setting values in fetch_initial_state_data and we already refetch
the realm using get_realm_with_settings for that.
2024-06-20 15:48:14 -07:00
Sahil Batra 19373d61e8 events: Do not call "can_create_..." functions twice.
There is no need to call settings_user.can_create_public_streams
and similar functions for private and web-public streams twice,
once to compute the field for a single stream type and one to
compute can_create_streams.

The value for each stream type can be used to compute value of
can_create_streams field.
2024-06-20 15:48:14 -07:00
Alya Abbott 2b9a0cbe52 updates: Add update about Reactions view, hiding sidebars, is:followed. 2024-06-20 15:30:47 -07:00
Alya Abbott b60147bbd8 help: Document new Reactions view. 2024-06-20 15:30:47 -07:00
Anders Kaseorg 5f053c4aa7 upload: Serve more cross-browser audio and image formats as inline.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-20 15:29:20 -07:00
Anders Kaseorg fb4ad1422e mime_types: Add audio and image types missing from Python library.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-20 15:29:20 -07:00
evykassirer f6c9b515c7 input_pill: Redesign input pills.
This commit also replaces the close button with
an svg. This is part of the app redesign, and
preparation for the upcoming search pill project.
2024-06-20 15:16:17 -07:00
evykassirer 84cf7f8677 input pill: Remove pill-container-btn class in favor of search styling.
This style is currently only used for search suggestions. Soon,
styling for those suggestions will become more specific, and so
for now we'll keep those styles in search.css to be more clear
about what the new styles affect. If we want to repeat something
like this in the future somewhere else in the app, we can come
up with a generic styling then once we have a better idea of
what that will look like.
2024-06-20 15:16:17 -07:00
Aman Agrawal 792a9bd81e presence: Fix presence status not updated for offline users.
As per the new presence API, we don't get presence info for
users if they went offline after `last_update_id`. This results
in webapp not updating presence info for them.

To fix it, we loop over all the active / idle status users and
update presence status for them as per the latest server time.
2024-06-20 12:35:42 -07:00
Ujjawal Modi 9bb74fb064 settings-config: Use snake case for expires_in_values keys. 2024-06-20 12:26:29 -07:00
Ujjawal Modi cdbc20d304 invite-user-modal: Remove duplicate CSS rules.
Removes some CSS rules used in the invite user modal that were
already being applied via the shared `modal_select` class.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2024-06-20 12:26:29 -07:00
Kenneth Rodrigues 15accfc983 narrow: Use NarrowParameter instead of dictionary.
Earlier we were using the type `OptionalNarrowListT` for all functions
that required "narrow" as a parameter.
This commit changes all the functions accepting a "narrow"
to use a list of the new `NarrowParameter`
instead of `OptionalNarrowListT` which is a list of dicts.
2024-06-20 12:22:37 -07:00