Commit Graph

3637 Commits

Author SHA1 Message Date
Aman Agrawal f27488adc9 giphy: Upgrade giphy to implement TODO.
Upgraded to use the tabindex support provided by giphy itself.
2024-06-27 09:19:23 -07:00
Anders Kaseorg 3dccb72519 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 21:34:18 -07:00
Anders Kaseorg 7d4d4017b3 eslint: Fix unicorn/prefer-array-find.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 20:13:26 -07:00
Anders Kaseorg 4428609ece eslint: Fix unicorn/prefer-includes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 20:13:26 -07:00
N-Shar-ma 9bc1eb4bb9 compose: Allow 3-way compose box resizing with new fixed expanded state.
Apart from the normal (collapsed) and full screen sizes, a new expanded
state with the same size as the maximum a normal compose box can stretch
to when full (40% of the screen height) is now available. Now a user can
expand the compose box without it covering the full screen with a click.
The vertical resize icon in the bottom right corner of the compose box
is rendered useless so has been removed.

All three states can be cycled through by clicking the compose resize
button in the order: collapsed -> 40% of the screen -> full screen. When
a message naturally causes the compose box in its normal state to expand
up to 40% of the screen, clicking the resize button will take it to full
screen state.

Fixes: #29966.
2024-06-26 16:36:52 -07:00
N-Shar-ma b432b269ee refactor: Make compose size related variables & functions more specific.
We divide functionality into that for "full_size" and "expanded", which
are identical for now.

This is a prep commit for adding an intermediate expanded screen size.
2024-06-26 16:36:52 -07:00
Aman Agrawal 52ac602acb typeahead: Make them look like dropdown widget.
This attempts to change background color and text color of typeaheads
to be same as dropdown widgets we have in the app.
2024-06-26 16:26:31 -07:00
Sahil Batra f7a6d841c8 stream-settings: Fade label of disabled default stream checkbox. 2024-06-26 14:22:47 -07:00
Sahil Batra 28174aecca settings: Fade label for disabled checkbox. 2024-06-26 14:22:47 -07:00
afeefuddin 22a58c739c left_sidebar_navigation_area_popover: Convert module to TypeScript. 2024-06-26 14:08:39 -07:00
evykassirer 7ae0972c28 typeahead: Hide by default and show container on `show()`.
This avoids a bug (currently only for search) where the page
can be loaded with an empty but visible (half-loaded) search
typeahead.
2024-06-26 12:02:10 -07:00
Pratik Chanda 81abbab0d8 pm_list: Fix duplicate DM row in left sidebar.
When narrowing to a DM with their own user pill in recipient, a
duplicate DM row gets rendered.

This commit fixes this behaviour and doesn't render a separate row
when one's own email is included in recipient.

Fixes regression from zulip#29175.
2024-06-26 10:12:57 -07:00
Pratik Chanda d3fbfeae31 topic_list: Fix duplicate topic rows in left sidebar.
When narrowing to an existing topic name with different casing, left
sidebar renders duplicate topic rows for the existing topic name and
one with the different casing. Since topic names are case insensitive,
it should narrow to the existing row only.

Fixes regression from #29175.
2024-06-26 10:12:57 -07:00
N-Shar-ma dcf2c67f2d typeahead: Add non breaking space (\u00a0) to list of word separators. 2024-06-25 22:52:28 -07:00
Aman Agrawal c8379b4f9a message_fetch: Stop infinite fetch for first unread message id.
Found while migrating message_fetch to Typescript in #30509.
2024-06-25 22:51:43 -07:00
Alya Abbott b892f8a7a8 notifications: Test notification should say that it's a test. 2024-06-25 17:28:17 -07:00
Aman Agrawal 9e0a3bebfd recent_view: Fix right arrow not working on read DM rows.
Fixed by letting col_focus exceed max selectable rows in this case
and having it reset back to 0.
2024-06-25 14:12:19 -07:00
Aman Agrawal a83b882705 inbox_ui: Let browser handle tab key. 2024-06-25 14:12:19 -07:00
Aman Agrawal 2bf3191ddf recent_view: Let browser handle tab hotkey. 2024-06-25 14:12:19 -07:00
Aman Agrawal 1c3c794385 views: Set focus to topic visibility icon on click. 2024-06-25 14:12:19 -07:00
Aman Agrawal dd071c7303 topic_visibility: Remove deprecated topic visibility toggle classes.
These classes became slowly unused as switched to the new topic
visibility system over time.
2024-06-25 14:12:19 -07:00
Aman Agrawal b0978ba4d5 tippy: Fix sidebar toggle button tooltip not hidden on blur.
Tabbing through the navbar elements, `Hide user list` tooltip
stays visible even if focus is moved away from it.

We move tooltip to the element receiving focus and blur event
to fix it. See previous commit for more details.
2024-06-25 14:12:19 -07:00
Aman Agrawal 23927ea5b1 left_sidebar: Fix tooltips not hidden on blur.
The elements which received focus didn't have tooltips attached to
them, thus when blur was triggered on `a`, the tooltip didn't hide
as it was not listening on it for the blur event.

We move the toolip to `a` elements so that when focus and blur
are triggered tippy is able to capture them.
2024-06-25 14:12:19 -07:00
Lauryn Menard 79fc430b56 narrow: Expand informative text in empty starred messages view.
Fixes #29378.
2024-06-25 14:11:42 -07:00
Lauryn Menard 89a3c290db narrow: Expand informative text in empty mentioned messages view.
Limits the width of the empty message notice to 600px so that this
longer and more descriptive text is similar to the width of the
empty header text.
2024-06-25 14:11:42 -07:00
Aman Agrawal cd2812c131 message_notifications: Tag notification text for translation.
Fixes #21032
2024-06-25 14:11:06 -07:00
Aman Agrawal 07525a2f7d message_notifications: Split title into two parts.
We separate the prefix and suffix parts of title, so that they
can be translated independently later.
2024-06-25 14:11:06 -07:00
Aman Agrawal 98341d811e message_notifications: Remove unused `test-notification` case. 2024-06-25 14:11:06 -07:00
Sahil Batra d7d83618a4 settings: Refactor code to update realm group based settings.
This commit refactors code such that we do not add separate
if condition block for each realm group based settings using
the new API format to send the request accordingly. We now
use a single if-block to update the request data for realm
group permission settings using new API format.
2024-06-25 09:26:38 -07:00
Kislay Verma 84cd835a8c composebox_typeahead: Avoid generating broken stream-topic links.
The #**stream>topic** syntax generates broken links for
topics containing two backticks or ending with *, because of
architectural flaws in the backend markdown processor.
So we avoid generating the syntax for such topics and instead
generate the normal link syntax in markdown.

