Commit Graph

2380 Commits

Author SHA1 Message Date
Aman Agrawal 15e837ff25 org_registration: Fix page for mobile widths. 2023-10-06 09:19:01 -07:00
Lauryn Menard f19d7e36ee recipient-row: Remove logic for floating recipient bar.
In #23900, the floating recipient bar was replaced with a sticky
recipient bar. The logic in `id_for_recipient_row` was not updated
for that change, so we update that function to just get the first
message in the group and return that message ID.
2023-10-06 09:13:27 -07:00
Anders Kaseorg 971a003180 compose_actions: Extract compose_reply module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 09:07:43 -07:00
Aman Agrawal f85f904fc1 user_profile: Remove redundant call to popovers.hide_all.
`show_user_profile` is only triggered by clicks. Even `enter`
keypress is triggers a click via
`popover_items_handle_keyboard_with_overrides`.
2023-10-06 09:03:46 -07:00
Aman Agrawal 6cfb7239c8 popover_menus: Remove hide_all from on_show functions.
Since popovers only open after a click, all popovers hide already
if the clicks were outside them.
2023-10-06 09:03:46 -07:00
Aman Agrawal 4e4daf2ce5 overlays: Call open and close hooks for modals too.
Right now, the hooks only have a popovers.hide_all call but this
may need to audited when used in future. Added a comment to
that effect.
2023-10-06 09:03:46 -07:00
Aman Agrawal 3cbfe6f31f tests: Remove unnecessary mocks of recent_view_util.
Since is_visible was refactored to use a variable, these mocks
are not required.

Also, since is_visible return `false` by default, mocking it
to return false is not required.
2023-10-06 08:35:21 -07:00
Anders Kaseorg c56f784489 compose: Move update_email to compose_state.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-06 08:34:39 -07:00
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
Prakhar Pratyush d07d436b46 recent_view: Update the stale comment mentioning the 'hidden' field.
The 'hidden' field was removed in e8cc9da.

This commit updates the stale comment.
2023-10-01 09:27:11 -07:00
Prakhar Pratyush ef16f1cb23 recent_view: Fix the muted topic being tested in spectator view.
The "test_filter_all" includes tests for muted and not muted topics,
but the 'is_spectator' field is set to 'true'.

Logically, it is incorrect because a topic can't have a
visibility policy set in spectator view.

This commit fixes the incorrect behavior and adds a separate test
for the case 'is_spectator=true'.

The issue was introduced in d0a697f.
2023-10-01 09:27:11 -07:00
Aman Agrawal 08bf7efeb8 inbox: Don't set focus to inbox search by default.
Set focus inbox list, focus on search if list is empty.
2023-09-29 14:34:56 -07:00
Aman Agrawal c5f8a72631 inbox: Rename set_default_focus. 2023-09-29 14:34:56 -07:00
Aman Agrawal 0ad47b5d09 inbox: Focus on entire row instead of stream name on `show`. 2023-09-29 14:34:56 -07:00
Aman Agrawal c471e82e37 inbox: Make set_list_focus readable.
No change in behaviour.
2023-09-29 14:34:56 -07:00
Aman Agrawal d7451ac456 inbox: Fix left arrow navigating to unread count for inbox-row.
If you focus on inbox-header name by right arrow then down and then
left, it will focus on unread count instead of ellipsis icon.

Hard to explain how this fixes the bug here, next commit adds
explanatory comments to the function.
2023-09-29 14:34:56 -07:00
Aman Agrawal e79f5e11bd inbox: Use a variable to track left and right navigation keys. 2023-09-29 14:34:56 -07:00
Tim Abbott 1a15e07bf4 user_group_popover: Fix buggy user sort order.
This was caused by a typo and would have been naturally fixed when
moving this file to typescript.

Fixes #25963.
2023-09-29 13:04:22 -07:00
Aman Agrawal d574129a29 user_profile: Move init call to ui_init. 2023-09-29 11:59:51 -07:00
Aman Agrawal bdd991dc67 stream_popover: Move init call to ui_init. 2023-09-29 11:59:51 -07:00
Aman Agrawal 4243347db7 sidebar_ui: Move some related event handlers here. 2023-09-29 11:59:51 -07:00
Aman Agrawal 4d4a747b91 flatpickr: Fix misspelled variable name. 2023-09-29 11:59:51 -07:00
Aman Agrawal 2b8784935f popovers: Separate out sidebar visibility check from any_active.
We check popovers.any_active and visibility of popovers separately
since sidebars are not actually popovers.
2023-09-29 11:59:51 -07:00
Hardik Dharmani c12d249627 message_list_hover: Fix hover edit button visibility on new messages.
This commit resolves an issue where the edit button was not visible
during message hover for new messages. The problem occurred when a
message was sent after the hover event, resulting in the hovered
message being a local copy with the `locally_echoed` attribute set
to true. This caused the `is_message_editable_ignoring_permissions`
function to return false, subsequently causing `is_content_editable`
to return false as well. As a result, the `is_content_editable`
argument was false, leading to the edit button not being displayed.

The issue was caused due `$current_message_hover` being set to the
locally echoed version of `$message_row`. When the message was
successfully sent and the message was rerendered, the `message_hover`
function was called again on the properly sent message row.

However, the conditional check `($current_message_hover &&
rows.id($current_message_hover) === id)` returned true because
`$current_message_hover`, set to the locally echoed version, had the
same ID as the actual `$message_row`. Consequently, this condition
returned true at the start of the `message_hover` function,
preventing further execution of message_hover function and,
consequently, the updating of hover buttons.

To address this, an `else if` condition was introduced to check if
the message is locally echoed. If true, the function is terminated
to prevent `$current_message_hover` from being set to the locally
echoed version of `$message_row` until the message is sent correctly.

Once the message is sent correctly, the `message_hover` function is
executed again, setting `$current_message_row` to the properly sent
version of `$message_row`, and resulting in updating of hover buttons.

