Commit Graph

248 Commits

Author SHA1 Message Date
Joelute ccdbdb35b2 unread_banner: Refactor HTML to use main view banner stylings.
Previously, the HTML structure of unread banners continued to utilize the
old stylings. We are currently in the process of simplifing both the
compose banner and unread banner stylings into one. These change will
update the HTML structure to be the same as the compose banner and use
the new stylings.
2023-06-09 11:31:51 -07:00
Joelute 00add94045 compose_banner: Rename classnames to main-view-banner.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner
to main-view-banner.
2023-06-09 11:31:51 -07:00
Joelute f5a21d0e47 compose_banner: Update classnames to main-view-banner-action-button.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner_action_button
to main-view-banner-action-button.
2023-06-09 11:31:51 -07:00
Joelute 80ace5c789 compose_banner: Update classnames to main-view-banner-close-button.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner_close_button
to main-view-banner-close-button.
2023-06-09 11:31:51 -07:00
evykassirer d0c1668399 navbar: Remove top_navbar_full_width now that scrollbar is on html. 2023-06-07 16:54:58 -07:00
Alexander Colloredo-Mansfeld 437b2747b1 settings: Remove id column from tables in stream and group settings.
Fixes part of #25483.
2023-06-07 12:01:26 -07:00
acolloredo 1fc59288b9 settings: Remove id column from user and deactivated user lists.
Fixes part of #25483.
2023-06-07 12:01:18 -07:00
acolloredo 66bc0c95cb settings: Remove id column from subscriber list.
Fixes part of #25483.
2023-06-07 12:01:08 -07:00
evykassirer aa270bcef0 search: Remove support for experimental search pills.
This in-progress feature was started in 2018 and hasn't
been worked on much since. It's already in a broken state,
which makes it hard to iterate on the existing search bar
since it's hard to know how those changes will affect search
pills.

We do still want to add search pills eventually, and when
we work on that, we can refer to this diff to readd the
changes back.
2023-06-06 18:36:02 -07:00
Akarsh Jain e20e7482ca invite: Restructure "Invite user" modal for improved user experience.
This commit revamps the invite type section of the "Invite user" modal
to provide a more intuitive user experience. The section now includes a
radio button option with two choices: "Send an email" and "Generate an
invite link." The email input box is hidden when the "Generate an invite
link" option is selected.