Fixes #19873
2024-06-24 18:14:33 -07:00
Anders Kaseorg b75e016a2c realm_user_settings_defaults: Restore missing members.
Commit 02e236f58a (#30519) caused Zod to
remove them.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:23:52 -07:00
Anders Kaseorg 7f49a4f0bd user_settings: Restore missing members.
Commit ed1c169bfb (#30519) caused Zod to
remove them.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:23:52 -07:00
Anders Kaseorg f35e1fdef6 blueslip: Show popups for unhandled promise rejections in development.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:05:28 -07:00
Anders Kaseorg 148af2a301 blueslip: Show popups for thrown non-Error values in development.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:05:28 -07:00
Anders Kaseorg 18137709a1 typeahead_helper: Straighten CombinedPill types.
The generic argument of InputPillContainer should not be
InputPillItem<…>, as InputPillContainer already uses InputPillItem
where applicable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 12:35:51 -07:00
Karl Stolley e235240685 info_density: Recalculate timestamp widths on density dispatch events. 2024-06-24 12:30:38 -07:00
Karl Stolley 3f6760f41a info_density: Correctly set em context for timestamp calculations. 2024-06-24 12:30:38 -07:00
Karl Stolley 7dc20a56f2 info_density: Move timestamp calculations to better location. 2024-06-24 12:30:38 -07:00
Shubham Padia 991fec5b23 hotkey: Don't close compose box on topic list input ESC.
Fixes https://chat.zulip.org/#narrow/stream/9-issues/topic/Pressing.20escape.20in.20topic.20filter.20closes.20compose.20box/near/1833316
Topic list escape key action should take preference over
open composebox.
2024-06-24 10:37:24 -07:00
Aman Agrawal 6999d84ddc message_view: Select `near` message without rerender.
If the new narrow has the same terms except `near` message id,
then we select the message if it is already rendered in the
current message list.

Tested by sending link to two different messages in a narrow and
clicking to ensure we don't have any loading indicators active.

Tested we are scrolling to target message too if it was not in the
visible viewport but is rendered above.
2024-06-24 08:41:14 -07:00
Anders Kaseorg 95a2ce6ed6 ui_init: Restore guard against direct use of page_params.state_data.
Before commit fd253539e0 (#30519), each
part of state_data was removed by pop_fields, to ensure that it was
only used by its associated module and not manipulated directly.
Restore this guarantee by removing page_params.state_data itself.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-23 07:42:28 -07:00
Anders Kaseorg 3a7f5da717 page_params: Add a separate error message for missing #page-params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 21:50:51 -07:00
sanchi-t 2d79ce2e93 invite: Replace stream checkboxes list with stream pills.
Introduce an input field with typeahead functionality, initially
populated with the default streams for the organization.

Fixes #26871.
2024-06-22 20:04:28 -07:00
sanchi-t 445ff79e10 stream_pill: Update `format_stream_name_and_subscriber_count`.
Use `$t` to ensure the function returns a translatable string.
2024-06-22 20:04:28 -07:00
sanchi-t 7580130873 stream_pill: Rename `stream_display_pill`. 2024-06-22 20:04:28 -07:00
Anders Kaseorg 0b3cf78333 blueslip: Untangle from page_params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 19:18:10 -07:00
Anders Kaseorg f7eecb0e03 sentry: Untangle from page_params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 18:53:56 -07:00
Anders Kaseorg 3db05666ac state_data: Accept null for ProfileDatum["rendered_value"].
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 11:21:54 -07:00
Anders Kaseorg ca5fba258e giphy: Split is_giphy_enabled to a separate module.
This removes giphy from the critical path of the TypeScript migration.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 08:21:08 -07:00
Aman Agrawal 4d84ed305e stream_color: Fix stream icon color not changing on theme change.
Changing theme didn't change the color of the stream icons.
2024-06-22 08:20:23 -07:00
N-Shar-ma 878d02cf5c compose: Redesign control buttons row and textbox to look like 1 unit.
The row of buttons is placed using CSS grid template areas so that
visually it is now inside the bottom edge of the textbox. The color of
the buttons row and individual buttons is changed to match the color of
the textbox. All textbox border / box shadow properties are now applied
to its parent instead which is extended under the buttons' row, so that
its border snuggly fits around the buttons row too.

Notable side effects:
- In dark mode the textbox in focused state now has a light border which
does not match the recipient input's current border which doesn't change
when focused. Likely, the recipient input should be updated to match the
textbox's border color.
- The dividers in the formatting buttons row are not vertically centered
now. This should be figured out soon.

Fixes: #28702.
2024-06-21 17:29:56 -07:00
tnmkr 6b255fcc14 custom_profile_fields: Rename is_editable variable for clarity.
The variable is renamed to is_target_element_editable. This makes it
explicit that this variable is referring to HTML structure and not a
property of the field.

This is a prep commit for #22883 which allows admins to restrict users
from modifying field values.
2024-06-21 16:32:18 -07:00
Anders Kaseorg 4ddc8f406d onboarding_steps: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 72902d70f3 presence: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 438509a8f1 presence: Fix presence_last_update_id type.
It’s undefined for spectators.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 1a73101371 bot_data: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg bf8fc8429b unread: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 9c2ab2842f unread: Ignore deprecated sender_id synonym.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg ca99016f04 user_status: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 4b4ef75729 muted_users: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 8ce77cabae user_topics: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 6bff8161ea user_topics: Remove stream__name from user_topic_schema.
This field is internal to the backend and never escapes to the
frontend.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 97907b0a9c pm_conversations: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg e28240a9ac stream_data: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 9b511f5caa sub_store: Fix ApiStreamSubscription["email_address"] type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 370a6c350e local_message: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 788552b916 alert_words: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 1ee5c46a20 user_groups: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 41ec6c9b7c user_groups: Fix UserGroupRaw["direct_subgroup_ids"] type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg d5cc7d7b79 emoji: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 39d4ddaa96 stream_edit_subscribers: Rename misleading variable.
.safeParse does not return a “schema”.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 14:44:52 -07:00
Anders Kaseorg 15d4866856 stream_edit_subscribers: Fix incorrect error result test.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 14:44:52 -07:00
Varun Singh 05a480f1d1 zcommand: 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 87a9877a93 attachments_ui: 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 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
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
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
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
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
Kislay Verma d38d82edc3 dropdown_widget: Fix bug in `disable_for_spectators`
If `disable_for_spectators` is true, the widget text is greyed out
but the tippy instance is still delegated, causing it to appear
on click/enter.

This commit fixes that by not delegating tippy if the
`disable_for_spectators` is true.

This bug was surfaced when it was found that the
topic type filter in Recent conversations has disabled
styling for spectators, but a spectator could still click on it to
open the dropdown.

Fixes #30461
2024-06-20 12:09:04 -07:00
Shubham Padia 43eebbf9c6 scroll: Set tabIndex to -1 for simplebar content wrapper.
Fixes #30403.
Having tabIndex set to 0 led to keyboard focus being put on
a scrollbar container, which led to users having to tab twice
to skip a container.
This commit also removes instances of tabIndex being set to
-1 programatically for certain cases, since it is -1 by default now.
This commit also removes `outline: none` for simplebar since
that property is not needed anymore because the wrapper is
not focusable anymore.
2024-06-20 10:25:51 -07:00
Shubham Padia b771c5f5b0 pm_list_data: Rename private_message(s) to conversation(s).
Since it's an array of PMConversation objects, not of messages, the
old name was confusing.
2024-06-20 09:58:39 -07:00
Shubham Padia cad5843da6 left_sidebar: Rename show_all_private_messages to use `direct`.
Rename `show_all_private_messages` to `show-all-direct-messages`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:58:32 -07:00
Shubham Padia 0e8a6a0196 left_sidebar: Rename toggle_private_messages_section_icon to use direct.
Rename `toggle_private_messages_section_icon` to
`toggle-direct-messages-section-icon`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Shubham Padia 5a3fc26d74 left_sidebar: Rename private_messages_section_header to use `direct`.
Rename `private_messages_section_header` to
`direct-messages-section-header`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Shubham Padia b197659d8a left_sidebar: Rename private_messages_section to use `direct`.
Rename `private_messages_section` to `direct-messages-section`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Shubham Padia 7dc47e8484 left_sidebar: Rename private_messages_sticky_header to use `direct`.
Rename `private_messages_sticky_header` to
`direct-messages-sticky-header`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Aman Agrawal 12e2b6637e list_widget: Fix more elements not rendered on scrolling to bottom.
This bug can be reproduced by scrolling anywhere where list widget
is used except recent view.

`$scroll_container` was used before
371cd0da6c
to listen to scroll events which was incorrectly replaced by
`opts.$simplebar_container` in the above commit. To fix this,
we use the same function `scroll_util.get_scroll_element` to
get the correct scroll element.
2024-06-20 09:33:22 -07:00
evykassirer ee2852ede1 search suggestion: Consistently show user pills in typeahead.
Fixes #23365.
2024-06-19 18:41:51 -07:00
evykassirer 0899b621d3 search_suggestion: Show pills for all users in a group suggestion.
This fixes half of #23665. It shows all user pills when making
a group suggestions as the active new suggestion, but still
doesn't show user pills for the first parts of suggestion lines.
2024-06-19 18:41:51 -07:00
Shubham Padia b0eab81459 left_sidebar: Rename active_private_messages_section to use `direct`.
Rename `active_private_messages_section` to
`active-direct-messages-section`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-19 18:10:15 -07:00
Aman Agrawal 024d940724 message_list_view: Combine sticky header DOM updates.
This significantly reduces the time taken to update the
sticky header on scrolling.
2024-06-19 17:55:49 -07:00
Aman Agrawal 9d3f8bff55 inbox_ui: Don't process scroll events if Inbox is not visible.
The `get_all_rows` call should be scoped inside `#inbox-main` otherwise
it used to query all the elements in the DOM which is quite expensive.

Also, we don't need to handle scroll events in Inbox view if it
is not visible.
2024-06-19 17:55:49 -07:00
Sayam Samal eb93738873 pm_section: Fix ghost tooltip on collapse/expand DM toggle.
As reported in a bug report, the tooltip on the DM collapse/expand
toggle was reappearing after switching in and out of the browser window.

This commit destroys the current instance of the tooltip when it is
hidden. This clean up ensures that the tooltip does not appear again
unless the triggered explicitly by the user.
2024-06-19 17:46:59 -07:00
N-Shar-ma 906a9ca8f2 compose: Rework alignment of upper elements, and redesign close icon.
We now right align recipient input (even at very narrow widths) and
banners to the textbox, and move the close button to the absolute top
right corner of the compose box, updating the icon to be slimmer, bigger
and purplish, and adding a background highlight on hover.

This involved refactoring the send control area width into a responsive
css variable, and simplifying the html structure of the compose box.

Fixes: #28792.
2024-06-18 15:51:51 -07:00
roanster007 7ebbdd942d typing: Move the typing notifications to below the mark as read banner.
Previously, the typing notifications used to appear between the
message list and the mark as read banner in a thread. This would
cause the banner to shift down whenever someone starts typing,
and shift back up if everyone stops typing.

This frequent bouncing of the banner could be distracting, and hence,
is fixed by moving the typing notifications to below the mark as
read banner.
2024-06-18 14:30:19 -07:00
roanster007 1d3da31b8b unread_ui: Refactor method to update unread banner.
This commit refactors the "update_unread_banner", so that
the "mark_read_on_scroll_state_banner" innerHtml is
set using a separate method by passing the necessary
template.

This is a preparatory commit.
2024-06-18 14:30:19 -07:00
sujal shah 8d29e1829f uesr_group_settings: Update panel titles.
Change the titles of both panel in usergroup section.

Fixes part of #29403.
2024-06-18 14:20:17 -07:00
opmkumar 30f65e5e2d left sidebar: Make Views label visible for spectators.
We don't include the toggle functionality, to avoid needing to design
what a collapsed Views thing would look like.

Fixes #30324.
2024-06-18 10:50:09 -07:00
Karl Stolley c80ffe8e0f server_dispatch: Calculate typography vars on dense_mode.
Owing to logic added in #30050, which accounts for the legacy line-
height value, toggling dense mode requires recalculating the
typography vars--otherwise, a non-legacy line-height value will
not be picked up until a refresh.
2024-06-18 10:08:54 -07:00
Shubham Padia 2a7cbc96ec settings: Rephrase comment in settings_components.ts. 2024-06-18 09:41:56 -07:00
Aman Agrawal 00c56a65ed navbar: Rename realm-logo to realm-navbar-wide-logo. 2024-06-18 09:38:51 -07:00
Aman Agrawal 7ddf7a96dc navbar: Show realm icon logo instead of full logo on narrow widths.
When left sidebar is hidden between 1200px and 768px, we show
smaller realm icon logo instead of the full realm logo. Also,
we use the new space to expand the middle column to better show
the narrow description.
2024-06-18 09:38:51 -07:00
Sayam Samal 72dd63a184 left_sidebar: Move popover `theme` prop to `left_sidebar_tippy_options`.
As a follow-up to the previous commits redesigning the left sidebar
popovers using the new `popover-menu` theme, this moves the `theme`
prop from all the individual left sidebar popovers to the shared
`left_sidebar_tippy_options` object.
2024-06-17 18:32:57 -07:00
Sayam Samal a529abc16e left_sidebar: Redesign stream settings popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal f81f26116f left_sidebar: Redesign condensed view popover.
This commit also sets all popover labels to flex grow into the remaining
available space. This allows us to align the unread counters, if any
to the rightmost corner of the menu option. This change, however, does
not lead to visual changes in any popover.

Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal c4defc80aa left_sidebar: Redesign drafts view popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal 40e548ef5b left_sidebar: Redesign starred messages popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal 6db809db70 left_sidebar: Redesign recent conversations view popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal b0ae9fedbf left_sidebar: Redesign combined feed view popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal 7482f9b0fe left_sidebar: Redesign inbox view popover.
Fixes part of #28699.
2024-06-17 18:32:57 -07:00
nimish 81ea09be19 search: Add is:followed filter.
Create the is:followed search operator.
Fetch all messages that are from followed topics
using exists.
Update API documentation and changelog.

Co-authored-by: Kenneth Rodrigues <kenneth.nrk123@gmail.com>

Fixes #27309.
2024-06-17 18:22:50 -07:00
evykassirer 5c9f62443a search_suggestion: Refactor Attacher to keep a list of suggestion terms.
Previously we generated the search_string and display_html as we
generated suggestions. This commit changes the way Attacher works
to generate these strings once we want the final result. This gives
more flexibility, and will let us replace the last item of `result`,
which will be required for implementing search pills.
2024-06-17 18:01:11 -07:00
evykassirer 20e4778163 search: Don't use e.target for the query click handler.
This is preparation for search pills.

The X button for user pills will be a click target
that disappears from the DOM. We don't want to
look for the parent of a click element that might
not exist, since that would give us a false positive
and lead us to reset the search bar when removing a
user pill. This commit brings this click handler to
a more stable state.
2024-06-17 18:01:11 -07:00
Shubham Padia 8254ef428b settings_users: Add keyboard nav to org user settings toggler.
This commit also adds an extra $elem argument to
`settings_panel_menu.set_key_handlers` which defaults to $mail.elem.
This argument helps us specify a specific element to attach the key handlers
to, instead of the entire settings panel.
2024-06-17 17:16:21 -07:00
Shubham Padia aeaf808c57 settings_users: Add live-update on deactivation & reactivation.
We will redraw the list on every deactivation or reactivation.
While that might seem expensive to redraw on each user, the other
option we have is to have some logic run each time the tab is selected
and redraw if the user list has changed.
Since deactivation and reactivation is not something that an admin
would do multiple times a day, redrawing on each user should be fine
for now.
We will continue displaying the reactivated/deactivated users in a
greyed out column after the live-update, since it is weird for a user
to disappear suddenly from the list.
2024-06-17 17:16:21 -07:00
Shubham Padia 8ab6e71593 settings: Unite user settings into a single panel.
Previously, there were three different sections for managing active
users, deactivated users and invitations.
This commit combines users section has into a single tabbed panel.

Fixes: #26949.

Co-authored-by: shashank-23002 <21bec103@iiitdmj.ac.in>
2024-06-17 17:16:21 -07:00
Shubham Padia e4c89771fd settings: Rename `user-list-admin` to `users`.
Renaming the url for better readability on the user's side.
We've also added a redirect for this, which will change the `section`
from `user-list-admin` to `users` whenever required.
See https://github.com/zulip/zulip/pull/30268#discussion_r1631539656
2024-06-17 17:16:21 -07:00
Shubham Padia 1204d86818 settings_toggle: Rename `highlight_toggle` to `goto`.
The name sounded like it was doing some highlighting of the given
tab, instead of the actual navigation that the function does.

See https://github.com/zulip/zulip/pull/30268#discussion_r1631531684
2024-06-17 17:16:21 -07:00
Shubham Padia dd4fc4285a toggle: Add register_event_handlers to toggle prototype.
This is a preparatory commit to combine user settings panels into
one. We need to re-register event handlers since they get destroyed
when the settings modal is closed. After re-opening the modal,
clicking the tabs would not do anything unless we re-register our
event handlers.
2024-06-17 17:16:21 -07:00
Shubham Padia 78630b6395 settings: Store current tab value in current_tab.
When the organization settings are launched, there
is a duplicate function call to the 'activate_section_or_default'
function to render the correct section.

This commit adds a field to store the section name,
which is then used to render the correct section.

Co-authored-by: shashank-23002 <21bec103@iiitdmj.ac.in>
2024-06-17 17:16:21 -07:00
Joy Chen 8a1a41e1ac
search: Remove is:dm suggestion from get_operator_suggestions.
Previously, is: searches as a spectator would suggest "Direct messages", even though 
DMs aren't accessible for spectators. Fix this by moving the is:dm suggestion
logic to `get_is_filter_suggestions`, which is not used for spectators.

Fixes #30320.
2024-06-17 16:30:40 -07:00
sujal shah 967f99779a user_group: Move "Choose members" into a separate second panel.
Break the current user group creation panel into two panel
"Create user group: configure settings" and
"Create user group: add members".
2024-06-17 16:20:06 -07:00
sujal shah 8e6d07615c user_group: Extract `show_user_group_settings_pane`.
Extract `show_user_group_settings_pane` with related functions and
variable.
2024-06-17 16:20:06 -07:00
sujal 279e9d1dc3 stream_settings: Move "Choose subscribers" into a separate second panel.
Changed the title of the first panel to
"Create channel: configure settings" and title of second panel to
"Create channel: add subscribers".

Implement logic in stream_create.js to show and hide both the panels.

Add two buttons to facilitate switching between the tabs or panels.

Added new descriptions to 'stream type descriptions'.
2024-06-17 16:20:06 -07:00
sujal shah 872d85daf6 stream_settings: Update stream type descriptions.
Update the descriptions of Web-public, Public, Private, shared history
and Private, protected history.
2024-06-17 16:20:06 -07:00
sujal 4dd8b258cd stream_settings: Restructure stream creation panel.
Removed the "Stream permissions" heading to simplify the panel.

Moved the "Announce new stream in {stream}" option just above
"Default stream for new users".

Implement a collapsible "Advanced configurations" section,
collapsed by default, to accommodate less commonly changed settings.
This allows for future expansion of stream permission configurations.

Fixes part of #29403.
2024-06-17 16:20:06 -07:00
Aman Agrawal 06d43cad3b navigate: Take user to top / end of feed on home / end keypress.
Fixes #14971

Instead of taking user to top / end of fetched history, we take
user to the first / last message of the narrow.

We simply check our cached history if we have the data for the
jump, if not, we ask server for the data.

Tested by simply pressing `fn + left / right arrow` on mac in
combined feed and topic narrows. Also, reduced message_fetch
constant values to be all single digital to check if the -
data not in cache -> fetch data -> select message logic works well.
2024-06-17 16:08:51 -07:00
Aman Agrawal e3cd3756bc navigate: Convert back to JS.
Need to import message_view which is not migrated to TS yet.
2024-06-17 16:08:51 -07:00
Lauryn Menard 1350157fdf profile-fields: Check for date fields before initializing flatpickr. 2024-06-17 13:44:13 -07:00
Aman Agrawal 885957c529 resize_handler: Fix scroll jumps on iOS.
The URL bar in iOS shrinks / expands on scrolling causing change
in height. This triggers our resize handler and forces user to
jump to the selected message. This jump triggers before our
keep pointer in view logic kicks in which means user scrolls back
to the previous selected message instead of scrolling forward.

To fix this, we only do this jump when width changes on mobile
devices.

Note that modern devices support resizeable windows of all forms but
for most use cases where app is full expanded, this seems like the
right fix.
2024-06-17 09:28:09 -07:00
Kislay Verma 2feee9d756 right_sidebar: Remove realm description for spectators.
This commit removes the realm rendered description from
the right sidebar for spectators.

Fixes #30322
2024-06-16 11:56:11 -07:00
roanster007 ab6ae1099b refactor: Rename huddle to direct message group in web codebase.
This commit renames "huddle" to "direct_message_group" in the
web codebase. It also renames the file - "huddle_data.ts" to
"direct_message_group_data.ts"

Fixes part of #28640
2024-06-14 18:07:07 -07:00
roanster007 9f2eb329ef rename: Rename "huddle_data.ts" to "direct_message_group_data.ts".
This commit renames the file "huddle_data.ts" to
"direct_message_group_data.ts" in the web codespace.

This is a part of the migration of huddle to direct_message_group
of #28640.
2024-06-14 18:07:07 -07:00
Sahil Batra a70eb21ea1 settings: Use page_params.is_spectator field for spectator checks.
Instead of current_user.user_id we use page_params.is_spectator
field to check the spectator cases as it makes it more clear
to the reader about what is the condition checking.
2024-06-14 17:11:23 -07:00
Sahil Batra 3faaa5ecc8 settings: Use map to store setting dropdown widgets.
Instead of using different variables to store dropdown setting
widgets, we now store them in a map with setting name as key
and avoid duplicate switch cases in functions to get and set
the widget value.
2024-06-14 17:11:23 -07:00
Anders Kaseorg 9b7f17eb72 state_data: Move comments back to the correct declarations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-14 16:19:02 -07:00
N-Shar-ma af76d80856 compose: Fix bug where compose box was sometimes not scrollable.
Earlier, autosize wasn't updated for the compose box after resetting its
`max-height`, so in cases where the older `max-height` was more than the
height, and the current max-height was less than the height, the compose
box would not be scrollable.

We now always update the autosize after resetting the max-height.
2024-06-14 10:15:47 -07:00
Aman Agrawal a361f2939a stream_edit: Fix user popover permanently displayed in stream settings.
If a user popover is open in stream settings, and user presses
`down/up` arrow to view settings for a different stream, the user
popover stay open.

Why we need to explicitly hide it?
We have click handlers to hide the popover and `data-reference-hidden`
to hide the popover if the reference goes offscreen via scrolling.

In this case, those events don't fire, there is no reason for tippy
to check if reference is visible and thus show / hide the popover.
2024-06-13 06:57:23 -07:00
Kislay Verma 03f81eef07 navbar: Tweak Combined feed description for spectators.
Since spectators cannot mute channels or topics, the combined
feed description for spectators is tweaked to exclude that part.

Fixes #30321
2024-06-13 06:50:07 -07:00
Aman Agrawal 5aec31cf99 billing: Remove success message from URL after being displayed.
We directly override the browser history to remove the parameter from
URL to avoid it being displayed if user comes back in history too.
2024-06-11 15:26:57 -07:00
Anders Kaseorg 3b22065477 web: Add missing CSS escaping for url(…).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-11 15:22:33 -07:00
N-Shar-ma ac3b5b3b04 compose: Redesign and relocate compose expand / collapse button.
The compose expand / collapse button is moved from the top right of the
compose area to the top right corner inside the compose textarea /
preview.

The textarea / preview and the button area shares the same grid parent.
25px extra padding is added to and margin is subtracted from the right
of the element so the button is visually inside it. It appears only on
hovering the compose area, and uses a new custom icon.

Fixes: #28791.
2024-06-11 14:13:10 -07:00
Tim Abbott 5d88ff6676 user_profile: Fix live-update exception when viewing channels tab.
Sentry reporting discovered that if the user was viewing the channels
tab for a bot when the bot's owner was changed (or various other
live-updates), we'd throw an exception trying to access the
original_values object for the manage-user/bot tab.

This code is fragile and messy, but probably a framework change is the
most expedient path to fixing it.
2024-06-11 13:41:46 -07:00
evykassirer fea4b2f65d buddy list: Remove buggy check preventing updates to me.
This check doesn't work with the `me` user, because that
user is always at the top of the all users list, and
therefore `new_pos_in_all_users` will always be 0 and
never `render_count`. It's possible this was already
broken before the split buddy list change.

We can remove this check because `insert_new_html` is only
called when we definitely want to insert html. It's only
called from `insert_or_move`, and for moves we always
remove the user we're moving/replacing before the insert.
2024-06-11 12:58:18 -07:00
Aman Agrawal 04f4b75d62 sidebar_ui: Save current toggle status in localstorage. 2024-06-11 12:42:42 -07:00
Aman Agrawal 043e0311d2 css: Expand to occupy left sidebar space if available on narrow widths. 2024-06-11 12:42:42 -07:00
Aman Agrawal 96dac9ece9 navbar: Add button to toggle left sidebar. 2024-06-11 12:42:42 -07:00
Aman Agrawal c531631ecf navbar: Rename left sidebar toggle button unread count indicator.
Renamed to match the name with the wrapper element and used class
so that we can apply same CSS to other buttons.
2024-06-11 12:42:42 -07:00
Aman Agrawal 9fec1f69ed navbar: Rename left sidebar toggle button.
This name better describes what the button does and using a class
helps us use it's CSS and events for other buttons.
2024-06-11 12:42:42 -07:00
Karl Stolley 1270e4b74b info_density: Calculate values for inline-box vertical alignment.
Co-Authored-By: Greg Price <greg@zulip.com>
2024-06-11 12:25:16 -07:00
Sahil Batra 901b216e7a settings: Refactor code to handle dropdown widgets.
We now add a new function to set up the dropdown widget for
settings using new dropdown_widget.DropdownWidget instead of
calling dropdown_widget.DropdownWidget multiple times to
reduce code duplication.
2024-06-11 12:22:10 -07:00
Sahil Batra 47b678a4ab settings_components: Use single function to set dropdown widget variables.
Instead of having different functions to set values of dropdown widget
variables, we now use a single function to set their values by passing
the setting name to the function.
2024-06-11 12:22:10 -07:00
Varun Singh fee7fb6c87 user_group_create_members: Convert module to TypeScript. 2024-06-11 11:58:12 -07:00
Varun Singh 78f105475a stream_create_subscribers: Convert module to TypeScript. 2024-06-11 11:57:46 -07:00
Sayam Samal a7772f86a2 docs: Update CZO links from stream to channel in docs and comments.
Updates all the https://chat.zulip.org/#narrow/stream/ links in the
docs and comments to use the new /channel/ path. All these links are
for documentation/reference purposes only and thus, can be bulk-updated.

This commit is a part of the effort to rename stream to channel.
2024-06-11 10:44:31 -07:00
Aman Agrawal f26b000621 resize: Remove height of hidden elements from buddy list height.
If the elements are hidden, their margin is still included in
calculating the height of buddy list which we don't want.
2024-06-11 10:40:48 -07:00
Sayam Samal 70fb213868 visibility_policy_popover: Use the new "popover-menu" popover theme.
As part of the popover menu redesign, this updates the topic visibility
popover to use the new "popover-menu" popover theme and improves
accessibility by using appropriate ARIA attributes.

This also moves the `:focus-visible` CSS rule to apply to any tab
picker in a popover, removing the need to explicitly add it to each
tab picker.

Fixes part of #28699.
2024-06-10 16:54:11 -07:00
Prakhar Pratyush 0c13422c0d compose_banner: Don't show banner if message sent in a near view.
Earlier, when a user was in /near/ topic or dm view, on sending
message in the same conversation we were incorrectly displaying
the 'jump to sent message' banner.

This commit fixes the incorrect behavior.

Fixes #30341.
2024-06-10 14:23:17 -07:00
Prakhar Pratyush bb4d62ffa6 scheduled_message_feed_ui: Show the scheduled indicator in near view.
Earlier, when a user was in /near/ topic or dm view, the scheduled
message indicator was missing in the conversation.

This commit fixes the incorrect behavior.
2024-06-10 14:23:17 -07:00
Sahil Batra f98a3fc684 settings: Use new group setting to check permission for creating public channels. 2024-06-10 12:24:45 -07:00
Kenneth Rodrigues f53a7cdffa reaction-view: Create has reaction operator.
Create has:reaction search operator and search suggestions.
Create sidebar view for the user to view their messages that
have reactions using has:reaction sender:me operators.
Add custom heading for the view and tooltip in the sidebar.
Add documentation for the new operator.

Fixes: #27328.
2024-06-10 11:46:37 -07:00
Anders Kaseorg fa91a4493c web: Qualify global uses of location and history.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 16:10:39 -07:00
Mateusz Mandera 45118180bb presence: Don't send slim_presence in the webapp when querying presence.
Sending last_update_id implies using slim_presence=true, so sending the
extra param is redundant now.
2024-06-07 13:57:40 -07:00
Mateusz Mandera 3ded4c2a7d presence: Frontend implementation of the last_update_id API.
Note: This involves adding presence info of unknown users to the
presence data.
With some small tweaks, we can just add the info to the presence data
structures, just making sure the buddy list correctly skips those
entries and that we redraw the user in the case where the user creation
event arrives after the presence polling loop.
2024-06-07 13:57:40 -07:00
Anders Kaseorg 407655b84f portico header: Remove unnecessary type assertion.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 12:12:39 -07:00
Anders Kaseorg 6fd27ce892 list_widget: Reduce TypeScript wreckage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 11:54:37 -07:00
evykassirer 346dc7d79d compose: Auto-close unchanged auto-opened drafts on narrow change.
Fixes #30104.
2024-06-07 10:38:20 -07:00
evykassirer 4cbcd66753 compose_recipient: Set flag that recipient was changed when stream is selected.
This was missed when moving to a stream dropdown instead of input field.
2024-06-07 10:38:20 -07:00
Aman Agrawal 371cd0da6c recent_view: Use html as scroll container.
Fixes #17933, #27517

Instead of `recent_view_table`, we make `html` as our scroll container.
This fixes an important bug for us where filters sometimes disappear
due to them scrolling under navbar which is unexpected. Since we are
now using separate containers to display rows and
filter (while includes table headers), where filters use sticky
positioning, this bug will be fixed.
2024-06-07 10:17:10 -07:00
Aman Agrawal 4750f84ba8 recent_view_ui: Fix first row being focused after scrolling to bottom.
If recent view load more banner is at the center as a result of
`document.elementFromPoint(topic_center_x, topic_center_y)`,
there is no `tr` to focus, resulting in first row to be focused
as the closest element as per previous logic.

To fix it, we just focus the last row which is just above the
load more banner and is visible.
2024-06-07 10:09:30 -07:00
Aman Agrawal 3cc7613841 css: Remove no longer used `required-text` class.
Since we moved to use standard empty view handlebars everywhere,
this became stale.
2024-06-07 10:09:30 -07:00
Anders Kaseorg c9e822f7ad custom_profile_fields_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 09:49:40 -07:00
Anders Kaseorg e6bfaed782 pill_typeahead: Separate user-only typeahead to specialized function.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 09:49:40 -07:00
Kislay Verma a83dc572df overlay: Blur focused element while overlay is open.
We blur the focused element when an overlay opens, and refocus
it when the overlay is closed, to prevent side effects.

What motivated this change was that opening a lightbox overlay
from preview content while editing a message caused the escape
key to close the message edit form instead of closing the overlay.
2024-06-06 17:13:11 -07:00
N-Shar-ma 0b728e1b34 copy_and_paste: Let uppy handle pasted single images.
This fixes the bug where an image copied from sites like Twitter / X did
not paste as expected.
2024-06-06 17:03:44 -07:00
Anders Kaseorg aaf90a1da0 typeahead: Nest User inside UserPillData, UserOrMention.
Commit 33484e7ac3 (#29200) added a cache
for remove_diacritics, but this caching was rendered ineffective by
commit 45e9c046d8 (#29650) because it
relied on mutating a direct reference to the User object.  Fix the
cache by rearranging the types to preserve that direct reference.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-06 15:24:54 -07:00
Aman Agrawal 2340855851 typeahead: Remove delay when opening / closing typeahead.
This default delay comes off as the typeahead being laggy to the user.
2024-06-06 12:10:16 -07:00
Varun Singh 4ac12022ca navigate: Convert module to TypeScript. 2024-06-06 11:10:05 -07:00
Anders Kaseorg 72b6c97042 i18n: Allow get_language_name to return undefined again.
This can happen when the user’s configured language is less than 5%
translated.  Fixes an assertion failure introduced by commit
6a429603ad (#30261).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-05 12:25:15 -07:00
Aman Agrawal f58c586bee narrow: Rename to `message_view`.
This brings it in sync with other libraries like `message_list`
and `message_list_data`.
2024-06-05 12:03:59 -07:00
Aman Agrawal 48cdfd25f7 narrow: Rename `by_topic` to `narrow_by_topic`. 2024-06-05 12:03:59 -07:00
Aman Agrawal fecb9afa94 narrow: Rename `activate` to `show`.
This make the main call which displays message list sound similar
to `recent_view.show` and `inbox_ui.show`.
2024-06-05 12:03:59 -07:00
Aman Agrawal 69cd263312 narrow: Rename by_recipient to narrow_by_recipient.
This would make the call `message_view.narrow_by_recipient` sound
better than `message_view.by_recipient`.
2024-06-05 12:03:59 -07:00
Aman Agrawal 9374195418 narrow: Migrate uses of `by` function to `activate` function.
This is part of renaming effort of `narrow` to `message_view`.
2024-06-05 12:03:59 -07:00
Prakhar Pratyush 22f3aebb33 compose: Show a one-time banner for jump to sent message conversation.
We immediately navigate the user to the conversation they just
sent a message to if they are not already in the appropriate
conversation view.

This commit adds a first-time banner to explain the same.

Fixes #29575.
2024-06-05 09:31:17 -07:00
Prakhar Pratyush e4cbca698d compose: Jump to conversation where message was sent.
Removes two 'narrow_to_recipient' banners which were
shown after sending a message to a different conversation.

Now, the sender is narrowed to the conversation where
message was sent.

Fixes #29186.
2024-06-05 09:30:34 -07:00
N-Shar-ma e959a392c9 compose: Make conversation arrow double as a go-to-conversation button.
The chevron arrow icon before the topic / dm user field now also acts as
a go to conversation button. Whenever the functionality is available,
the plain icon changes to look and behave like a button. The old go to
conversation button on the right of the field is removed.

Fixes: #28697.
2024-06-05 09:26:01 -07:00
Sayam Samal 94627196df popovers: Fix popovers force closing on topic visibility change.
When a topic is muted, it is removed from the view in some cases.
This can lead to the popover being force closed since the popover is
anchored to the reference element.

We add a delay to all the methods that contribute to hiding the topic,
on mute, to allow the relevant animations to be completed before the
topic is hidden from view and the popover is closed.
2024-06-04 15:56:44 -07:00
Sayam Samal 56be95a1c8 topic_popover: Remove redundant code from previous visibility options.
Commit 3f2ab44f94 removed the 'development' guard and cleaned the
older UI of the previous topic visibility options implementation,
but it missed the related JS logic.

This commit removes this redundant code, which was now present in
`web/src/topic_popover.js`.
2024-06-04 15:56:44 -07:00
Sayam Samal d93a3bb175 topic_sidebar_actions: Use sliding animation in the visibility switcher.
This commit updates the sidebar topic actions popover to use the new
sliding tab switcher for the topics visibility policy switcher.

This also includes changes such as hiding the popover only on
successful request completion, and adds error feedback by indicating
it via the sliding animation.
2024-06-04 15:56:44 -07:00
Sayam Samal 8877833603 visibility_policy_popover: Add feedback via switcher when request fails. 2024-06-04 15:56:44 -07:00
Sayam Samal a3d60c9f09 visibility_policy_popover: Hide popover only when request is successful.
This hides the visibility policy popover only when the request to
change the topic visibility policy is successful.

This allows a user to retry changing the policy in case of a request
failure, without having to open the popover again from the start.
2024-06-04 15:56:44 -07:00
Sayam Samal db4c5cdfc6 visibility_policy_popover: Use sliding animation in the switcher.
This commit updates the topic visibility popover to use the new
sliding tab switcher, which was introduced in personal menu >
theme switcher.
2024-06-04 15:56:44 -07:00
Kislay Verma 2c98263d4c left_sidebar: Rename "more topics" to "all topics".
This commit renames the occurrences of "more topics"
to "all topics" in comments and documentation.

Fixes #30014
2024-06-04 10:18:54 -07:00
Lauryn Menard c4f1d44dd7 i18n: Fix translated strings for delete profile field option.
Fixes how the confirmation modal title is generated for translation
for deleting an option or multiple options from a customer profile
field that's a list of options.
2024-06-04 09:54:35 -07:00
sujal shah d793cc0f54 tooltip: Render tooltips for `Not subscribed` and `All channels` tabs.
Render tooltips for both the tabs if the user is guest user.

Fixes #21869.
2024-06-04 09:49:50 -07:00
sujal shah 6c437eda77 stream_settings: Display No channel text when no channel present.
In the "not-subscribed" tab, when there are no channels to show, we
display a text message saying "No channels to show. View all channels"
along with a link that redirects the user to the "All channels" tab
(All channels(#channels/all)).

Updated the update_empty_left_panel_message function in
stream_settings_ui.js to modify and determine which banner to display
when no channels are available to show, modified that function to also
display the banner of the "not-subscribed" tab using a new classname
called 'not_subscribed_streams_tab_empty_text'.
2024-06-04 09:49:50 -07:00
sujal shah 619e234100 stream_settings: Change the if-else with switch statement. 2024-06-04 09:49:50 -07:00
sujal shah 6deb165ef6 stream_settings: Add Not subscribed tab to stream settings.
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "show_not_subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition.

Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.

Fixed and added the node tests for these changes.
2024-06-04 09:49:50 -07:00
sujal shah d7936fe576 stream_overlay: Change the subscribed_only to show_subscribed.
This commit changes the variable and function name from
"subscribed_only" to "show_subscribed" and
"set_subscribed_only" to "set_show_subscribed"
so that in the next commit, when the "not subscribed" tab is added,
we can use a similar variable named "show_unsubscribed" and function
named "set_show_unsubscribed".
2024-06-04 09:49:50 -07:00
Varun Singh 6b42c18220 settings_preferences: Convert module to TypeScript. 2024-06-04 08:50:07 -07:00
Varun Singh b1943f560a settings_preferences: Refactor initialize function.
Before this commit the `user_settings_panel` object was declared as
a `const` and assigned an initial value of `{}`. Later, inside the
initialize function the object was mutated with three fields (`container`,
`settings_object`, `for_realm_settings`).

TypeScript does not allow this.Hence,we have removed the initial
value(`{}`) and changed the object to be a `let` var. This means,
when the `initialize` function is called `user_settings_panel` object is
undefined and hence `user_settings_panel.foo` will throw an exception.
To avoid this we have refactored the function by changing the way
`user_settings_panel` object is assigned value.
2024-06-04 08:50:07 -07:00
Varun Singh 796cc038c4 page_params: Add property to zod object. 2024-06-04 08:50:07 -07:00
Varun Singh be91b41236 settings_preferences: Don't store 'success_msg_html' if undefined.
Although both 'sticky' and 'success_msg_html' parameters
are passed optionally, the conditional took into account
only the former.
2024-06-04 08:50:07 -07:00
evykassirer 9a3263ec5d messages: Rename convert_raw_message_to_message_with_booleans. 2024-06-03 15:42:41 -07:00
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
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
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
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
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
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
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
Varun Singh a177d8fa49 settings_streams: Convert module to TypeScript. 2024-05-31 15:19:43 -07:00
Varun Singh 40953f7ada dialog_widget: Fix 'onclick' event type. 2024-05-31 15:19:43 -07:00
Anders Kaseorg e53e3af0f6 codespell: Fix spelling mistakes caught by codespell.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-31 14:32:33 -07:00
Aman Agrawal 8aea76448f copy_and_paste: Fix our logic being confused about selected messages.
If the selection stays inside a message header and there
are messages before the message header, our logic thinks `end_id`
is message before the header while `start_id` and `end_id` should
be that same.

It is best to just let browser handle the copy paste in this case.
2024-05-31 12:42:51 -07:00
Anders Kaseorg 804c3706ff tsconfig: Enable noUncheckedIndexedAccess.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 16:29:23 -07:00
Anders Kaseorg 4e91572c96 hello: Add safety assertions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 16:19:15 -07:00
Anders Kaseorg 067a342b4e upload_widget: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 6c0c19addb upload: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg e134ad1363 unread_ops: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 07c220f08b typing_events: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 83eb0a326a typeahead_helper: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg d0a03be8e0 topic_list: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg c70799ca25 stream_list: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg e6358f5edc settings_profile_fields: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg d49ad41a68 settings_emoji: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 11ab831e41 settings_components: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg fcf2e607c2 rendered_markdown: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 8417b54035 recent_view_ui: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 38b5fc32f7 playground_links_popover: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg c2c17dcd14 people: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg df849b294a narrow_state: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg ab3110817f narrow_banner: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg b953584d45 messages_overlay_ui: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg eddf79fca2 message_viewport: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg ad763ee7a7 message_list_data: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg d8a7d65647 markdown: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 74bfa62d78 left_sidebar_navigation_area: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg f15c2c5dfd inbox_ui: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg 6a429603ad i18n: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg eedde08f24 hash_util: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:49 -07:00
Anders Kaseorg fc17821119 hash_parser: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg da7d8b902b filter: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg beef5d259b dropdown_widget: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 7303851fd5 drafts: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg ff23f79550 copy_and_paste: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg e50a115d6f composebox_typeahead: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg a1ca665119 compose_ui: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 6eec89ab96 compose_reply: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg cbffc10e9e compose_fade: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 468da9ed23 compose_actions: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 015e3917ac common: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 5a4b0420d1 buddy_list: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 6cd8c9bb8c bot_data: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 8cec7dd917 bootstrap_typeahead: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 9ad8ca4223 blueslip_stacktrace: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 284beed889 billing/sponsorship: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg c2c2e0b9ea billing/remote_billing_auth: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 01677db59e attachments_ui: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:54:48 -07:00
Anders Kaseorg 9b711cda20 tippy: Use namespace import for tippy.js.
Names like “delegate”, “Instance”, “Placement”, “Props”, and
“ReferenceElement” are much too generic to make sense as named
imports.

The downside is that we now need to write tippy.default(…) instead of
tippy(…) (because ES module namespace objects cannot be callable), but
that cost is worthwhile.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 15:45:46 -07:00
Aman Agrawal 817bffe6b1 message_list: Rename `narrowed` property.
We rename it for clarity so that someone new to the codebase
knows instantly what it is checking.
2024-05-30 11:41:13 -07:00
Aman Agrawal 71341d282e narrow: Remove last remains of was_narrowed_already.
This doesn't seem useful even for sentry logs since they
will already contain the full hash change history.

Rest of it was removed in 240f7b53b2.
2024-05-30 11:41:13 -07:00
roanster007 7b1a5d84fc refactor: Extract the methods called post narrow message list update.
This commit extracts various methods called post the current
message list is updated in "narrow.js" such as update_unread_banner,
handle_post_view_change, etc. into a separate method --
"handle_post_message_list_change".

This allows us to be able to call these methods independently
in case we need to update the filter and the corresponding
message lists.

This is a preparatory commit to #30114.
2024-05-30 11:37:13 -07:00
Varun Singh 50e0f336f0 settings_streams: Fix error thrown when adding 'default-channels'.
The 'Select channel' dropdown in 'Add default channels' modal is
the LAST dropdown element on the modal and it does not contain
`data-stream-id` attribute.

.attr('data-stream-id') would return undefined for this element
and as a result the returned `Set` would have its last element a
`NaN` --- passing a `NaN` inside 'data' field of 'channel.post' threw
an error.

We tweaked the selector string to selectively map over the elements with
'data-stream-id' attribute.
Also we removed '.toString()' converting stream-id to a string (stream-id is a
'number' type).
2024-05-30 10:53:19 -07:00
Anders Kaseorg 27a993a504 stats: Make sent_data_schema specifically expect human and bot keys.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 10:01:59 -07:00
Anders Kaseorg 7377d3fab9 topic_generator: Fix types of get_next_stream, get_prev_stream.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-29 23:33:27 -07:00
Anders Kaseorg c20af83770 people: Fix get_custom_fields_by_type type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-29 23:33:11 -07:00
Anders Kaseorg a01d68e838 people: Rename ProfileData type to singular ProfileDatum.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-29 23:33:11 -07:00
Anders Kaseorg ec199082fd types: Move Submessage to submessage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-29 17:47:09 -07:00
evykassirer 48fc0bc750 message_helper: Convert module to typescript. 2024-05-29 16:45:36 -07:00
evykassirer 7364c02ed6 message_helper: Set clean reactions when processing the raw message. 2024-05-29 16:45:36 -07:00
evykassirer 28107eb913 message_helper: Be more explicit about converting subject to topic. 2024-05-29 16:45:36 -07:00
evykassirer 297d393539 message_helper: Only convert subject to topic for stream messages.
There was a stale comment here saying we needed to do this for
private messages too, but `convert_message_topic` only modifies
`message` if its type is "stream".
2024-05-29 16:45:36 -07:00