Fixes #25312
2023-09-28 18:07:26 -07:00
Hardik Dharmani bae28dfe64 message_list_hover: Extract module for hover/unhover logic.
Remove the various message-hover related functions from ui_init.js and
put them in a new module.
2023-09-28 18:07:26 -07:00
Karl Stolley ec8e6c2179 compose_banners: Explicitly target banner content, child p.
This ensures uniform display and flexing of different bits of
banner content, including:

* Banners like Sent! Scroll down to view...) that have only a
  classless `<p>` marking their content
* Banners like the unscheduled message allert, which puts a
  .banner_content class right on the paragraph
* Banners like the Your message was sent to a stream you have
  muted", which tuck a `<p>` into a div with the .banner_content
  class
2023-09-28 17:06:49 -07:00
N-Shar-ma 7ef3ce9e8b todo_widget: Use colon `:` as task and description display separator.
Uptil now, a dash `-` was used to separate the task from its (optional)
description. But a colon `:` was used in the `/todo` command syntax to
indicate where the task ends and it's description starts.

To make the separator symbol consistent for both the syntax and widget,
`:` is used for both. It was chosen over `-` as `:` is encountered less
often in normal language, and so accidental usage of it when using the
`/todo` command syntax is less likely. It is also is impossible to
confuse with the bullet list syntax which is allowed for tasks.
2023-09-28 16:03:03 -07:00
N-Shar-ma e537195a85 todo_widget: Do not sort alphabetically and by status of completion.
Earlier the tasks in a list were sorted alphabetically and on marking
one complete, it was pushed under any incomplete tasks. This behaviour
can be unexpected and confusing, so now each task is appended to the
bottom of the list on being added, and no shifting takes place on
marking it completed.

Fixes part of #20213.
2023-09-28 15:53:13 -07:00
Tim Abbott 925077c036 user_card_popover: Fix incorrect import after rebase.
4ee515a245 was rebased past this
function moving modules.
2023-09-28 15:34:03 -07:00
Hardik Dharmani 7721100378 bot_settings: Use same copy icon across the app.
The bot settings avatar row was using `fa-clipboard` icon. Changed
the icon to use `{{> copy_to_clipboard_svg }}` SVG icon that is used
everywhere else in the app as copy icon.
2023-09-28 15:15:57 -07:00
Hardik Dharmani 4ee515a245 user_profile_modal: Abbrevate long URLs of custom fields.
Abbreviated long URL for custom field in the user profile modal
and user card popover. Added a copy-to-clipboard icon at
the end of the URL. When hovering over the copy button, it displays
a tippy tooltip with the text `Copy URL`. Clicking the copy button
displays a `Copied` tippy tooltip for 1 second.

Fixes #21680
2023-09-28 15:15:57 -07:00
Hardik Dharmani f27adec02d refactor: Rename `custom_profile_fields_link` to use kebab-case.
This is a prep commit. This commit renames
`custom_profile_fields_link` to `custom-profile-fields-link`
to follow kebab-case, which is the preferred style in Zulip.
2023-09-28 15:15:57 -07:00
N-Shar-ma 57c0b597f5 typeahead: Allow automatic insertion/removal of bulleting/numbering.
When the user is typing a numbered / bulleted list in the compose box,
on pressing Enter the list syntax will be inserted automatically on
a new line, and removed if Enter is pressed after an empty line.

Fixes: #20305.
2023-09-28 15:05:34 -07:00
N-Shar-ma 836363b0f5 compose: Add button to format numbered lists.
A formatting button below the compose box can format the selected text
by numbering or unnumbering the selected (partially or completely)
lines. The behaviour is inspired by GitHub's bulleted list formatting.

Fixes part of: #20305.
2023-09-28 15:05:34 -07:00
N-Shar-ma 3c0a6d8ee3 compose: Add button to format bulleted lists.
A formatting button below the compose box can format the selected text
by bulleting or unbulleting the selected (partially or completely)
lines. The behaviour is inspired by how GitHub's bullet list format
button works.

Also adds a new breakpoint for showing vdots for formatting buttons.

Fixes part of: #20305.
2023-09-28 15:05:34 -07:00
Aman Agrawal 9232a45fc2 inbox: Move focused row to visible area on scroll.
This will also work for page up/down naturally.
2023-09-28 14:23:42 -07:00
Aman Agrawal d79a51b3f2 inbox: Extract is_element_visible. 2023-09-28 14:23:42 -07:00
Aman Agrawal 6f6e83d2e2 message: Remove ineffective `auto-select` class.
The internal design here was that we had no-select on the outer
element and auto-select on these inner elements to override it.

But, `auto-select` class seems to have no effect so we are
removing it.
2023-09-28 14:26:21 -05:00
Aman Agrawal 1d697c344b message_avatar: Don't allow direct selection.
Use can no longer copy the avatar directly unless starting from
somewhere outside the `recipient_row` like date divider.
2023-09-28 14:26:21 -05:00
Aman Agrawal 3838561b05 message_body: Allow sender name to be selected.
This also blocked /me messages from being selected.
2023-09-28 14:26:21 -05:00
Aman Agrawal e7a3a44e35 util: Implement is_valid_url more correctly, with tests. 2023-09-28 12:22:44 -07:00
Aman Agrawal 7b252572b0 navbar: Stop restricting max-width of org name at 1170px window width.
This was unnecessary as tested manually.
2023-09-28 09:51:47 -07:00
Aman Agrawal 29c8f6bd06 navbar: Darken navbar on hover.
This improves the contrast between navbar text and background.
2023-09-28 09:51:47 -07:00
Karl Stolley 938b4f012a left_sidebar: Limit privacy icon styles to streams list.
This fixes a regression introduced in #26807, where a padding
adjustment spilled over to the privacy icon display in message
headers.

