Commit Graph

5830 Commits

Author SHA1 Message Date
Aman Agrawal
dc9422ec81 test_message_summary: Add a basic test. 2025-01-27 12:23:40 -08:00
Anders Kaseorg
0ba41328fd openapi: Fix misuse of nullable as sibling of oneOf.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-24 23:00:21 -08:00
Shubham Padia
2fdb4fe53c stream: Add conditional note to can_add_subscribers_group.
Fixes #33156.
If the stream is set to on the private settings for privacy, we add a
parenthesis text `must be subscribed`.
We had to use JS to change the string since just having a conditional in
the handlebars template would not ensure that the parenthesis text
appears or disappears on changing the value.
2025-01-23 15:57:16 -08:00
Shubham Padia
82c04ebe9e stream_types: Add admin permissions note below advanced configurations.
We've also removed the label_parens_text of `in addition to organization
administrators` wherever applicable.
2025-01-23 15:57:16 -08:00
Aman Agrawal
b047c4d322 message_summary: Add API endpoint to generate narrow summary.
This prototype API is disabled in production through settings not
configuring a default model.
2025-01-22 12:12:08 -08:00
Karl Stolley
cf29edaa65 compose: Flatten a popover-free formatting bar. 2025-01-14 15:52:02 -08:00
Anders Kaseorg
f223251ffe requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-14 09:42:16 -08:00
Anders Kaseorg
653b0b0436 ruff: Partially reformat Python with Ruff 0.9 (2025 style).
These are the changes that are backwards compatible with the 2024
style.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-14 09:42:16 -08:00
Prakhar Pratyush
e9553daee4 topic-list-item: Show realm_empty_topic_display_name for topic="".
This commit adds support to display `realm_empty_topic_display_name`
value in the left sidebar for topics having the actual value of
empty string.
2025-01-10 14:32:55 -08:00
Sayam Samal
6557cd74cd stream_color: Replace spectrum color picker with native color picker.
This commit replaces the spectrum color picker used in the stream
popover and stream settings with a custom color picker popover, which
contains a grid of predefined color swatches and a custom color option.

The custom color option uses the HTML5 <input type="color"> which shows
the native browser color picker UI.

Fixes #14961.
2025-01-07 17:27:23 -08:00
Prakhar Pratyush
5d9beb3655 fetch_messages: Add support for empty topic names.
This commit is a part of the work to support empty string
as a topic name.

Previously, empty string was not a valid topic name.

Adds `allow_empty_topic_name` boolean parameter to `GET /messages`
and `GET /messages/{message_id}` endpoints to decide whether the
topic names in the fetched messages can be empty strings.

If False, the topic names in the fetched message will have the
value of `realm_empty_topic_display_name` field in `POST /register`
response replacing "" for channel messages.
2025-01-07 17:24:00 -08:00
Prakhar Pratyush
3ba198e79a message_send: Add support to send message with an empty topic name.
This commit is a part of the work to support empty string
as a topic name.

Previously, empty string was not a valid topic name.

Adds a `empty_topic_name` client capability to allow client
to specify whether it supports empty string as a topic name.

Adds backward compatibility for:
- `subject` field in the `message` event type
2025-01-07 17:24:00 -08:00
Prakhar Pratyush
31b3842c9b delete_topic: Delete UserTopic rows when a topic is deleted.
Earlier, when a topic was deleted then UserTopic rows corresponding
to that topic were not deleted resulting in a bug where the topic
is listed in the '/#settings/topics' panel even after deletion.

This commit fixes the incorrect behavior to delete the concerned
UserTopic rows.

We need to take special care of the case when a topic is deleted
in private channel with protected history. We delete the UserTopic
records for exactly the users for whom after the topic deletion
action, they no longer have access to any messages in the topic.
2025-01-07 16:41:02 -08:00
Sahil Batra
2d09cd899e message: Use new setting for checking stream posting permissions. 2025-01-07 12:17:09 -08:00
Steve Howell
f9b7def098 custom lint checks: Avoid direct calls to rewire setters. 2025-01-07 09:43:33 -08:00
Steve Howell
6a4102f9fa lint: Add cjs suffixes to JS checks. 2025-01-07 09:43:33 -08:00
apoorvapendse
8cc4b655ba code_block: Exclude 🔥 emoji alias for mojo. 2025-01-03 15:16:32 -08:00
Anders Kaseorg
89bc073b5b emoji_names: Rebuild with CLDR 46.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-02 17:30:40 -08:00
Anders Kaseorg
a9d64d5604 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-02 17:30:40 -08:00
Anders Kaseorg
7ce49a709e check-schemas: Remove unnecessary special case for saved_snippets.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-02 17:28:17 -08:00
Steve Howell
5fd24bc9a2 event checkers: Replace data_types.py with pydantic.
This commit completely eliminates the home-grown
data_types.py system for checking types.

Now, in our unit tests and schema checkers, we use
pydantic types to check the shape of the event
objects that are either in our JSON fixtures or
that get captured by test_events.py.

The code in event_types.py was completely
code-generated from the legacy version of
event_schema.py, so there shouldn't be any
manual errors in how I ported the types over.
(The code generation was non-trivial, though,
as I had to account for changes from
snake_case to CamelCase and deal with some
other anomalies.)
2025-01-02 12:23:35 -08:00
Steve Howell
934f584257 check-schemas: Improve success output.
We now tell you how many fixtures were checked
as part of the success message.

Right now we're up to 118 checks.
2025-01-02 12:23:35 -08:00
Steve Howell
01f4ec5ee4 check-schemas: Enforce that all fixtures get checked.
I had to work around that the event type is "saved_snippets",
but the author of the feature otherwise correctly used
the singular "saved_snippet".
2025-01-02 12:23:35 -08:00
Steve Howell
7480c5f285 checks-schemas: Remove checks related to API docs.
When we move away from `data_types.py` in favor of using
`pydantic` to describe the shape of our event objects in
the events test (hopefully coming soon), then the code
I deleted here will no longer work.

The consequence of this change is that API docs may
diverge from the actual event types that we use, but
I believe there are better ways to manage this.

Also, the deleted code was particularly hard to debug
(and I say that as the original author). It probably
also causes friction for folks who want to update the
docs but who don't necessarily grok how the event tests
work under the legacy `data_types.py` regime.

Once we get pydantic types working, we can probably
just write a separate tool to validate against them
against the API docs using the `openapi-schema-pydantic`
package or something similar.
2025-01-02 12:23:35 -08:00
apoorvapendse
5378464f87 provision: Source virtualenv for login shells conditionally.
This commit conditionally adds the source command for
virtualenv in the user's bash profile only when the
system is virtualized.

Checking WSL_DISTRO_NAME in the env vars
is the cheapest option in case of checking
whether the system runs as WSL VM since
it is an in memory operation.
Hence it is checked for first in `is_wsl_instace`.

Fixes #15029.
2025-01-02 09:11:43 -08:00
Anders Kaseorg
6dfa1b6138 types: Extract update_message_event_schema.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-30 09:42:26 -08:00
Anders Kaseorg
2548430af3 types: Extract and correct user_group_update_event_schema.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-30 09:42:26 -08:00
Anders Kaseorg
19b8cde27f ruff: Fix PLC0206 Extracting value from dictionary without calling .items().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-21 21:06:53 -08:00
Harsh Bansal
4d3cc2c5a5 portico: Improve layout of /go page.
Made the input field of the page consistent with
the other similar pages. Here are I have done the following things:
1. Changed text 'Enter your organization's Zulip URL:'->'Organization URL'.
2. Left aligned the label and button to make it consistent.
3. Moved 'Don't know your organization URL? Find your organization.' to be
just below the URL field.
4. Changed the placeholder 'your-organization-url' -> 'your-organization'

Fixes #32198
2024-12-17 23:24:00 -08:00
Sahil Batra
4cb9fb0d5a group-permission-settings: Add function to get list of setting names.
This commit adds a function which returns type checked list of
group permission setting names so that all the type checking
has to be done only once.
2024-12-17 12:36:23 -08:00
Anders Kaseorg
a9b9ed6c5b run-dev: Support extra MIME types from zerver.lib.mime_types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-17 09:34:29 -08:00
Anders Kaseorg
a6f5d24dc6 run-dev: Move out-of-place import statement.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-17 09:34:29 -08:00
Anders Kaseorg
21a085e390 generate_emoji_names_table: Update SORTED_CATEGORIES.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-16 13:12:01 -08:00
Vector73
143ca5065e api: Remove user object from reactions objects in the API.
Removes deprecated `user` object from reactions objects returned by
the API as it is redundant because of the presence of `user_id` field in
the API and is not used by any clients now.
2024-12-13 09:58:25 -08:00
Anders Kaseorg
26aa19db43 click_handlers: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-11 12:12:07 -08:00
Anders Kaseorg
d446b0d672 user_events: Convert module to TypeScript (#32658) 2024-12-11 09:18:52 -08:00
Anders Kaseorg
666ce4519d hashchange: Convert module to TypeScript. (#32670) 2024-12-11 09:15:18 -08:00
Anders Kaseorg
cf1eed9c22 tools: Use top-level await.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-10 19:16:25 -08:00
Varun Singh
010e2b9867 user_group_edit: Convert module to TypeScript. 2024-12-10 12:07:46 -08:00
evykassirer
7bd4016254 message_events: Convert module to typescript. 2024-12-10 10:52:01 -08:00
Niloth P
e731fb9eba integrations: Fix Jotform integration by accepting form-data payloads.
This does not add support for files.

Fixes part of #32460.

Co-authored by: PieterCK <pieterceka123@gmail.com>
2024-12-02 18:08:58 -08:00
Niloth P
a0a1f55965 screenshot webhooks: Add support for multipart/form-data fixtures.
Add a common function for webhooks to convert multipart strings to dict.
This facilitates loading a multipart/form-data fixture as a file string,
and converting it.

This will allow testing integrations that use multipart/form-data,
and generating their example screenshots using a script.

Note that this only supports text fields, accommodation for binary files
is not included at the moment.
2024-12-02 18:08:58 -08:00
Anders Kaseorg
d78902fac3 e2e-tests: Move test credentials to a JSON file.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-01 22:14:35 -08:00
Anders Kaseorg
5fbb60a849 lint: Correct path to ESLint configuration.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-01 22:14:35 -08:00
Anders Kaseorg
fcba1f03c4 drafts_overlay_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-30 18:41:42 -08:00
Anders Kaseorg
ee11d73c1f user_card_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 22:05:38 -08:00
Anders Kaseorg
d8d8e620e7 topic_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 22:02:43 -08:00
Anders Kaseorg
9f4b4a0c8a message_actions_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 17:36:59 -08:00
Anders Kaseorg
49f2d08006 message_scroll: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 17:12:22 -08:00
Anders Kaseorg
93185dd7a6 stream_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 16:55:00 -08:00