Commit Graph

58144 Commits

Author SHA1 Message Date
Anders Kaseorg a41d0b16e6 user_topics_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 14:01:04 -07:00
Anders Kaseorg c50b28610c user_topics_ui: Fix backwards setTimeout arguments.
Introduced by commit 401c8bbb21
(#27254).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 14:01:04 -07:00
Aman Agrawal f57fb0862e message_edit: Fix event handlers lost on restoring edit form.
To avoid event handlers being lost when we restore a message edit
form we go through the process of creating the edit form for the
message again. This has the additional benefit of updating the
status of buttons based on org settings like GIF or upload button.
2024-05-14 12:21:49 -07:00
Aman Agrawal ca8f04ea35 message_list_view: Remove unnecessary parameter passed.
Since we are already selecting the previously selected id in
`reselect_selected_id` there is no need to pass the message id here.
2024-05-14 12:21:49 -07:00
Aman Agrawal a30029c8ad upload: Don't render upload button instead of hiding.
Doesn't make sense to hide the upload button button later when
we can just not show it if the browser doesn't has support for
it.
2024-05-14 12:21:49 -07:00
Aman Agrawal 7a831617af message_edit: Directly use currently_editing_messages for checks.
Makes it easier to search and verify changes related to
currently_editing_messages.
2024-05-14 12:21:49 -07:00
Sahil Batra 9d87131fa8 settings: Use new format to update can_mention_group setting.
This commit updates the webapp code to use new format to update
the can_mention_group setting.
2024-05-14 12:17:15 -07:00
Sahil Batra 8bca565218 groups: Pass old setting value for can_mention_group.
This commit adds support to pass object containing both old and new
values of the can_mention_group setting, as well as detailed API
documentation for this part of the API system.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
Co-authored-by: Greg PRice <greg@zulip.com>
2024-05-14 12:17:15 -07:00
Sahil Batra 0cc2244aac groups: Migrate group creation and edit endpoints to typed_endpoint. 2024-05-14 12:17:15 -07:00
Sahil Batra 43810f76ea openapi: Fix typo in zulip.yaml. 2024-05-14 12:17:15 -07:00
Anders Kaseorg 6479cc5970 unread_ops: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 12:15:44 -07:00
Anders Kaseorg 0cbc6cb82b unread_ops: Remove unused bulk_update_read_flags_for_narrow arguments.
Introduced by commit 664f29b4f1
(#28560).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 12:15:44 -07:00
Anders Kaseorg d7a9cb6c12 unread_ops: Simplify handle_mark_unread_from_here_error with callback.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 12:15:44 -07:00
Anders Kaseorg a54d178b8a unread_ops: Fix do_mark_unread_by_narrow arguments after rate limiting.
Introduced by commit f0d87fcf6e
(#23605); propagated by commit
0bef960b34 (#29521) and commit
42a6929f5c (#30047).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-14 12:15:44 -07:00
Shubham Padia 4ee37244bb recent_topics: Change background color in dark mode on hover on a row.
Fixes #30083.
We have used the dark theme color for the left sidebar row hover:
`--color-background-active-narrow-filter`. We are not using that variable
directly since we don't want a change in that color affecting the color in
recent conversations.
We've also used a single color on hover compared to 2 different colors
for unread and read row before. Light mode also uses a single color on
hover.
Relevant CZO conversation:
https://chat.zulip.org/#narrow/stream/101-design/topic/Hover.20color.20in.20Recent.20conversations.20dark.20mode.2E/near/1797727
2024-05-14 11:46:37 -07:00
Mateusz Mandera 160076fdfa import: Fix import of Stream.creator field.
When importing a Stream, UserProfiles don't yet exist. so trying to
import stream.creator fails with something like:

```
psycopg2.errors.ForeignKeyViolation: insert or update on table
"zerver_stream" violates foreign key constraint
"zerver_stream_creator_id_65aeba7e_fk_zerver_userprofile_id"
DETAIL:  Key (creator_id)=(5) is not present in table "zerver_userprofile".
```
2024-05-13 20:11:28 -07:00
Anders Kaseorg 2e8fdab896 user_pill: Avoid unnecessary array allocations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-13 18:12:54 -07:00
Anders Kaseorg c0c852046d user_group_pill: Avoid unnecessary array allocations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-13 18:12:54 -07:00
Anders Kaseorg b3fbfd9da8 stream_pill: Avoid unnecessary array allocations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-13 18:12:54 -07:00
Tim Abbott 4bf8c19b32 message_view_header: Fix misleading variable name.
It never contained only icon data.
2024-05-13 17:56:30 -07:00
nimishmedatwal 941c5daf36 navbar: Describe views in top navbar.
Adds description in views styled like stream descriptions also adds a
help center link to the appropriate page at the end of each
description.

Fixes #29769.
2024-05-13 17:56:30 -07:00
afeefuddin d36e19389d add_subscribers_pill: Convert module to TypeScript. 2024-05-13 16:57:02 -07:00
afeefuddin bf3eb2c269 user_pill: Fix type annotations.
Change the type annotation of current_items in create_item_from_email
to InputPillItem<CombinedPillItem>.
2024-05-13 16:57:02 -07:00
afeefuddin 0927e03677 user_group_pill: Fix type annotations.
Change type annotations of get_user_ids and create_item_from_group_name
to accept CombinedPillContainer and InputPillItem<CombinedPillItem>
respectively.
2024-05-13 16:57:02 -07:00
afeefuddin 0f622d3025 stream_pill: Fix type annotations.
Change type annotations of get_user_ids and create_item_from_stream_name
to accept CombinedPillContainer and InputPillItem<CombinedPillItem>
respectively.
2024-05-13 16:57:02 -07:00
afeefuddin 0b7c63a695 typeahead_helper: Add type CombinedPillItem. 2024-05-13 16:57:02 -07:00
Prakhar Pratyush 0cddc8a6a6 onboarding: Fix topic names not being translated correctly.
In 'send_initial_realm_messages', the topics names were not
being translated properly as they were computed outside the
with `override_language` block.

Now, we use 'send_initial_realm_messages' inside a with
'override_language' block in the caller. This fixes the bug.

Note: We are using 'override_language' block in the caller
and not within the function as it helps to avoid indenting
everything inside the function.
2024-05-13 16:06:10 -07:00
Prakhar Pratyush aad66674e7 onboarding: Fix the query for 'greetings_message'.
The query to fetch one of the greetings message based on
content wasn't taking translation into account that would
result in a bug in realms using non-english language.

This commit updates the query to fix the bug.
2024-05-13 16:06:10 -07:00
Alya Abbott a799441fab portico: Update title/job for quote author. 2024-05-13 16:03:23 -07:00
Aman Agrawal 80d19fe15d css: Fix theme switch changing color of elements at different intervals.
Due to these transitions the theme switch from dark <-> light was
not pleasant as the background color and color changed at different
intervals.
2024-05-13 13:21:10 -07:00
evykassirer d4d57193df message_store: Clarify display_reply_to type for stream/dm messages. 2024-05-13 12:51:00 -07:00
evykassirer 724306df10 recent_view_ui: Convert module to typescript. 2024-05-13 12:51:00 -07:00
Alya Abbott 5aeeafd39c portico: Improve message for deactivated, invalid and moved orgs. 2024-05-13 12:44:20 -07:00
N-Shar-ma 1121d317c2 compose: Restructure HTML for common compose textarea/preview parent.
Earlier, the compose textarea and the preview (container) occupied the
same grid area, 1 at a time. Now, they are both children of a common div
which is assigned the same grid area. This allows adding more elements
to the same grid area in the future.

This is purely a code change and should have no visible effects.

This is a prep commit for relocating the compose expand / collapse
buttons to the top right inside corner of the textarea / preview.
2024-05-13 12:11:29 -07:00
Temidayo32 91bd6e2b12 compose_closed_ui: Migrate module to TypeScript. 2024-05-12 17:41:22 -07:00
evykassirer 28c13f6d0e message_store: Modify get_pm_full_names to only take user ids.
This will let us properly call it from compose_closed_ui without
a full message object, which we need to convert it to typescript.
2024-05-12 17:41:22 -07:00
evykassirer 8fb1c0683e compose_closed_ui: Reduce usage of hacky message data structure. 2024-05-12 17:41:22 -07:00
Alya Abbott 8a51c42c07 onboarding: Modify content on onboarding messages.
- Tighten up the content.
- Use pretty quotes.
- Reorder "experiments" topic to appear after "start a conversation"
  in Inbox.
- Drop reference to messages being starred (not implemented yet).
2024-05-12 17:24:17 -07:00
Prakhar Pratyush 15a7870d2e onboarding: Use 'remove_single_newlines' once, while sending message.
Instead of applying 'remove_single_newlines()' to individual
contents when declared, we use it once while prepping up
message in 'internal_prep_stream_message_by_name'.

Just for the code to be less finnicky.
2024-05-12 17:24:17 -07:00
Anders Kaseorg 3d8802b276 buddy_list: Fix empty_list_widget_for_list.hbs usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-12 16:51:47 -07:00
Aman Agrawal d4ea7e251b narrow: Fix browser back not navigation to previous selected message.
Reproducer:
* Go to a stream narrow.
* Scroll up to select a previous message.
* Click on a different stream in the left sidebar.
* Click browser back button, you land at first unread message instead
  of your selected message.

Fixed by updating the hash before we render the new message list.
2024-05-10 16:03:45 -07:00
Aman Agrawal 4619a1e028 recent_view: Make load more fetch substantially more data.
We keep fetching until we reach first unread message or have
50k messages worth of data displayed once user hits `Load more`
in recent view.
2024-05-10 16:03:45 -07:00
Prakhar Pratyush 643998fcfa onboarding_steps: Rename 'hotspots' files to 'onboarding_steps'. 2024-05-10 12:30:22 -07:00
Prakhar Pratyush bf2360bcf2 onboarding_steps: Remove hotspot as an onboarding_step.
Earlier, hotspots and one-time notices were the valid
type of onboarding step.

Now, one-time notice is the only valid type.

Fixes #29296.
2024-05-10 12:30:22 -07:00
Prakhar Pratyush e8769f80a6 onboarding_steps: Rename 'copy_hotspots' function.
The function is used for any type of onboarding step
i.e. not limited to Hotspot.

This commit updates the function and variables name
to reflect the above mentioned behaviour.
2024-05-10 12:30:22 -07:00
Anders Kaseorg 18579755a8 apt-repos: Deprioritize libgroonga0 14.0.3-1.
It depends libarrow1600, which is missing from the PGroonga repository
on Debian 12.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-10 12:04:56 -07:00
Aman Agrawal 97e3015ec1 stars: Fix flaky test due to message list not yet rendered.
With combined feed no longer cached, this test became flaky as
it took longer for combined feed to load.

Verified that other tests waiting on `.message-list` don't need
this change.
2024-05-10 11:59:18 -07:00
Kenneth Rodrigues 42a6929f5c mark unread: Use correct value of include_anchor in case of errors.
When the request to mark a thread as unread fails, we should use the
value of include_anchor that was sent in the request, not false.

Modified handle_mark_unread_from_here_error to take an object instead of
parameters.
2024-05-10 10:53:50 -07:00
Vector73 9f8d738252 openapi: Document android_gcm_reg_id endpoints.
This commit adds API documentation for "/users/me/android_gcm_reg_id:post"
and "/users/me/android_gcm_reg_id:delete" endpoints.

Co-authored-by: Suyash Vardhan Mathur <suyash.mathur@research.iiit.ac.in>
2024-05-10 08:37:12 -07:00
Vector73 b047bf0d79 openapi: Document apns_device_token endpoints.
This commit adds API documentation for "/users/me/apns_device_token:post"
and "/users/me/apns_device_token:delete" endpoints.

openapi: Document android_gcm_reg_id endpoints.

Co-authored-by: Suyash Vardhan Mathur <suyash.mathur@research.iiit.ac.in>
2024-05-10 08:37:12 -07:00