This fix should prevent future spillover by isolating left-sidebar
stream icon styles to just the streams list.
2023-09-28 09:36:44 -07:00
Hardik Dharmani 71b915e09d unread: Fix logic for wildcard mentions in direct messages.
Wildcard mentions in direct messages were not being count as mentions
due to incorrect calculation of `is_unmuted_mention` variable in
`update_message_for_mention()` function in `unread.js`. Fixed this by
correcting the calculation of `is_unmuted_mention`.
2023-09-28 09:35:30 -07:00
Aman Agrawal f7b633f511 settings_org: Move is_valid_url to util. 2023-09-28 09:13:51 -07:00
Aman Agrawal de2b1adfe6 markdown: Combine regexes. 2023-09-28 09:13:29 -07:00
Aman Agrawal 08d1290912 popovers: Remove unnecessary removal of popover classes.
has_popover is not used anywhere.
has_emoji_popover is not used anywhere.
has_actions_popover is handled by actions popover itself.
2023-09-28 08:45:43 -07:00
Aman Agrawal ddb0d8d298 flatpickr: Use flatpickr instance instead of has_popover to track it. 2023-09-28 08:45:43 -07:00
Aman Agrawal b065cfa0c1 stream_popover: Move left sidebar function to sidebar_ui. 2023-09-28 08:41:03 -07:00
Aman Agrawal 820b564072 right_sidebar_ui: Rename to sidebar_ui. 2023-09-28 08:41:03 -07:00
Aman Agrawal 54ac09174b recent_view_table: Add a tooltip to unread sort header. 2023-09-28 08:03:47 -07:00
Hardik Dharmani 55b0b5cb96 gear_menu: Remove href="#logout" from logout button.
Remove href="#logout" from last option of gear_menu as
logout is already handled by click handler for .logout_button.

Fixes part of #22802
2023-09-27 18:01:47 -07:00
evykassirer dec49883d4 search: Close search box when searching for an empty string.
Previously clearing the search box and pressing enter would
redirect the user to All Messages. This commit changes the
behavior so that the search bar closes with no other effects.

More discussion on this on CZO here:
https://chat.zulip.org/#narrow/stream/101-design/topic/recent.20conversations.20for.20streams/near/1621501
2023-09-27 17:33:49 -07:00
Karl Stolley b6fd9c3584 left_sidebar: Better express stream-icon vertical alignment. 2023-09-27 14:06:09 -07:00
Karl Stolley a27cfa9a84 left_sidebar: Express stream row as grid. 2023-09-27 14:06:09 -07:00
Karl Stolley bbedd0ca0d left_sidebar: Restructure stream rows to match topics. 2023-09-27 14:06:09 -07:00
Karl Stolley 874bfbfd43 left_sidebar: Remove whitespace near follow icon.
Only the icons and unreads should be treated as flex items. Not
text nodes or whitespace.

See CZO discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/Left.20sidebar.20rows.20as.20grids/near/1645466
2023-09-27 14:06:09 -07:00
Karl Stolley e7814cbc46 left_sidebar: Display markers and controls as flex items.
This commit also resets a few styles that no longer make sense in
a flex setting for markers and controls.
2023-09-27 14:06:09 -07:00
Karl Stolley de88df5de8 left_sidebar: Establsh topic rows as a CSS grid.
This commit includes fixes to satsify vertical alignment, which is
now solely handled by CSS Grid. The commit also consolidates styles
and selectors for the sake of both necessity and readabilty.
2023-09-27 14:06:09 -07:00
Karl Stolley 7b6f078cfc left_sidebar: Explicitly register clickable topic areas.
This seems to more accurately express the current, desired behavior
in topics lists, but it is a necessity for moving the vdots into
the topic box (otherwise, vdots clicks simultaneously register on
the topic box itself).
2023-09-27 14:06:09 -07:00
Karl Stolley 951714b2d0 left_sidebar: Group topic markers and controls.
This also corrects a set of single quotes, on the href attribute in
the topic list-item template..
2023-09-27 14:06:09 -07:00
Karl Stolley c19c23e311 left_sidebar: Include vdots in topic box. 2023-09-27 14:06:09 -07:00
Karl Stolley 04e1d2c39d left_sidebar: Structure topic box as a div.
This helps clarify in the templates that the topic box is in fact
a box, and not an inline item (span).

