Commit Graph

2172 Commits

Author SHA1 Message Date
Anders Kaseorg 833a15e121 compose: Move call button display functions to compose_call_ui.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 08:34:39 -07:00
Anders Kaseorg 9c70f92514 reload: Move initialize to new reload_setup module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 08:34:39 -07:00
Anders Kaseorg c4d338a6ab drafts: Extract drafts_overlay_ui module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 08:30:31 -07:00
Anders Kaseorg d5064fc7b2 narrow: Extract narrow_title module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 16:26:45 -07:00
Aman Agrawal f2a00c7b9d inbox: Render rows in sorted order.
Fixes #26962

We sort topic and dm data by latest_msg_id and render them.

For updates, we remove rows which for which latest_msg_id was
changed and them insert them again at the correct index.
2023-10-05 15:52:02 -07:00
Aman Agrawal 1d126078a2 unread: Add option to include max msg id in unread topic/dm data. 2023-10-05 15:52:02 -07:00
Aman Agrawal 57c1c56028 inbox: Migrate data objects to use Map.
Since Map store values in insertion order, it will be required
to show rows sorted by time.

This is not pretty but can be improved when
https://github.com/handlebars-lang/handlebars.js/pull/1996
is released.
2023-10-05 15:52:02 -07:00
Aman Agrawal ab1eb78c21 inbox: Fix incorrect dict being accessed.
topics_dict[stream_key] is a dict of topics and doesn't have
is_hidden property. We actually want to access streams_dict
here.
2023-10-05 15:52:02 -07:00
Anders Kaseorg dd584ba8a9 stream_settings_ui: Move set_color to stream_settings_api.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 15:32:04 -07:00
Alex Vandiver 62015a0b48 portico: Remove now-unnecessary twitter-tweet CSS and JS.
The content that this affected was removed in acd0c5568a.
2023-10-05 15:06:10 -07:00
Anders Kaseorg c4221332cd stream_color: Add missing $ prefix to set_colorpicker_color parameter.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 14:52:13 -07:00
Anders Kaseorg e8a2a5ce36 compose: Move initialize to new compose_setup module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 14:42:19 -07:00
Anders Kaseorg 6e725f0d17 compose: Move call link insertion to new compose_call_ui module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 14:42:19 -07:00
David Rosa 13e1a389b0 help: Fix missing icons in "Stream permissions".
This brings back the icons in the legend for the Stream permissions
tables that disappeared somehow.
2023-10-05 12:11:51 -07:00
evykassirer c54ca567a9 typeahead: Only return early from blur if parentElement is specified.
From a bug reported here:
https://chat.zulip.org/#narrow/stream/9-issues/topic/Typeahead.20fails.20to.20automatically.20close/near/1655321
2023-10-05 11:51:42 -07:00
Tim Abbott 3d804ef186 pm_list: Rename handle_narrow_deactivated.
It did the same thing as handle_narrow_activated when passed the
home_msg_list filter.

We still leave a renamed version for use by the inbox/recent views.
2023-10-05 10:31:23 -07:00
Tim Abbott 0a189119aa stream_list: Rename handle_narrow_deactivated.
It did the same thing as handle_narrow_activated when passed the
home_msg_list filter.

