Commit Graph

58622 Commits

Author SHA1 Message Date
Anders Kaseorg 48d3601649 echo: Use newly created MessageWithBooleans in insert_local_message.
Commit 50f5cf9ad8 (#30227) changed
message_helper.process_new_message (called by
message_events.insert_new_messages) to return a newly created message
object rather than mutating the object it was passed.  So
echo.insert_local_message needs to use this new object, fixing a
regression where we’d fail to replace a locally echoed message when
the server-rendered message came in.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-03 12:25:08 -07:00
afeefuddin 394e8fc856 navbar_alerts: Convert module to TypeScript. 2024-06-03 12:19:58 -07:00
afeefuddin 7025d409c3 navbar_alerts: Use UNIX timestamp consistently. 2024-06-03 12:19:58 -07:00
afeefuddin b3809a33b5 state_data: Update realm_schema.
Add demo_organization_scheduled_deletion_date and realm_date_created
to realm_schema.
2024-06-03 12:19:58 -07:00
Karl Stolley 0f6072d2d6 left_sidebar: Condense nav rows to standard size. 2024-06-03 10:32:29 -07:00
Karl Stolley 5dafaf9deb left_sidebar: Expand topic rows to prominent size. 2024-06-03 10:32:29 -07:00
Vector73 61d7689520 capitalization: Allow `realm_url` in user-facing strings. 2024-06-03 10:07:10 -07:00
Vector73 8d4c42d460 tools: Replace `realm_uri` with `realm_url`.
Replaces `realm_uri` with `realm_url` in "message-screenshot" and "thread-screenshot".

Adds a missing `>` in both files.
2024-06-03 10:07:10 -07:00
Vector73 88df01bee5 web: Replace `realm_uri` with `realm_url` in frontend files.
Replaces `realm_uri` with `realm_url` in some frontend files and a js test.
2024-06-03 10:07:10 -07:00
Vector73 4430ab9cbe zerver: Replace `realm_uri` with `realm_url` in backend files.
Co-authored-by: Junyao Chen <junyao.chen@socitydao.org>
2024-06-03 10:07:10 -07:00
Vector73 c514d39efc python-examples: Remove unneeded asserts of parameter type. 2024-06-03 10:04:48 -07:00
Vector73 daf49c82e1 python-examples: Make spacing consistent in file for readability. 2024-06-03 10:04:48 -07:00
Vector73 f46b49c79c python-examples: Clean up inline comments. 2024-06-03 10:04:48 -07:00
Lauryn Menard 9fd21addad python-examples: Move variable assignment out of user-facing examples. 2024-06-03 10:04:48 -07:00
Lauryn Menard 265f85fa95 python-examples: Remove unused result variable assigments. 2024-06-03 10:04:48 -07:00
Lauryn Menard 0584b9b2cf python-examples: Get invite IDs for tests that revoke invitations. 2024-06-03 10:04:48 -07:00
Lauryn Menard 6ef1625050 python-examples: Clean up user IDs in tests. 2024-06-03 10:04:48 -07:00
Vector73 1d3e4307fa python_examples: Add assert statements to verify response.
Creates a helper function `validate_response_result` to verify the
response of API request for each test.
2024-06-03 10:04:48 -07:00
Vector73 dde385a8e4 python_examples: Fix inconsistencies related to schema validation. 2024-06-03 10:04:48 -07:00
Vector73 f3bac5e3a3 python_examples: Update comment and remove unnecessary assert. 2024-06-03 10:04:48 -07:00
Vector73 1c3ba864e9 py_examples: Refactor `filters` tests to pass filter_id as parameter.
Updates `*_realm_filter` functions to use `filter_id` from function
argument rather than a hardcoded value.
2024-06-03 10:04:48 -07:00
Vector73 bea6f0370e python_examples: Refactor tests to remove hardcoded values.
Creates a helper function `get_subscribed_stream_ids` to fetch
subscribed streams' ids of the client.

Updates various functions to remove hardcoded values in request
body and used available API calls to fetch them.
2024-06-03 10:04:48 -07:00
Vector73 e4a1ff655c python_examples: Create helper function to remove repeated code.
Creates a helper function `validate_message` to remove the repeated code
for verifying the sent messages.
2024-06-03 10:04:48 -07:00
Sahil Batra d3ea6520dc user_groups: Add server level setting disallow anonymous groups for settings.
This commit adds a server level setting which controls whether the setting
can be set to anonymous user groups. We only allow it in the tests for
now because the UI can only handle named user groups.
2024-06-03 09:45:26 -07:00
Prakhar Pratyush 32391c3d06 ui_init: Don't store onboarding_steps state_data as current_user_param.
Earlier, onboarding_steps field of state_data was stored as
current_user_params.

Now, we store it separately in a data structure initialized in
onboarding_steps.ts

Reason: All the other state_data fields stored in current_user_params
are attributes of UserProfile. So, it makes sense to store it
separately.

Fixes part of #30043.
2024-06-03 08:53:28 -07:00
Prakhar Pratyush 915503df10 onboarding_steps: Rename the function 'update_notice_to_display'.
This commit renames the function 'update_notice_to_display' to
'update_onboarding_steps_to_display' as it can be used for
onboarding step of any type.

Currently, we have only one type i.e. 'one_time_notice'.
2024-06-03 08:53:28 -07:00
Sahil Batra 6711f0af09 message_delete: Fix event sent for updating first_message_id.
This commit fixes the event sent for updating first_message_id
when a message is deleted, to include the name field as it is
required for all "stream/update" events.

This commit also adds a test in test_events for the case when
first_message_id of a stream is updated on deleting a message.
2024-06-03 08:52:11 -07:00
Mateusz Mandera 016880f54d presence: Core last_update_id mechanism without API changes.
This commit has the mechanism for setting the .last_update_id on the
backend for UserPresence objects, without introducing any API changes.
Therefore this should invisible to clients and able to be deployed
safely without impact to users.
2024-06-02 22:08:28 -07:00
Mateusz Mandera b1d50b511c presence: Handle PresenceSequence in the export/import system. 2024-06-02 22:08:28 -07:00
Mateusz Mandera 0dca8f2a38 models: New PresenceSequence model and UserPresence.last_update_id col.
Migration plan:
1. Add NULLable .last_update_id column to UserPresence with default 0
   for new objects.
2. Backfill the value to 0 for old UserPresences, can be done in the
   background while server is running.
3. Make the column non-NULL.
4. Add new model PresenceSequence and create its rows for old realms.
2024-06-02 22:08:28 -07:00
Aman Agrawal 6750b02437 recent_view: Reduce constant flashing of recent view on initial load.
We completely rerender recent view when we receive a new message,
which is not ideal since it is flashes recent view frequently
during the initial fetch.

Since later parts of initial fetch which trigger the flash, only
load old messages, they cannot change the latest message of
rendered rows in recent view. That means we can just inplace
rerender the rendered rows which got updated and don't have
to worry about order of rows being changed.
2024-06-02 21:52:45 -07:00
afeefuddin 2fb1199af5 compose_call_ui: Pass $target_textarea consistently to insert call link.
Pass $<HTMLTextAreaElement>("textarea#compose-textarea") instead of
undefined when inserting the call link in compose-textarea.
2024-06-02 21:49:49 -07:00
afeefuddin 7b5ccf0c98 compose_call_ui: Rename target_textarea to $target_textarea. 2024-06-02 21:49:49 -07:00
afeefuddin 9cf9cec43a compose_call_ui: Convert module to TypeScript. 2024-06-02 21:49:49 -07:00
afeefuddin 49c4e5ec44 ui_report: Fix inaccurate annotations for generic_embed_error parameter.
The remove_after parameter is optional; when not provided, the alert is
not removed.
2024-06-02 21:49:49 -07:00
afeefuddin ab3bb767af state_data: Add has_zoom_token to current_user_schema. 2024-06-02 21:49:49 -07:00
Aman Agrawal bb6e6ecaa5 hello: Redesign landing page.
Co-authored-by: Vlad Korobov <terpimost@gmail.com>
Co-authored-by: Alya Abbott <alya@zulip.com>
2024-06-02 21:45:37 -07:00
Mateusz Mandera 355f05ffbc import_realm: Import message.edit_history correctly.
Fixes #26369.

There are two important fixes to make to the dicts in edit_history:
1. Update the user_id so that it points to the imported sender.
2. Apply fix_message_rendered_content to the prev_rendered_content data
to fix up mentions and other such syntax.
2024-06-02 21:10:50 -07:00
Mateusz Mandera 878d46ea49 import_realm: Fix docstring of fix_message_rendered_content.
The docstring was misleading talking about the import from non-Zulip
platforms, when this function is also very much applicable for
Zulip-to-Zulip imports.
2024-06-02 21:10:50 -07:00
afeefuddin 9d33c94f2d settings_components: Split functions to improve typechecking. 2024-06-01 22:53:34 -07:00
afeefuddin 7355aa3922 settings_org: Pass undefined implicitly when sub is undefined. 2024-06-01 22:53:34 -07:00
afeefuddin 23e22d1bbe settings_components: Remove unnecessary parameter. 2024-06-01 22:53:34 -07:00
roanster007 384a43c79c narrow: Fix server error of operand of "id" operator at large values.
Previously, when the operand of id operator was more than
2147483647, it was raising server error. This is because the
maximum permissible PostgreSQL integers value is 2147483647.

This is fixed by raising a BadNarrowOperatorError in case the
id operand is larger than 2147483647.
2024-06-01 22:38:18 -07:00
Alex Vandiver 5814583694 rabbitmq: Support non-/ vhosts.
Fixes: #30255.
2024-05-31 15:41:19 -07:00
Alex Vandiver a4ff6f9ae5 configure-rabbitmq: Switch to await_startup. 2024-05-31 15:41:19 -07:00
Aman Agrawal 0468f609e8 popovers: Fix selected message being changed on scroll inside popover.
Since scroll event is always fired at root level, we don't have
control over capturing the event and containing it to the popover
if scroll happened inside the popover.

This can lead to unintentional moving of selected message since
we try to move the selected message to rendered top / bottom if
we receive a scroll event when top / bottom ends are rendered.
2024-05-31 15:40:21 -07:00
Aman Agrawal ddf14116b2 emoji_popover: Fix white arrow color in dark theme.
Tested left, top and bottom placement of emoji popover to check
if arrow color is correctly displayed in both dark and light theme.
2024-05-31 15:39:09 -07:00
Sayam Samal ce1163ebe8 popovers: Add the missing aria-hidden attribute to popover icons.
Some of the popover icons were missing the aria-hidden attribute, which
caused them to be read out by screen readers.
2024-05-31 15:28:01 -07:00
Sayam Samal 17424c5f14 topic_actions_popover: Remove redunadant data-* attributes.
This modern implementation of this popover gets these values from what
was passed into its constructor.
2024-05-31 15:28:01 -07:00
Sayam Samal 34e6d84cf5 topic_actions_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
    offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
    or`role="menuitemradio"` to child elements based on their function.

- `role="group"` to the topic visibility picker, identifying it as a
    container for related menu items.

- `role="none"` to `<li>` elements, removing the implied `listitem`
    role that conflicts with the parent menu structure.
2024-05-31 15:28:01 -07:00