Also, single quotes have been changed to doubles in li and new div
elements.
2023-09-27 14:06:09 -07:00
Aman Agrawal a11178310c navbar: Minor adjustments.
Use semi-transparent background color and few margin adjustments.
2023-09-27 13:07:57 -07:00
Aman Agrawal 54d2a02f7e footer: Minor adjustments. 2023-09-27 13:07:57 -07:00
Karl Stolley b70dc23a47 view_labels: Change 'Direct messages' to 'All direct messages'. 2023-09-27 12:48:06 -07:00
Karl Stolley 48424c4c8e navbar: Explicitly calculate offset from title and search.
A separate `margin-right:` declaration helps keep the calculation
and intention more readable.
2023-09-27 12:22:47 -07:00
Karl Stolley ad588e7441 navbar: Set search-container width in CSS vars. 2023-09-27 12:22:47 -07:00
Anders Kaseorg 83f696d217 util: Fix inefficient RegExp construction.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-27 11:33:13 -07:00
Anders Kaseorg 50a751cc23 bootstrap: Delete button JavaScript.
Commit 537617b46d (#23466) removed our
last use of .button(), and we have never used data-toggle="button".

(We are still very entangled with the Bootstrap button CSS, so that
remains for now.)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-27 11:13:45 -07:00
Tim Abbott b3c44864fa user_profile: Move show_button_spinner to correct module.
It's only used in one place, from code that we moved to
user_profile.js in recent weeks.
2023-09-27 10:41:05 -07:00
Vector73 9e9326b5df settings_users: Add "Reactivate user" option in "manage user" panel.
Fixes: #26693.
2023-09-27 10:41:05 -07:00
Tim Abbott 5177f25353 settings: Move confirm_reactivation out of settings_users.js.
This better organization may also simplify removing import cycles in
the future.
2023-09-27 10:41:05 -07:00
Evy Kassirer aa8d3a0c6c
search: Always select search bar text when initiating search.
This reverts part of cb04ae1f95 that
nobody understands the purpose of, and fixes this case.
2023-09-27 10:24:55 -07:00
N-Shar-ma 178588e5b4 documentation: Make the markdown div take up all available height.
Changing `100vh` to `100%` makes the markdown div take up the full
height of the page, even when the page is scrolled. This fixes the bug
where the lower right corner of the page was not covered by the markdown
div and the background was visible.
2023-09-27 09:43:30 -07:00
Aman Agrawal d99a8ff180 recent_view_util: Fix return type of get_key_from_message.
Since `msg.to_user_ids` is always defined when `msg.type === "private"`,
return type is just string.
2023-09-27 09:40:57 -07:00
Hardik Dharmani 6c1f993855 user_preferences: Change option text for "Show unread counts for".
This commit updates the text for a dropdown option `Unmuted streams`
to `Unmuted streams and topics` for `Show unread counts for` user
preference settings for better clarity.
2023-09-26 15:10:51 -07:00
Sahil Batra 1de3a9f4a3 bots: Extract code for showing integration url modal in new file.
This commit creates a new file integration_url_modal.js which
now contains the code for showing integration url modal.

Since show_generate_integration_url_modal is used in multiple
places, this change helps us in avoiding import cycles.
2023-09-26 09:15:20 -07:00
Sahil Batra f3c17b8d4f users: Extract code for showing deactivation modal in new file.
This commit creates a new file user_deactivation_ui.js which
now contains the code for showing deactivation modal for user
and bots.

Since confirm_deactivation and confirm_bot_deactivation functions
are used in multiple places, this change helps us in avoiding
import cycles.
2023-09-26 09:15:20 -07:00
Sahil Batra 8852c4b7af settings_data: Rename type_id_to_string to bot_type_id_to_string.
This commit renames type_id_to_string to bot_type_id_to_string
which is a much better name and explains the use of function
in a better way.
2023-09-26 09:15:20 -07:00
Aman Agrawal ede7f62781 inbox: Call update from unread_ui.update_unread_counts.
Fixes #26687

This seems work correctly after manually testing all the events
for which inbox_ui.update was previously called.
2023-09-25 13:28:13 -07:00
Aman Agrawal 61f602ed73 inbox: Sort muted streams lower than others. 2023-09-25 13:16:25 -07:00
Aman Agrawal ffb944de8e hashchange: Call hide inbox and recent view in show_default_view.
We call show_default_view in various places which didn't use to
check if the other views are hidden. This can cause multiple views
to be visible at the same time.

For example: If inbox is the default view and you press escape
from recent topics, both recent topics and inbox will be visible.
2023-09-25 13:16:25 -07:00
Aman Agrawal e0ff125116 views: Write a common show and hide function.
Fixes #26688
2023-09-25 13:16:25 -07:00
Aman Agrawal 2f7a260f3a inbox: Hide empty inbox notice when inserting a stream. 2023-09-25 13:16:25 -07:00
Aman Agrawal 4fcc488db5 inbox: Show group pms without status icons. 2023-09-25 13:16:25 -07:00
Aman Agrawal 1bd50e60ec inbox: Amend comment to clarity placement of scrollTop. 2023-09-25 13:16:25 -07:00
Aman Agrawal 386d3e7001 inbox: Fix renamed topics not rerendered correctly.
Marking a topic as resolved and then unresolved makes removes the
topic from inbox list. This was caused by previous unresolved topic
data acting as false data for the new unresolved topic.
2023-09-25 13:16:25 -07:00
Aman Agrawal 1f0ed948b4 inbox: Match margin between mention indicator and unread count. 2023-09-25 13:16:25 -07:00
Sahil Batra c7cbdd3741 custom_fields: Extract some code in custom_profile_fields_ui.js.
This commit moves initialize_custom_pronouns_type_fields,
initialize_custom_user_type_fields, initialize_custom_date_type_fields
and append_custom_profile_fields functions to the new file
custom_profile_fields_ui.js from settings_account.js since
they are used for both showing custom profile fields in
"Profile" settings panel and "Edit user" form shown in
user profile modal. This change also helps us in avoiding
import cycles.
2023-09-25 13:14:49 -07:00
Sahil Batra 749af058a4 settings_users: Move show_edit_user_info_modal to user_profile.js.
Since the user-edit form is opened inside user profile modal,
user_profile.js is a better place for show_edit_user_info_modal
function and would help us in removing import cycles as well.
2023-09-25 13:14:49 -07:00
Sahil Batra f0a265c363 settings_bots: Move show_edit_bot_info_modal to user_profile.js.
Since the bot-edit form is opened inside user profile modal,
user_profile.js is a better place for show_edit_bot_info_modal
function and would help us in removing import cycles as well.
2023-09-25 13:14:49 -07:00
Sahil Batra 46ab3031a3 settings_bots: Move type_id_to_string to settings_data.js. 2023-09-25 13:14:49 -07:00
Prakhar Pratyush 8df42a729d message_header: Remove the widget to change the visibility policy.
This commit removes the widget to change the visibility policy
for topics in unsubscribed streams.

Earlier, users were able to change the visibility policy in an
unsubscribed stream, which can lead to confusion.

For example, a person might think that they would get notifications
about new messages in the topic of the unsubscribed stream,
which of course they wouldn't.
2023-09-25 12:39:06 -07:00
Prakhar Pratyush e1d867c05e unread_msgs: Fix the unread count in muted streams.
In the muted stream, the unreads from followed topics were not
adding up to the total unread count of the stream if both unmuted
and followed topics had unreads.

This commit fixes the incorrect behavior.
2023-09-25 11:43:21 -07:00
Anders Kaseorg 6d5a25170a help: Restore scroll target styling.
This restores the styling previously added by commit
ceec61ba10 (#25573).  The .scroll-target
class of commit b852da6eed (#25573) was
removed by commit 8dba4cbba6 (#15713,
merged later) and is unnecessary.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-25 11:42:04 -07:00
Tim Abbott 7585f87c64 css: Remove dark theme overrides for removed Bootstrap CSS. 2023-09-25 06:29:47 -07:00
Tim Abbott 872f2c6f85 bootstrap: Remove most now-unused popovers/tooltip CSS.
What remains needs to be audited as we appear to still declare some of
those classes.
2023-09-25 06:29:47 -07:00
Tim Abbott 1664b06926 bootstrap: Remove duplicate copy of popover/tooltip CSS.
The copy we've been actually using is the one in the separate
bootstrap-tooltip.css file.
2023-09-25 06:29:47 -07:00
Tim Abbott c0708a892a bootstrap: Remove tooltip/popovers JS modules.
Apparently, we had two copies -- the one in bootstrap.js being
overridden by the one in the separate module.

We can't yet remove all the CSS, since some of it appears to still be
in use in some of the popovers.
2023-09-25 06:29:47 -07:00
Tim Abbott 35bc34186e popovers: Remove tracking for Boostrap popovers.
In theory we no longer have any of these.
2023-09-25 06:29:47 -07:00
Tim Abbott 3397627a28 popovers: Move initialize logic to popover_menus.js. 2023-09-25 06:29:47 -07:00
Tim Abbott 573c77a9eb popovers: Move scroll handler to popover_menus module.
Part of cleaning out the original legacy popovers system.
2023-09-25 06:29:47 -07:00
Tim Abbott eb26dc6ecd popovers: Move keyboard UI functions to modern module. 2023-09-25 06:29:47 -07:00
Tim Abbott 8eba95e556 popovers: Move manage menu hackery to user_card_popover.
This helps localize the logic to where it's used, simplifies the main
function, and helps with fixing some import cycles.
2023-09-25 06:29:47 -07:00
Tim Abbott c379d0bad6 right_sidebar_ui: Extract new module.
This UI is not actually a popover, and so there is no need for it to
live in popovers.js.
2023-09-25 06:29:47 -07:00
Daniil Fadeev 8de397b37f user_card_popover: Migrate all user card popovers to Tippy. 2023-09-25 06:29:47 -07:00
Tim Abbott 10400f15d6 tests: Delete user_card_popover test.
This test did extensive mocking and didn't feel like it either fully
tested the module or did a good job of testing the logic; and will
break with the migration to tippy. I think it's better to remove the
test and plan to write a new one testing just
get_user_card_popover_data, the actual interesting part for node tests
of this module.
2023-09-25 06:29:47 -07:00
Daniil Fadeev c961ff2665 recent_view_ui: Change event target to avoid Tippy collision.
We can't use Tippy for both popover and tooltip on the same HTML
element. This change will prevent such issues in the future.
2023-09-25 06:29:47 -07:00
Tim Abbott 1a89d49aba people: Add direct coverage of unknown user case. 2023-09-25 06:29:47 -07:00
Tim Abbott 454b3542ec tests: Rename unknown_user in people tests. 2023-09-25 06:29:47 -07:00
Aman Agrawal bdf6b210b8 copied_tooltip: Remove tippyjs import cycle by extracting it.
Moving show_copied_confirmation to a new library breaks the
dependency cycle of popover_menus and tippyjs.
2023-09-24 15:16:27 -07:00
Tim Abbott 458a0b3f3a user_groups: Move can_edit to settings_data module.
This fixes an import cycle.
2023-09-22 17:46:45 -07:00
Tim Abbott 3edf347f89 user_group_edit: Fix a live-update import cycle. 2023-09-22 17:46:45 -07:00
Prakhar Pratyush f8f9a800e6 navbar_alerts: Improve info for users having at least 50K unreads.
This commit improves the alert message to clearly state that
"You have at least 50,000 unread messages."

In the other case, i.e., when unread_msgs_count > 500 and the user
hasn't read the messages for more than 2 days, the alert message
states,"You have {unread_msgs_count} unread messages."

Fixes #17469.
2023-09-22 17:18:49 -07:00
Tim Abbott 1c1d31deec hotspots: Move compute_placement to only module using it.
Previously, this function was used by other bootstrap popovers, but
such popovers have all been migrated to Tippy.

Hotspots uses some of that machinery but I think doesn't actually use
the Bootstrap popovers system.
2023-09-22 17:17:16 -07:00
Anders Kaseorg d6884399b2 invite: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 17:10:51 -07:00
Anders Kaseorg eefd7feafa global: Specialize jQuery .val() for elements with known value types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 17:10:51 -07:00
Anders Kaseorg 06e8d1fb16 popovers: Remove click handler for .flatpickr-calendar.
It exists to prevent the $(document) click handler from seeing the
event and closing the compose box, but we could also just not close
the compose box.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 17:08:17 -07:00
Anders Kaseorg 35568ec4d6 flatpickr: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 17:08:17 -07:00
Anders Kaseorg 21edae876e Revert "markdown: Fix 3+ digit marker lists retaining alignment for 2 digits."
This reverts commit d899c03da6 (#25094).
It broke the display of list items with inline formatting.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 15:23:29 -07:00
evykassirer 30c6b26f3b stream view: Show "start a conversation" for a topic with no messages.
Previously we showed "no search results".

CZO conversation:
https://chat.zulip.org/#narrow/stream/9-issues/topic/.22no.20search.20results.22.20in.20topic.20view/near/1637289
2023-09-22 11:42:24 -07:00
Sahil Batra 4fb5dee5a4 settings: Fix live-update bug when changing user names.
When changing name of users, the name was updated corectly
in the "Users", "Deactivated users" and "Bots" list but
it removed the "<a>" element, used to open the user
popover, and instead changed it to plain text.

This commit updates the code to just update the text inside
"<a>" tag so that the popover can still be opened by clicking
on the name.
2023-09-22 09:58:29 -07:00
N-Shar-ma db86a2e79b typeahead: Improve tests for multi word match's highlighting.
We refactor the tests to check if a multi word query's result is
correctly highlighted (multi word highlighting fixed in
e2c23b656e).

The test case was already present, but the setup was not correct, and
has been corrected now to safeguard against regression in the future.
2023-09-22 09:58:04 -07:00
evykassirer 356c16553e search: Move search code from message_view_header to search.js. 2023-09-22 09:55:50 -07:00
Anders Kaseorg c2c0429dd1 markdown_config: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 09:32:21 -07:00
Anders Kaseorg fcb212721a list_cursor: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 09:31:24 -07:00
Anders Kaseorg fb765bd057
stream_pill: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 09:30:23 -07:00
Anders Kaseorg f3fc0c8c7a recent_view_data: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 09:29:03 -07:00
Anders Kaseorg 1128752bd0 compose_fade_users: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 09:26:58 -07:00
Anders Kaseorg 6653788937 compose_fade_users: Prefix jQuery object variables with $.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 09:26:58 -07:00
Anders Kaseorg 0dd24ed295 compose_fade_helper: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 09:26:58 -07:00
Anders Kaseorg 5cc65dd3c2 types: Use TypeScript unions for message types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-22 09:26:58 -07:00
Hemant Umre f731602024 org_settings: Add frontend support for `realm_jitsi_server_url`.
This commit adds a dropdown and custom input element to set the
`realm_jitsi_server_url` when the video call provider is Jitsi. This
allows organization administrators to add a custom Jitsi server as the
organization's video call provider.

Fixes #17914.

Co-authored-by: Gaurav Pandey <gauravguitarrocks@gmail.com>
2023-09-21 17:39:10 -07:00
Hemant Umre cb0aaa5197 settings_org: Move video chat provider from update_dependent_subsettings.
Since `settings_org.update_dependent_subsettings` handles settings whose
value and state depend on other elements and video chat provider settings
is an independent setting moving it out of update_dependent_subsettings.
2023-09-21 17:39:10 -07:00
Hemant Umre 8b92999d69 compose: Refactor the condition to show the audio call button.
Added `page_params.jitsi_server_url`: since we allow the Jitsi Meet
server URL to be set as `None`.
2023-09-21 17:39:10 -07:00
Tim Abbott 12dd6c44a2 puppeteer: Remove flaky default streams test.
This test has been flaking for a couple months, and it hasn't felt
worth it for anyone to debug, so we should disable or delete it.

I chose deletion, since I don't think this settings panel is a
high-value place for end-to-end testing.
2023-09-21 17:34:56 -07:00
Karl Stolley be4d4085f2 emoji: Display status emoji as flexbox in settings.
This does not adjust any of the padding from a float-based era.
It's entirely possible that the status-preview area especially
deserves some further tuning.
2023-09-21 17:18:47 -07:00
Karl Stolley 55e43b6926 settings: Display radio choice label as flexbox. 2023-09-21 17:18:47 -07:00
Karl Stolley 2c3a276753 settings: Uniformly structure username and status emoji. 2023-09-21 17:18:47 -07:00
Karl Stolley 9e2006a321 emoji: Display status emoji as flexboxes in status modal. 2023-09-21 17:18:47 -07:00
Karl Stolley 896a768038 unreads: Hide empty unread count pill. 2023-09-21 17:18:47 -07:00
Karl Stolley fbfc72cb05 emoji: Display status emoji as inline-flex in sender row.
With no existing class to reach this selector, this change
introduces a new `.inline-status-emoji` class on the Handlebars
template and in the main Zulip CSS file.

Because of the inline styling in the message sender row, this
specific instance of a status emoji needs to be presented as
an inline flex: that keeps the avatar image layout clean, while
also introducing the `align-self: center` vertical positioning
of the status emoji adjacent the username, which is itself a
bare text node.
2023-09-21 17:18:47 -07:00
Karl Stolley 5df7330d2c emoji: Display status emoji as flexboxes in DM list. 2023-09-21 17:18:47 -07:00
Karl Stolley b147440c43 emoji: Display status emoji as flexboxes in pills. 2023-09-21 17:18:47 -07:00
Karl Stolley cbb0cb9a73 css: Move inline emoji styles under rendered markdown.
This change paves the way to update how actual status emoji are
presented in sidebars, pills, etc., care of flexboxes, which
is previewed here by the inclusion of the `align-self` property.
2023-09-21 17:18:47 -07:00
Tim Abbott c12c2dcfd0 compose: Fix missing audio call button.
This was removed in a misresolved merge conflict in
82ca794f94.

Also added the wrapper elements from
953f026487 to ensure preview works.
2023-09-21 17:12:31 -07:00
Aman Agrawal 0e5c6ec5b9 inbox: Fix inbox scrolled to top when returning from other narrows.
This has to do with narrows and inbox view sharing the same
scrolling container.
2023-09-21 16:50:01 -07:00
Aman Agrawal 6411dbe124 inbox: Allow user to escape out of empty inbox list.
Now pressing escape would work to set focus out of inbox if inbox
is empty.
2023-09-21 16:50:01 -07:00
Aman Agrawal 274eac3313 hotkey: Fix incorrect input to inbox change focus function.
inbox_ui.change_focused_element takes only 1 input.
2023-09-21 16:50:01 -07:00
Aman Agrawal f07a032b79 inbox: Add button to open stream popover in stream header. 2023-09-21 16:50:01 -07:00
Aman Agrawal 518dcb2ad1 inbox: Make topic actions menu accessible via keyboard. 2023-09-21 16:50:01 -07:00
Aman Agrawal 97a1b91b40 inbox: Add button to open topic menu popover. 2023-09-21 16:50:01 -07:00
Aman Agrawal a904de2d6e inbox: Only scroll to focused row when using keyboard to navigate.
Fixes #26780

This prevents inbox from suddenly scrolling when inbox view is
updated.
2023-09-21 16:50:01 -07:00
Aman Agrawal 425ab4ca13 inbox: Show unread mention indicator for topics and streams.
Fixes #26747
2023-09-21 16:50:01 -07:00
Aman Agrawal 53f6041dd5 inbox: Extract function to update stream data. 2023-09-21 16:50:01 -07:00
Aman Agrawal 35f7bf68ee inbox: Calculate unread count of headers based on active filters.
Fixes #26773

Now unread count of header is a sum of non hidden topics / DMs
unread count.
2023-09-21 16:50:01 -07:00
Joelute 25841ad852 compose: Update text on warning banner when user is not allow to dm.
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: #21896.
2023-09-21 16:24:15 -07:00
Joelute f8f5196c75 compose: Allow the user to direct message bots despite of policy.
After the changes in #25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: #21896.
2023-09-21 16:24:15 -07:00
Aman Agrawal dc62e31d1f message_scroll: Update sticky header date more frequently.
To make the date change in recipient header more smooth, we
update it with throttled scroll event. This can cause some
performance regressions on slow computers during scrolling but
nothing I can notice even with 6x CPU slowdown on Intel i7 on mac.

This is an alternative to #25163 since implementing it seems harder
than expected. The date changing animation cannot be made smooth without
serious structural changes to how messages are rendered.
2023-09-21 16:17:47 -07:00
Zixuan James Li d3e4456562 linkifiers: Use only the handle for dragging.
So that the user can still select and copy text from the body of the
linkifier rows. It might be helpful if we extend this behavior to other
draggable rows, like those for custom profile fields settings.

Fixes #26798
2023-09-21 15:27:16 -07:00
Daniil Fadeev 472ef3d890 user_card_popover: Remove redundant `userlist_placement` variable. 2023-09-21 11:25:18 -07:00
Daniil Fadeev f609bc1f21 user_card_popover: Move sidebar popover logic to its own function. 2023-09-21 11:25:18 -07:00
Daniil Fadeev dcb3db37ce user_card_popover: Stop exporting functions that shouldn't be.
These functions aren't used outside the user_card_popover module, so
we shouldn't export them.
2023-09-21 11:25:18 -07:00
N-Shar-ma c1741e94d2 typeahead: Allow highlighting across multiple words for user names.
`make_query_highlighter` called `highlight_with_escaping_and_regex`
once for each word in the phrase, due to which only 1 word searches
could be highlighted. For example searching for `two wo` resulted
in no highlighting at all in `two words`.

One call per word in the phrase was also redundant since the called
function can handle a multi word query. So now the entire phrase is
passed to the called function just once.
2023-09-21 11:24:13 -07:00
N-Shar-ma c3c8bad0de typeahead: Highlight only matching word prefixes in search suggestions.
Earlier mid word parts matching with the search query were also
highlighted (made bold), but since actual matching for showing search
suggestions is based on prefix matching, this highlighting logic is
now made to be in sync with the search suggestions matching logic.
2023-09-21 11:24:13 -07:00
N-Shar-ma d899c03da6 markdown: Fix 3+ digit marker lists retaining alignment for 2 digits.
Until now, lists with 3+ digit markers would have their beginnings cut
off to align with 2 digit markers. We fix that by having custom styling
for markers where we align markers only up to 2 digits, and let larger
numbers take up more space pushing the list item content forward as
required to fit the marker. Works for multiline and nested list items too.
2023-09-21 10:51:22 -07:00
evykassirer ebdcbc28f6 search: Wrap long search suggestions.
CZO conversation: https://chat.zulip.org/#narrow/stream/101-design/topic/long.20search.20suggestions

This commit also changes some styling for the pills,
to ensure that they are properly aligned when search
results wrap.
2023-09-21 08:58:31 -07:00
evykassirer da72c9069c search: Rename class to search-input to avoid bootstrap.
The class `search-query` is a bootstrap classname, and using
a name unique from that both lets us rely on bootstrap less
and also not have to override some boostrap styles.
2023-09-21 08:58:31 -07:00
evykassirer 3e089c7ac6 search: Remove extra filter check before closing search.
Existing callsites to `close_search_bar_and_open_narrow_description`
already do this filter check, so this is extra and unnecessary.
Doing the check always before calling this function probably
makes more sense given the name of the function sounding like
it always takes action.
2023-09-21 08:58:31 -07:00
YashRE42 cb04ae1f95 search: Redesign search box.
Fixes #21798.
2023-09-21 08:58:31 -07:00
evykassirer ea619ff75f message basics e2e: Add expect_home in two places to match other tests. 2023-09-21 08:58:31 -07:00
evykassirer 62b31e8b01 search: Close search bar when typeahead closes with no search input.
Currently the search bar doesn't close when you e.g. click outside
of the search input field. In the new design we do we want the search
bar to close on most blur events. Instead of setting up a new blur
handler, this commit checks if the search bar should be unexpanded
any time the typeahead is hidden (which does usually happen on blur).
2023-09-21 08:58:31 -07:00
evykassirer 63c424c5bc typeahead: Ignore blurs that change focus within the `parentElement`. 2023-09-21 08:58:31 -07:00
evykassirer c4ff1a1158 typeahead: Add option for tab to not have enter functionality. 2023-09-21 08:58:31 -07:00
evykassirer b5b671c360 typeahead: Add closeInputFieldOnHide callback from hide().
This commit adds a function to make it easier to close
the search bar consistently in any siuation where the
typeahead closes, to avoid being in broken middle states.
2023-09-21 08:58:31 -07:00
evykassirer d43d8ba127 typeahead: Add openInputFieldOnKeyUp option. 2023-09-21 08:58:31 -07:00
Philip Durbin 47288c7d79
settings: link to list of emoticon translations.
Under "Emoji" under "Preferences", we link to the rules explaining
what emoticons exist, e.g., :) translates to 😄, etc.

These docs: https://zulip.com/help/configure-emoticon-translations

Fixes #18147.
2023-09-21 08:46:29 -07:00
Daniil Fadeev bb58fecf28 user_card_popover: Fix keyboard navigation opening manage menu.
`focus_first_popover_item` was executed right after the click handler
 had asked to open the popover, but before the popover was mounted to
 the DOM, causing the popover to not work correctly when opened via
 the keyboard.
2023-09-21 00:29:43 -07:00
Daniil Fadeev 0ab788c9c9 user_card_popover: Migrate "Manage menu" popover to Tippy.
Fixes part of #23632.
2023-09-21 00:29:43 -07:00
Daniil Fadeev 732a1403e1 user_card_popover: Create an API for `user_card_popover` module.
This API will serve as the primary entry point for the
`user_card_popover` module. It will help to control and check the
state of all the popovers in this module.
2023-09-21 00:29:43 -07:00
Daniil Fadeev cda95b0485 user_card_popover: Fix "Manage Menu" popover focus on the second item. 2023-09-21 00:29:43 -07:00
Daniil Fadeev f3938acc71 user_card_popover: Fix blueslip error messages. 2023-09-21 00:29:43 -07:00
Anders Kaseorg 487d61caf5 tests: Fix direct mutation of ES modules again.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-20 22:08:20 -07:00
Satyam Bansal 9cde3abd4d bot-settings: Add modal to generate Integration URL.
Fixes part of #25976.
2023-09-20 17:49:51 -07:00
Sahil Batra bd631c4424 group_settings: Sort groups list by name. 2023-09-20 15:40:11 -07:00
Sahil Batra 00424748f4 settings: Disable submit button when no input is changed.
We now disable the submit button if no input is changed
in modals used for editing name and descriptions of
stream and user groups. The button is enabled if any
value is changed.
2023-09-20 15:40:11 -07:00
Sahil Batra a37c91e5f9 group_settings: Use tippy-zulip-delayed-tooltip for buttons.
This fixes an issue where the "Change group info" and "Delete group"
buttons would display a tooltip immediately upon closing the modal
opened by clicking on them.
2023-09-20 15:40:11 -07:00
Sahil Batra 107ebc140b group_settings: Show "not-allowed" cursor when not allowed to add users.
This commit adds code to show the "not-allowed" cursor when hovering over
pill input in "Add members" section if a user is not allowed to add members
to the group like we do for "Add subscribers" section in stream settings.
Previously the "not-allowed" cursor was show only when hovering over "Add"
button.
2023-09-20 15:40:11 -07:00
Sahil Batra f6d3b2667f user_group_creation: Add simplebar to user group creation form.
This commit adds simplebar to user group creation form and makes
it consistent with stream creation form.

This also fixes transparency issue in footer of group creation
form dark theme.

Fixes #24443.
2023-09-20 15:40:11 -07:00
Sahil Batra 5a6a8a63e1 group_settings: Fix placeholder in pill input for members.
This commit fixes placeholder text in the pill input for user
group members UI in "#groups" overlay to mention members instead
of subscribers. For this we add a new template instead of using
add_subscribers_form.hbs and thus this commit also updates
the class names used in javascript code accordingly.
2023-09-20 15:40:11 -07:00
Sahil Batra c4ba7699bd groups_settings: Fix placeholder in search input for members list.
This commit updates placeholder for search input in user group
members list to be "Filter members" instead of "Filter subscribers".
2023-09-20 15:40:11 -07:00
Sahil Batra 8dba149364 group_settings: Fix messages shown when adding users to a group.
This commit fixes the messages shown when adding users to a group
to use "add" instead of "subscribe".

Fixes part of #24443.
2023-09-20 15:40:11 -07:00
Sahil Batra a3124ddcb3 settings: Rename search-container class.
This commit renames search-container class used in stream and
user group settings overlay to list-toggler-container since
the element does not contain search UI and instead contains
the toggler for "Subscribed" and "All streams" and similarly
for "Your groups" and "All groups".
2023-09-20 15:40:11 -07:00
Sahil Batra 5518a0073e group_settings: Show loading spinner in group edit modal.
This commit adds code to show loading spinner on clicking
submit such that modal does not closes before the request
succeeds and error, if any, is shown inside the modal.

And as a result we remove the saving indicator and "Saved"
message which was shown on request completing successfully
but it should be fine as we already have this behavior for
stream settings.
2023-09-20 15:35:26 -07:00
Karl Stolley 301e1c07b8 left_sidebar: Hold hoverable area to + icon.
This shifts the 8px of margin to the wrapper, preserving the space
to the right of the + icon, but no longer allowing it to shift the
hover state or trigger the tooltip when clicking actually activates
the search filter.

Fixes #11494 (at least the one fixable part; the rest should be
closed as wontfix)
2023-09-20 15:31:41 -07:00
Karl Stolley 6d0c2c6a57 message_feed: Alot controls-column space to forms in edit/source view.
See CZO discussion:
https://chat.zulip.org/#narrow/stream/101-design/topic/adjusting.20the.20message-edit.20form/near/1643675
2023-09-20 15:29:57 -07:00
Karl Stolley 75293feefb message_feed: Size mobile controls to icon widths.
This causes no visual changes, but it makes the grid definitions
more precise, while also reflecting that only two hover icons are
ever shown at mobile scales.
2023-09-20 15:29:57 -07:00
Karl Stolley adec143680 message_feed: Prevent blowouts on mobile message grids. 2023-09-20 15:29:57 -07:00
Karl Stolley 81c31e40b8 message_feed: Remove duplicate and unnecssary controls styles. 2023-09-20 15:29:57 -07:00