We still leave a renamed version for use by the inbox/recent views.
2023-10-05 10:31:23 -07:00
Tim Abbott 20b2323c67 left_sidebar: Deduplicate handle_narrow_deactivated.
handle_narrow_activated did the same thing is passed the home_msg_list
filter.
2023-10-05 10:31:23 -07:00
Tim Abbott 246139e1d0 narrow: Extract handle_post_view_change. 2023-10-05 10:31:23 -07:00
Tim Abbott 62fe1dcad1 narrow: Simplify compute_narrow_title for All messages.
filter.get_title() already returns "All messages" for the filter we
now pass in, which is the "in:home" operator defined by that view.
2023-10-05 10:31:23 -07:00
Tim Abbott 4465262bcb narrow: Pass a msg_list to handle_post_narrow_deactivate_processes. 2023-10-05 10:31:23 -07:00
Tim Abbott ab15462669 hashchange: Remove duplicate handle_narrow_deactivated call.
narrow.deactivate calls this directly.
2023-10-05 10:31:23 -07:00
Sahil Batra f88715cb2c signup: Use portico_modals module to handle modal on signup page.
This does not results in any behavioral or UI change, we just
use portico_modals module to open and close the modal instead
of directly calling functions like Micromodal.open and
Micromodal.close. This change also solves a bug where the
modal was not closed previously on clicking anywhere outside
the modal.
2023-10-05 09:28:27 -07:00
Sahil Batra 2df26f3d27 bootstrap-btn: Remove bootstrap CSS for ".btn-success" elements.
We used "btn-success" class only in user profile modal subscribe
widget and the CSS rules applied by bootstrap on this class were
overridden by other CSS. We also remove the btn-success class
since this is a bootstrap-specific class and we no longer
need it.
2023-10-05 09:28:27 -07:00
Sahil Batra cfc9dccb2a bootstrap-btn: Remove bootstrap CSS for ".btn-primary" elements.
We used "btn-primary" class only in integrations dev panel page
and this commit re-adds the CSS applied by this class in
integrations_dev_panel.css. We also remove the btn-primary class
since this is a bootstrap-specific class and we no longer
need it.
2023-10-05 09:28:27 -07:00
Sahil Batra cc4a6d08e7 development: Update modal in emails page to use micromodal.
We now use micromodal in the modal on dev server emails page to
make it consistent with other modals in the app and this is
preparatory work for moving away from bootstrap as well.
2023-10-05 09:28:27 -07:00
Sahil Batra 8710feb5dd billing: Update modal shown on license increase to use micromodal.
We now use micromodal in the license update modal on billing page
to make it consistent with other modals in the app and this is
preparatory work for moving away from bootstrap as well.
2023-10-05 09:28:27 -07:00
Sahil Batra 866b6cd632 portico: Add portico_modals.ts module.
This commit adds portico_modals.ts module which contains functions
for supporting modals in portico pages. The new module basically
contains code from functions in overlays.ts without the code
that is not needed currently for modals in portico pages.
2023-10-05 09:28:27 -07:00
Anders Kaseorg ac8436d46c resize: Move handler to new resize_handler module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 09:26:59 -07:00
Aman Agrawal c2c1f1ac6d inbox: Add icon in search box to clear any text. 2023-10-05 08:57:44 -07:00
Aman Agrawal b494424ffa inbox: Change hover / focus styles of search box.
This is to make search box less noticeable when focus is given / taken
away from it.
2023-10-05 08:57:44 -07:00
Aman Agrawal 5142f1279a popovers: Refactor show popovers as overlay on mobile widths.
This also fixes user_card_popover not being displayed as overlay
on mobile widths.
2023-10-05 08:29:12 -07:00
Anders Kaseorg 13d1241eed activity: Extract new activity_ui module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 08:27:30 -07:00
Anders Kaseorg 69ceff4995 settings_notifications: Cut import of stream_edit.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 08:22:56 -07:00
Anders Kaseorg 4ec78ee2d4 compose_recipient: Move selected_recipient_id to compose_state.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-05 08:21:33 -07:00
Aman Agrawal 75826d8409 handlebars: Move popover handlebars to a new popovers folder.
Organize related handlebars in a new folder together.
2023-10-05 08:19:49 -07:00
Aman Agrawal 95ee178d1a user_card_popover_content: Rename to remove `_content`. 2023-10-05 08:19:49 -07:00
Aman Agrawal a6f864a9a4 user_card_popover: Rename function name to avoid conflict.
This function name would have conflicted with
`render_user_card_popover_content` variable name once
we remove `_content` from it.
2023-10-05 08:19:49 -07:00
Aman Agrawal 3415a6898c user_card_popover: Rename `_title` suffix to `_avatar`. 2023-10-05 08:19:49 -07:00
Aman Agrawal 78543a7f12 emoji_picker: Merge templates.
Merge `emoji_popover.hbs` and `emoji_popover_content.hbs`.
2023-10-05 08:19:49 -07:00
Aman Agrawal 54233f0363 playground_links_popover: Rename to remove `_content`. 2023-10-05 08:19:49 -07:00
Aman Agrawal ecba66e613 compose_popovers: Rename to remove `_content`. 2023-10-05 08:19:49 -07:00
Aman Agrawal acd584c336 actions_popover: Rename template to remove `_content`. 2023-10-05 08:19:49 -07:00
Anders Kaseorg 4c11f49627 settings_notifications: Fix stream_settings_api namespace import name.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-04 23:57:16 -07:00
Anders Kaseorg eb6ac7bd98 settings_ui: Fix type and $ prefix of status_element argument.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-04 23:51:50 -07:00
Aman Agrawal 2ed1465b04 css: Display status emoji along with overflowing sender names.
Even if sender name overflows the available space, we should
show status emoji along with sender name by hiding the overflowing
part of sender name.
2023-10-04 16:49:39 -07:00
Anders Kaseorg 8d217847db stream_edit: Move can_remove_subscribers_group_widget to settings_org.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-04 16:35:24 -07:00
Anders Kaseorg 278bd52b4e stream_edit: Move get_request_data_for_stream_privacy to settings_data.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-04 16:35:24 -07:00
Anders Kaseorg d17c0dabc8 stream_data: Move stream_*_policy_values to settings_config.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-04 16:35:24 -07:00
Anders Kaseorg 0f0fd3f07d tests: Remove sub_store mock from recent_view test.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-04 16:35:24 -07:00
evykassirer 083062cd11 search: Don't "initiate search" if it's already open.
(or if you're using a hotkey, since then we should select
the searchbar)