Fixes #24692.
2023-06-06 17:48:29 -07:00
Anders Kaseorg 3ca131743b CVE-2023-33186: Fix topic tooltip cross-site scripting vulnerability.
Commit 903dbda79b (#25370) introduced a
cross-site scripting vulnerability in the tooltips for the stream and
topic in the recipient bar.  An attacker who can send messages could
maliciously craft a topic for the message, such that a victim who
hovers the tooltip for that topic in their message feed triggers
execution of JavaScript code controlled by the attacker.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-05-29 16:35:49 -07:00
Aman Agrawal ecc1433d02 compose_recipient: Improve post recipient selection behaviour.
This moves selection of the correct input box / textarea to
a `on_hidden_callback` of dropdown widget, which also allows us
to just simplify `on_compose_select_recipient_update` to only
call `switch_message_type` when necessary so that it doesn't
interfere with setting focus.
2023-05-29 08:59:18 -07:00
Sahil Batra 4724d45abd settings: Rename "Full name" label to "Name" in bot modals.
This commit renames "Full name" label to "Name" in bot creation
and bot edit modal.
2023-05-29 08:47:09 -07:00
Alya Abbott c97deb6be2 help: Tweak docs on keyboard shortcuts for composing messages.
- Adjust the order in keyboard shortucts help menu and help center.
- Make minor wording improvements.
2023-05-28 19:18:34 -07:00
Aman Agrawal 61f7ede43c hashchange: Never set empty hash `#` in URL.
Setting empty hash `#` scrolls user to the top of message feed if
done via `window.location.hash` or using browser back / forward button.

To avoid this, we set don't set `hash` after org URL for default view
when user uses `escape` key or clicks on org logo.

In other situations, we explicitly set the hash of the view.
2023-05-26 16:28:45 -07:00
Josh Yap 6b77499286 settings: Link to user card in new stream/group tables.
When creating new streams or groups, open up user card when
a user's name is clicked on. This behavior now matches
other settings tables elsewhere.

Fixes #25725.
2023-05-26 09:55:01 -07:00
Karl Stolley 42e0d72b67 compose_box: Maintain consistent dropdown height.
This commit keeps the height of the dropdown consistent, even when
it's adjacent a multiline collection of pills in a group DM.

It also keeps the righthand buttons and narrows top-aligned, too.

Additional markup and CSS ensures that the < marker always stays
vertically centered with respect to the dropdown.
2023-05-25 17:19:29 -07:00
Aman Agrawal a78dc4a2bd css: Scroll on `html` instead of `.app`. 2023-05-24 15:43:19 -07:00
Lalit 888d6d8037 settings_playground: Fix sorting issues in playgrounds table.
Removed the sorting functions which were sorting under the assumption that
our comparison items were a list instead I used the generic sort functions
functionality of our `list_widget` module.
2023-05-22 09:36:24 -07:00
Akarsh Jain 12db83b011 help: Open Help Center links in new tab for empty message lists.
This commit updates the Help Center links in all relevant empty message
list views to open in a new tab by default. This prevents users from being
navigated away from the app.

Fixes #25337.
2023-05-19 13:51:00 -07:00
Aman Agrawal 9aa9f9b3c8 message: Separate unread marker of date_row from message.
This allows us to easily disable unread marker for date row of
the first unread message without producing any bugs.
2023-05-19 13:48:16 -07:00
Trident Pancake 6fb16f3598 message_edit: Disable save btn after edit time limit
Fixes #25413.

The old code was disabling the save button wrong by using
`.addClass("disabled")` instead of `prop()`.

Added tooltip for the disabled save button as per issue #25413 and changed
"Times up!" color to red.

The textbox readonly logic was changed to no longer becoming readonly. Reason
being there are edge cases involving the compose buttons such that simply
marking the textbox as readonly is not sufficient.

E.g. using the compose buttons after readonly still modifies the content.

One solution might be to just hide the compose buttons visually. However, there
are edge cases for that too. If preview mode was previously active, then
perhaps that state needs to be reverted. If any modal is open, such as the emoji
picker, then that needs to be closed. Solving these edge cases doesn't
improve the user experience. Keeping the textbox editable allows an easier way
for user to copy the text and don't have weird cases.
2023-05-16 15:59:29 -07:00
Trident Pancake b1c801847b message_edit: Remove redundant is_editable check 2023-05-16 15:59:29 -07:00
Alex Vandiver 4a43856ba7 realm_export: Do not assume null extra_data is special.
Fixes: #20197.
2023-05-16 14:05:01 -07:00
Karl Stolley 386d87635e popovers: Shorten 'Quote or reply' label.
This removes the previous "or forward" text from the message
actions popover, and keeps the documentation in sync with the
new text. Internationalization tests are updated, too.

Fixes #25603.
2023-05-16 12:36:29 -07:00
Josh Yap 231888b5a5 popovers: Add keyboard shortcut to emoji reaction menu item.
Fixes #25602.
2023-05-16 10:53:54 -07:00
Joelute 584b11af2d unread_banner: Apply updated design to message feed banners.
In #22524, we have updated the compose banner to the new, updated design
while the unread banners have remained the same. When comparing them side
by side, they look rather old and outdated. We should apply the updated
design to the unread banners as well.

Fixes: #25551.
2023-05-15 15:59:12 -07:00
Joelute d556b73084 unread_banner: Update HTML of unread banners to use zulip icons.
Previously, the close buttons on the unread banners used "x" as the icon.
This unfortunately doesn't scale well as we increase the font-size. To fix
this, we should update the button to use zulip icons instead of a character
as the button.
2023-05-15 15:59:12 -07:00
Daniil Fadeev fa112adcb7 send_late: Change the class `send_later_options` to an id.
It will be easier to locate the send later options in different code
 paths with the id.
2023-05-15 14:52:06 -07:00
Daniil Fadeev f2e627ba51 drafts: Move code handling keyboard navigation to a separate module.
The keyboard navigation that used to only work in drafts can now be
reused. This commit has moved the related functions to a separate
module.
2023-05-15 14:46:21 -07:00
Aman Agrawal ae02a93d35 scheduled_message: Change tooltip of failure icon. 2023-05-15 14:43:04 -07:00
Aman Agrawal 1bffdda59f scheduled_message_overlay: Add a failed delivery indicator.
Fixes #25501
2023-05-14 16:46:20 -07:00
Aman Agrawal 06cbe95583 scheduled_message: Extract common elements into a separate file. 2023-05-14 16:46:20 -07:00
Satyam Bansal fad5c88aa9 select_recipient_widget: Use "button" tag instead of "div".
Previously, hovering over the stream selector in the
compose box would show a mouse/text pointer instead
of a hand pointer.

Fixes #25592.
2023-05-14 16:35:48 -07:00
Ujjawal Modi fc22b86eb6 streams: Correctly disable adding subscribers while creating streams.
This commit disables the field used for adding other subscribers
in stream creation box for users who are not allowed to add
other users to streams because of realm level setting
"Who can add users to  streams".

Fixes #24900.
2023-05-14 11:19:41 -07:00
Aman Agrawal f66dde4a33 left_sidebar: Move tooltips to the `focus` element.
Since tippy relies on the `blur` event of `target` to hide
the toolips, it is important that the tooltip is triggered
by the element that receives that focus in keyboard navigation which
is `a` tag for left sidebar elements.
2023-05-12 17:35:52 -07:00
Hardik Dharmani 0738dfd126 edit_bot_modal: Keep Save Changes button disable until changes are made.
Use update_submit_disabled_state_on_change parameter of dialog_widget
instead of setting up input handlers in show_edit_bot_info_modal.

Added new hidden input field to store value of current selected option
in edit_bot_form.hbs whose value is updated by item_click_callback
function of in settings_bots.js.

Also, called $(".edit_bot_avatar_file_input").trigger("input") on
clearing avatar so input event handler gets called and compare the
values to disable the submit button again.

Fixes #24568
2023-05-12 11:30:50 -07:00
Hardik Dharmani ede1e547ee stream_settings: Fix bugs with #stream-creation .modal-footer.
This commit addresses `#stream-creation .modal-footer` becoming
transparent after an error in creating a stream due to overlapping
with `.stream-creation-body`. Instead of adding data-simplebar on
.stream-creation-body, added it to a new div
`stream-creation-simplebar-container` which contains 3 divs:
stream_create_info,stream_creating_indicator and stream-creation-body.

Additionally, fixed the border-radius of the modal footer on the
bottom left side for device width > $md_min.

Fixes #25526
2023-05-11 15:50:56 -07:00
Lalit 577c150ffa compose: Open send later modal when user accepts the warning on scheduling message.
When the user has a wildcard @-mention we show a warning if the stream has more than
15 members. When the user clicks "Yes, schedule" and confirms the intend to schedule
the message we open the send later modal to let user choose scheduling time.

Fixes #25426.
2023-05-10 17:54:28 -07:00
Daniil Fadeev 45c3f8aa96 send_later: Extract send later options to separate template.
This is a preparatory commit that will help to render the options
for the send-later modal separately. This is necessary to have
actual sending options if the user keeps the modal open.
2023-05-10 16:14:10 -07:00
Aman Agrawal 012f91eaba dropdown_widget: Show "No search results" instead of an empty list. 2023-05-10 12:00:18 -07:00
Sahil Batra 0ec16407ba invite: Add checkbox to select all default streams.
We now add a checkbox in "Steams they should join" to directly
select all default streams in the realm for the invite.
We hide the stream list if that option is selected.
2023-05-09 17:05:18 -07:00
evykassirer c578a38423 navbar: Widen navbar to fill the full screen on large screens.
Now that the navbar is a different color, we want it to also
take up the full width of the screen. Because the navbar has
margin, this commit adds a new div. To not have to add a new
div, the scrollbar would need to be moved to the `html`
element, which is a bigger project.

This commit also moves the zulip logo to be left-justified instead
of centered, since it looks strange centered with the full
width navbar.
2023-05-09 16:25:28 -07:00
Aman Agrawal d64ad8653b edit_bot_form: Use new tippy dropdown for selecting bot owner. 2023-05-09 14:11:26 -07:00
Aman Agrawal 8ea59f7f02 compose: Use tippy for stream select dropdown.
Fixes #25434
2023-05-09 14:11:26 -07:00
Aman Agrawal a196b949f7 dropdown_widget: Implement dropdown widget using tippy.
This will soon replace DropdownListWidget.
2023-05-09 14:11:26 -07:00
Hardik Dharmani cfbcbe901a topic_edit: Rename `inline_topic_edit` to `move_messages_edit_topic`.
In move_topic modal, Renamed inline_topic_edit to
move_messages_edit_topic to be more specific selector as
inline_topic_edit is also used in message header.

Additionally, Removed id inline_topic_edit as it was only used
in zulip.css instead used `.inline_topic_edit` selector as that
element also have class with same name inline_topic_edit.

Fixes #24805
2023-05-09 13:51:07 -07:00
Hardik Dharmani 697cdb31e5 message_headers: Abbrevate direct message recipient names.
Abbrevated DM recipient names in message feeds, Drafts and Scheduled
messages overlays by wrapping recipient names in span with class
private_message_header_name and applying `overflow: hidden` and
`text-overflow: ellipsis` CSS to it.

Fixes #25353
2023-05-09 13:43:40 -07:00
Alex Vandiver 1769f981da blueslip: Show more-info context in alert popup, if we have it. 2023-05-09 13:16:28 -07:00
Alex Vandiver fa92895731 blueslip: Support nested Error objects by .cause. 2023-05-09 13:16:28 -07:00