Reported here:
https://chat.zulip.org/#narrow/stream/9-issues/topic/search.20bar.3A.20selection.20jumping.20to.20whole.20query/near/1652562
2023-10-04 16:32:19 -07:00
Aman Agrawal 2ec8273c6e left_sidebar: Move all messages popover to inbox.
Also, renamed files and variables as needed.
2023-10-04 13:10:08 -07:00
Aman Agrawal dd1e06886c popover_menus: Remove unused class added to popover. 2023-10-04 13:10:08 -07:00
Aman Agrawal 4f881ee058 left_sidebar: Move unread count from all messages to inbox. 2023-10-04 13:10:08 -07:00
Aman Agrawal af03b9dd06 left_sidebar: Move `All messages` below `Recent view`. 2023-10-04 13:10:08 -07:00
Aman Agrawal 7da0e09d0a left_sidebar: Remove old comment.
Not sure what this means so removed.
2023-10-04 13:10:08 -07:00
Anders Kaseorg b4878d4f0b stream_edit: Move set_stream_property to new stream_settings_api module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-04 13:04:50 -07:00
Prakhar Pratyush 28fb5ea24d settings: Add UI for automatically follow and unmute topics settings.
This commit adds two drop-down settings in 'SETTINGS / NOTIFICATIONS'
and 'SETTINGS / DEFAULT USER SETTINGS'.

The new settings lie in a new section named "Topic notifications",
just below the "Noification triggers" section.

Label: "Automatically follow topics"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".

Label: "Automatically unmute topics in muted streams"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".

Fixes #25914.
2023-10-04 13:04:29 -07:00
N-Shar-ma 46b2d6d06a compose: Remove redundant code from scheduled_messages_ui.js.
We remove redundant code when editing a scheduled message in the compose
box, for resetting the compose box, as it anyway gets reset on calling
`compose_actions.start()`.

Besides ending `scheduled_messages_ui.js`'s dependency on `compose.js`
and `compose_ui.js`, this also fixes the bug where on editing a
scheduled message when there was content in the compose box, it would be
irretrievably lost. The old content is now drafted.
2023-10-04 12:54:36 -07:00
Anders Kaseorg 91f81d3962 flatpickr: Fix Tab key handler for 24-hour time.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-04 12:03:10 -07:00
Anders Kaseorg c98622c63a compose: Extract compose_call module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 18:41:42 -07:00
Anders Kaseorg ac38aaad21 scheduled_messages: Move UI to new scheduled_messages_ui module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 17:56:43 -07:00
Anders Kaseorg c7927569bc scheduled_messages_popover: Move selected_send_later_timestamp.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 17:56:43 -07:00
Anders Kaseorg b50e500dae scheduled_messages: Move update_send_later_options.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 17:56:43 -07:00
Anders Kaseorg 3e4def9c88 narrow: Don’t swallow errors in narrow.activate.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 14:52:07 -07:00
Anders Kaseorg 549bae5176 message_edit: Move get_upload_object_from_row to upload module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 14:50:02 -07:00
Anders Kaseorg fb19476c4e compose: Move uppy to upload module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 14:50:02 -07:00
Sayam Samal abece73c5a tooltips: Add hotkey hints and modify edit history tooltip.
This commit consists of the following visual changes:

- Add the hotkey hints in the tooltip of the view edit history option,
the shortcut (Shift + H) for which was added in PR #26245

- Swap "Click to view edit history." and the edit status string
(EDITED/MOVED/SAVING) to make the tooltip consistent with other
tooltips across the web app.

- Rename "Click to view edit history." to "View edit history", since
the "Click to view" part is evident from the icon as well as the the
keyboard shortcut hints.

Fixes #26581.
2023-10-03 14:37:47 -07:00
Sayam Samal 8d3f2baebf tooltips: Use <div> tags inside tooltip's inner content.
By replacing `<span>` tags with `<div>` tags inside the tooltip's inner
content we remove the redundancy of having to use break tags to
separate the tooltip's title and it's content.

We also replace any `<p>` tags with `<div>` tags for the following
reasons:

- Since what we want to achieve are just block elements in order to
avoid the break tags, using `<div>` tags provide use with a wider
scope of use cases.

- We don't want the pause, screen readers often introduce after reading
the contents of a paragraph.

- The `<p>` tag cannot contain tables and other block-level elements.

- The semantic meaning of the <p> tag doesn't apply to the commonly
used tooltip content.
2023-10-03 14:37:47 -07:00
Anders Kaseorg 9b6301c755 upload: Don’t leak an extra body event handler for each edited message.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 14:10:15 -07:00
Anders Kaseorg 4595be29e8 stream_settings_ui: Remove set_muted wrapper.
stream_muting.update_is_muted will be called when the event comes back
from the server.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 12:49:36 -07:00
Anders Kaseorg 6e3d6f531f web: Fix namespace import names.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 12:21:06 -07:00
Anders Kaseorg 4d67bf5605 compose: Delete obsolete comment.
Commit 57340a888c (#19003) separated it
from the variable it was commenting, and commit
8ced075643 (#22754) changed that to a
different variable, so I infer that nobody thought this documentation
was important.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 12:20:01 -07:00
Anders Kaseorg d4a93aa05a popover_menus: Extract compose_popovers module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 11:58:29 -07:00
Anders Kaseorg d01db0f5a0 popover_menus: Extract left_sidebar_navigation_area_popovers module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 11:58:29 -07:00
Anders Kaseorg dd6676f16e popover_menus: Extract user_topic_popover menus.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 11:58:29 -07:00
Anders Kaseorg 825fb8cef5 popover_menus: Extract topic_popover module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 11:58:29 -07:00
Anders Kaseorg 16e2a32c4c popover_menus: Extract message_actions_popover module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 11:58:29 -07:00
Anders Kaseorg 26e34a163e popover_menus: Extract scheduled_messages_popover module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 11:58:22 -07:00
Ujjawal Modi 0e5bb92111 settings: Improve UI for displaying reactivated and deactivated users.
Earlier when a user is deactivated or reactivated from users
table and deactivated_users table the `Role` column was modified.

This commit changes this and now `Role` column is not modified
instead now the corresponding row is greyed out.

Fixes #21653.
2023-10-03 11:15:39 -07:00
Ujjawal Modi ba1405df96 settings: Live update tooltip in users and deactivated users table.
Earlier tooltip shown on hovering to activate and deactivate user
button in users and deactivated_users table does not live update
when user is deactivated or reactivated.

This commit makes changes to do the live update.
2023-10-03 11:15:39 -07:00
Ujjawal Modi 7453ea61bb settings: Remove title from button in users and deactivated_users table.
This commit removes the `Reactivate` and `Deactivate` title on hovering
to activate and deactivate button in users and deactivated_users table.
This was done as we already show tippy tooltip on hover.
2023-10-03 11:15:39 -07:00
Aman Agrawal be1bd91b96 stream_list: Remove popovers.hide_all in click event.
Fixes #26992
2023-10-03 10:05:07 -07:00
Aman Agrawal ce94e616ca stream_popover: Remove redundant call to popovers.hide_all.
build_stream_popover is only called via a click.
2023-10-03 10:05:07 -07:00
Aman Agrawal 4111c5dd12 user_group_popover: Remove redundant call to popovers.hide_all.
`toggle_user_group_info_popover` is only called via a click.
2023-10-03 10:05:07 -07:00
Aman Agrawal 97d85e3666 settings_user: Remove popovers.hide_all in click event. 2023-10-03 10:05:07 -07:00
Aman Agrawal b680112944 search: Remove popovers.hide_all in click event. 2023-10-03 10:05:07 -07:00
Aman Agrawal 8970786048 read_receipts: Remove unnecessary popovers.hide_all call.
Read receipts can either hide by clicking or pressing escape
button. Since clicking already hides popovers and escape keypress
call `popovers.hide_all` separately, we don't need to call
it again.
2023-10-03 10:05:07 -07:00
Aman Agrawal aae09ed6b7 message_edit_history: Remove popovers.hide_all in click event. 2023-10-03 09:58:29 -07:00
Aman Agrawal cbef6f79a5 echo: Remove popovers.hide_all in click event. 2023-10-03 09:58:29 -07:00
Aman Agrawal 10fe3baa45 click_handlers: Remove `popovers.hide_all`.
Since tippy popovers hide on click outside themselves, we don't
need call `popovers.hide_all` separately for them.
2023-10-03 09:58:29 -07:00
Aman Agrawal 6ef03498a9 popover_menus: Fix enter keypress not working on some popovers.
Fixed for message actions popover, stream popover, topic
popover and maybe others.
2023-10-03 09:57:43 -07:00
Eeshan Garg f3465dea08 demo-orgs: Add UI for converting to permanent organization.
Adds warning banner to the organization settings overlay/tabs
for demo organizations. For owners, clicking on the link in the
banner opens a modal to convert the demo organization into a
permanent organization.

For admins that are not owners, clicking on the link will go
to the help center article on demo organizations.

Non-admin users will not see the warning banner.

The modal for converting a demo organization requires the owner
to have set their email address. Once the owner's email address
is set, then the organization can be made permanent by changing
the subdomain of the organization. The deletion date for the
demo organization will be removed as part of updating the
subdomain.

The organization owner must also have updated the organization
type to be any value other than unsepecified to convert the
demo organization to a permanent organization. The modal's
submit button will be disabled if that is the value for the
organization type in the form. The demo organizations created
in the dev environment now have their organization type set to
unspecified on creation.

This is a part of #19523.

Co-authored by: Lauryn Menard <lauryn@zulip.com>
2023-10-03 09:11:41 -07:00
Lauryn Menard de4e369ece demo-orgs: Update demo organization navbar alert text and links.
Updates the demo organization navbar alert for the deletion deadline
to link to the help center doc for converting it to a permanent org.
Also removes the "Hide notice" text since the "X" close button is
sufficient for users who want to close the notice.
2023-10-03 09:11:41 -07:00
Lauryn Menard ca5d1c1265 tests: Update events and schemas for scheduled message events.
Updates the testing for scheduled message event schemas to be fully
checked by `zerver/tests/test_events.py` and `tools/check-schema`.

Adds the missing 'failed' field to the scheduled message events
in `web/tests/lib/events.js` as well.
2023-10-03 09:05:22 -07:00
Prakhar Pratyush 3b56e0f5ca topic_popover: Fix the wiggle on hovering visibility policy buttons.
On hovering the not-selected option in the left sidebar
topic popover widget to change visibility policy, a wiggle
effect was observed.

This commit fixes the wiggle effect.
2023-10-03 09:00:46 -07:00
Prakhar Pratyush 30166758da icons: Update the icons for Unmute and Follow. 2023-10-03 08:18:39 -07:00
Aman Agrawal 8291883739 ui_init: Initialize add stream options popover.
I forgot to check it :3.
2023-10-03 08:17:31 -07:00
Aman Agrawal 30152f77a9 settings_org: Change text for inaccessible announcement stream. 2023-10-03 08:17:31 -07:00
Aman Agrawal d3588c7559 activity: Hide right sidebar when narrowing to a user via enter press.
Fixes #26989
2023-10-03 08:17:06 -07:00
Aman Agrawal 35b854131e stream_list: Hide popovers when activating narrows on enter press. 2023-10-03 08:17:06 -07:00
Anders Kaseorg ad7d908069 user_group_ui_updates: Merge into user_group_edit module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 08:16:09 -07:00
Anders Kaseorg 46be4d230c user_group_create: Move create_user_group_clicked.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 08:16:09 -07:00
Anders Kaseorg 5efbece30a stream_color: Extract update_stream_color to new module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 08:15:21 -07:00
Anders Kaseorg 0efd9f7bdd settings_users: Extract user sort comparators to new user_sort module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 08:14:51 -07:00
Anders Kaseorg 30ae936793 settings_invites: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 08:14:11 -07:00
Anders Kaseorg 15de51d727 settings_invites: Remove pointless global state from do_resend_invite.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 08:14:11 -07:00
Anders Kaseorg f8d42a6789 settings_invites: Remove pointless global state from do_revoke_invite.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-03 08:14:11 -07:00
Aman Agrawal 0b5e45d1a7 lightbox: Validate urls before before using them. 2023-10-02 22:39:02 -07:00
Aman Agrawal b443916da1 lightbox: Replace image with media.
Since lightbox can also play videos now, replace image with media.
2023-10-02 22:39:02 -07:00
Aman Agrawal 3a507b5752 lightbox: Add support for playing video. 2023-10-02 22:39:02 -07:00
Aman Agrawal 6fb7a64cd0 rendered_markdown: Fix video thumbnail not present in Safari. 2023-10-02 22:39:02 -07:00
Aman Agrawal 8ef52d55d3 markdown: Add support for inline video thumbnails. 2023-10-02 22:39:02 -07:00
Tim Abbott cb1de9092d bootstrap: Remove now-unused carousel plugin. 2023-10-02 22:30:03 -07:00
Tim Abbott 72942c6bb9 portico: Delete now-unused tour,carousel,testimonials CSS.
These components were removed with the /hello redesign.
2023-10-02 22:30:03 -07:00
Aman Agrawal 75a1a74adf hello: Redesign page.
Fixes #24082
2023-10-02 22:30:03 -07:00
Tim Abbott 7a97ceab86 popovers: Extract add_stream_options_popover.js. 2023-10-02 19:17:08 -07:00
Tim Abbott 56f7319d51 message_lists: Fix import cycle from how home is initialized. 2023-10-02 19:17:08 -07:00
Aman Agrawal af170a82f6 popovers: Simplify any_active.
Remove unused functions along with it.
2023-10-02 19:17:08 -07:00
Aman Agrawal 1d62abee61 popovers: Simplify hide_all.
Since we only have tippy popovers now, functions calling
not_hide_tippy_instances have been removed.

Also, all of emoji_picker, stream_popover, user_card etc popovers
are tippy popovers so calling hideAll is enough to hide them all.
2023-10-02 19:17:08 -07:00
Aman Agrawal e957603fb9 sidebar_ui: Hide sidebars when user clicks outside them. 2023-10-02 19:17:08 -07:00
Aman Agrawal 1a8320dc8e sidebar_ui: Track sidebar's expanded state using variable. 2023-10-02 19:17:08 -07:00
Anders Kaseorg 91e656398d settings_muted_users: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 19:15:03 -07:00
evykassirer e578773ac9 compose: Update recipient placeholder when topic input changes. 2023-10-02 17:50:30 -07:00
Anders Kaseorg c5c5b18ab4 settings_exports: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 17:49:36 -07:00
Anders Kaseorg e459b83c06 pm_list_dom: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 17:48:39 -07:00
Anders Kaseorg 961c7185ab vdom: Fix types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 17:48:39 -07:00
Anders Kaseorg fcd8395eb5 bulleted_numbered_list_util: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 17:46:56 -07:00
Anders Kaseorg 819a91aec7 alert_words_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 17:46:22 -07:00
N-Shar-ma 681180ee86 compose: Migrate `empty_topic_placeholder` to `compose_state`.
This makes it so that `drafts.js` now no longer imports `compose.js`.
2023-10-02 17:45:27 -07:00
Tim Abbott e87b9955c9 compose: Simplify drafts interface for message content.
Previously, we had logic to update the compose box state living in the
drafts module, for no particularly good reason.
2023-10-02 17:45:27 -07:00
Sahil Singh 7ecb63c332 drafts: Pass draft_id to compose_actions.start as part of compose_args.
This will allow us to remove some duplicated compose box code that was
previously inside restore_draft.

Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
2023-10-02 17:45:27 -07:00
Anders Kaseorg 67f2bc030f ui_init: Move update_invite_user_option to sidebar_ui.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 17:37:56 -07:00
Anders Kaseorg 457544e0d2 message_scroll: Move state flags to new module message_scroll_state.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 17:37:56 -07:00
Anders Kaseorg 73507ee2ae inbox_util: Move is_in_focus to inbox_ui.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 17:37:56 -07:00
Anders Kaseorg 919381e5e7 copied_tooltip: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 15:36:23 -07:00
Anders Kaseorg 6e0f9df188 copied_tooltip: Remove incorrect $ prefix from non-jQuery variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 15:36:23 -07:00
Satyam Bansal 8b7a650370 integration-url: Disable "Copy URL" button when topic input is empty.
Fixes #26797.
2023-10-02 12:29:42 -07:00
Satyam Bansal 51e2030f7b integration-url: Migrate integration typeahead to dropdown widget.
Fixes part of #26797.
2023-10-02 12:29:42 -07:00
Satyam Bansal 66e3a68acb integration-url: Rename stream dropdown item click callback.
This is a prep commit to migrate integration input to dropdown
widget.
2023-10-02 12:26:43 -07:00
Aman Agrawal 4c57b3f289 popover_menus: Set correct instance as undefined.
This caused a bug where input keys were not working since
`compose_mobile_button` was always set.
2023-10-02 12:07:05 -07:00
evykassirer 605c4688b1 buddy list: Show self in search results.
We should search for what the user asked us to search for.
CZO conversation:
https://chat.zulip.org/#narrow/stream/101-design/topic/search.20buddy.20list.20for.20self/near/1630454

This commit also stops the user from being at the top of
the search list, so that the search list is fully
alphabetical (though still sorted by online status).

We switch to not having the user at the top of the list
only when there's search text in the search bar, otherwise
there'd be a visual jump that would happen just by opening
the search bar. There's almost always visual change when
entering text into the search input field, so that seems
like the time to change the sorting.
2023-10-02 12:05:42 -07:00
Karl Stolley 35e4be0b68 message_grid: Properly align elements in media-only messages. 2023-10-02 09:20:10 -07:00
Ryan Song 6a9aa54406 node tests: Add test for popover_menu_data.js. 2023-10-02 09:17:39 -07:00
palashb01 2ca1c0c63e settings: Decrease the gap between the account heading and banner.
This commit fixes the alignment of account-alert-notification-banner
by using a new classname 'account-alert-notification' for this specific
banner, removed the default margin-top and margin-left from this banner
which is set to all other banners, and Aligned the banner with
vertical-align property set to middle.

To left-align this specific banner when the email is long enough
to wrap to the next line removed the margin-left and used a new
classname 'account-settings-heading' for the accounts heading,
and gave a margin-right of 10px to ensure that the notice banner and
the heading have enough space between them, when the email is short.

If the email is long enough to wrap to multiple lines, then the gap
between the email input field and the banner is too low. To adjust
this, set the margin-bottom to 10px.
2023-10-01 17:54:22 -07:00
palashb01 89970eabeb settings: Wrap the content in the alert notification banner.
This commit fixes the issue where, if the content inside the alert
notification banner is long enough, it will wrap inside the alert
banner.

To prevent the email from spilling over in the notice,added the
'overflow-wrap' property set to 'anywhere'.

Fixes: #23653
2023-10-01 17:54:22 -07:00
Tim Abbott 4143dac95e muted_users_ui: Move functions to more appropriate modules. 2023-10-01 16:55:21 -07:00
Tim Abbott 9283da57f0 hash_util: Extract hash_parser.ts.
This allows these functions to be used by modules that need this code
and cannot import people.ts without creating import cycles.
2023-10-01 16:55:21 -07:00
Tim Abbott 1aea88fac1 spectators: Move build_login_link out of hash_util.ts. 2023-10-01 16:55:21 -07:00
Prakhar Pratyush 247d4626a0 recent_view: Show 'followed topics in muted streams' in recent view.
Earlier, followed topics in muted streams were not listed in
the 'Recent conversations' table when 'Include muted' filter is
unchecked.

They should be listed as we currently list unmuted topics.
2023-10-01 09:27:11 -07:00