Commit Graph

841 Commits

Author SHA1 Message Date
Daniil Fadeev 859903648b scheduled_messages: Add banner for unscheduled message.
Fixes: #25614.
2023-05-16 12:39:01 -07:00
Mateusz Mandera 632e856240 support: Add option to delete user from /activity/support. 2023-05-16 12:38:12 -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
Aman Agrawal e6c7363613 css: Make top message logo less bright. 2023-05-16 12:35:17 -07:00
Aman Agrawal 29880a4a1e css: Change border-bottom color for message header. 2023-05-16 12:35:17 -07:00
Aman Agrawal c84681c69c css: Color tweaks. 2023-05-16 12:35:17 -07:00
Aman Agrawal 2a98968846 css: Use 75% white as default text color. 2023-05-16 12:35:17 -07:00
Aman Agrawal 3f4deedba1 css: Remove stale css.
`message_view_header_underpadding` is no longer present in the
codebase as we move the padding to be above the sticky recipient
bar.
2023-05-16 12:35:17 -07:00
Aman Agrawal 9f5b7ba9b0 css: Separate out text colors. 2023-05-16 12:35:17 -07:00
Aman Agrawal c96de330b0 stream_color: Dim recipient bar background color. 2023-05-16 12:35:17 -07:00
Aman Agrawal 17bdf22521 css: Allow `actions_hover` icon to have a focus outline. 2023-05-16 11:57:17 -07:00
Brijmohan Siyag 17ec4f1e06 tooltip: Update max-width of disabled send button tooltip.
Changes the tooltip max-width on the disabled send button
from 300px to 350px to remove the weird looking padding at
the end.
2023-05-16 11:24:35 -07:00
Brijmohan Siyag cb00fbc42f compose: Check posting policy for direct messages.
Prior this commit, changing the message type from a stream (where posting
was not allowed) to a direct message using the compose box dropdown, did not
changed the state of the send button from disabled to enabled even though
direct messages were allowed in the organization.

This was happening because `check_stream_posting_policy_for_compose_box` was
only for streams.

Now, function is updated to check for both streams and direct
messages, as it checks if direct messages are allowed or not, and depending on
that, it updates the send button's state, tooltip and displays a relevant banner.
2023-05-16 11:24:35 -07:00
Josh Yap ee88bb5187 popovers: Hide emoji reaction when icon already present.
When hovering over another user's message, the emoji reaction
icon is already present. This commit removes the "Add emoji
reaction" menu item from the popover menu in this case, to
avoid redundancy.

Fixes #25602.
2023-05-16 10:53:54 -07:00
Josh Yap 231888b5a5 popovers: Add keyboard shortcut to emoji reaction menu item.
Fixes #25602.
2023-05-16 10:53:54 -07:00
Tim Abbott 3876171df1 compose: Fix opening compose box when viewing invalid stream.
This likely needs further refactoring to switch to using stream IDs
rather than names in this code path, but this change fixes an
exception that would be throw when opening the compose box while
viewing a narrow to an invalid stream name/ID.
2023-05-16 10:39:33 -07:00
Tim Abbott 74e6367455 css: Increase constrast for blue box. 2023-05-15 16:01:09 -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
Karl Stolley b852da6eed help_pages: Preserve anchor highlights.
This commit assigns a `.scroll-target` class to preserve any URL
fragment whose corresponding ID is on the self-same page as the
activating link.

This accommodates a side-effect of the fetch-based page-loading
logic, which seems to lose the `:target` reference once a load
or reload is complete.
2023-05-15 14:57:42 -07:00
Karl Stolley ceec61ba10 help_pages: Highlight headings targeted by URL fragments.
One caveat: While the approach here works fine when loading a new
docs page whose URL includes a fragment, there appears to be something
about `simplebar` that clears out the `:target` reference. If you
click a heading link on a help page, for example, you might
momentarily see the highlighted style appear before it disappears.
2023-05-15 14:57:42 -07:00
Brijmohan Siyag a4c7be68cc stream: change ID in selector to match updated one.
Updates the left-over ID in a5580264eb.
2023-05-15 14:55:21 -07:00
Daniil Fadeev cb69413301 send_later: Add keyboard navigation to message scheduling modal.
Fixes: #25404.
2023-05-15 14:52:06 -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 e64e5f2413 scheduled_messages: Add keyboard navigation.
Keyboard navigation has been added to the scheduled messages modal
in this commit. The solution is based on the `modals_handle_events`
function from the `messages_overlay_ui.js` module, as well as some
helpful functions from the same module.

Fixes: #25181.
2023-05-15 14:46:21 -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
Daniil Fadeev 35c23d0269 drafts: Refactor keyboard functions for reusability.
This is a preparatory commit to implement keyboard navigation in the
 message scheduling modal. The main goal is to make the
 `modals_handle_events` function reusable. To achieve this, we have
 extracted all the context-related variables and replaced all
 mentions of "draft" with the more neutral term "item". The
 `modals_handle_events` function now also has a context parameter,
 which contains all the necessary methods and properties to work in
 different modal contexts.
2023-05-15 14:46:20 -07:00
Aman Agrawal ae02a93d35 scheduled_message: Change tooltip of failure icon. 2023-05-15 14:43:04 -07:00
Aman Agrawal c375d36c9e css: Dim color of failed message sent icons. 2023-05-14 16:46:20 -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
Lalit cab3a992c0 refactor: Extract `message_feed_loading` module from `message_scroll`.
This new module allows us to remove dependency on `message_scroll` in `fetch_status`
and hence allowing us to migrate it to TypeScript.
2023-05-14 11:24:31 -07:00
Lalit 9e1b4dafc0 message_list_data: Remove dependency on `filter.js`.
This commit removes dependency on `filter.js` by lifting the construction
of `Filter` object up in `all_messages_data.js`.
2023-05-14 11:24:31 -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
Ujjawal Modi 105acc8495 streams: Disable option to add other subscribers in existing streams.
This commit disables the field used for adding other subscribers
to existing streams for users who are not allowed to add other users
to streams because of realm level setting "Who can add users to streams".
2023-05-14 11:19:05 -07:00
Ujjawal Modi eda1ee555b streams: Properly disable add subscriber container for existing streams.
Earlier the field used for adding subscribers to existing
streams was not properly disabled.

This commit properly disables the field and also adds a new function
for enabling and disabling add subscribers container.
2023-05-14 11:19:05 -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
Alex Vandiver b20aeadcb8 sentry: Downsample typing spans.
These can come fast and furious, and are not worth reporting all of.
Like presence reporting, we leave a small percentage of them for
network and endpoint latency information.
2023-05-12 13:53:57 -07:00
Alex Vandiver 6a3f97ba80 sentry: Heavily downsample presence spans.
Instead of dropping all of these spans, downsample them heavily (1% of
expected sampling rate).  These are some of the most frequent requests
to the server, and the high volumes do not add much information.  We
leave a small percent of requests, since it is a useful measure of
overall client network latency.
2023-05-12 13:53:57 -07:00
Alex Vandiver 9912b4c815 sentry: Unify logic for skipping span reporting.
This changes to not report any `call POST /json/users/me/presence`
spans, which we previously reported despite not including the inner
auto-instrumented HTTP spans.
2023-05-12 13:53:57 -07:00
Tim Abbott 2b2ee686f3 portico: Extract CSS variable padded-content-padding. 2023-05-12 11:54:17 -07:00
Karl Stolley f1db7c1d72 portico_css: Keep targeted elements below menu bar.
This PR ensure that all elements targeted by URL fragments will
remain visible below the portico's menu bar at all viewport
sizes and also when a user zooms in, provided the target is on a
page with the menu bar, which will have the `portico-landing`
class.

Whether a quirk or a bug, Chrome appears to ignore the padding on
ancestral containing elements when calculating the offset for
`scroll-margin-top`, which is why padding has been moved to
`.inner-content` for `.why-page` and `.case-studies-page`, which
are the two unique class names for portico pages where the targeted-
element scrolling behavior is used.
2023-05-12 11:54:17 -07:00
Karl Stolley a5ff3d7e59 portico_pages: Add uniform structure HTML structure.
This commit ensures that the Attribution, Jobs, and Team pages all
share a uniform structure to match those of other pages. This will
simplify styling and should ensure greater confidence when modifying
portico landing-page styles.

The one CSS modification here, for the jobs page, maintains the space
at the top of the "How we work" section.
2023-05-12 11:54:17 -07:00
Aman Agrawal dd73f7272d recent_conversation: Fix incorrect `if` condition.
row_focus cannot be equal to `$topic_rows.length` since it follows
0 array indexing.
2023-05-12 11:32:40 -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 81dfaa0602 dialog_widget: Update `get_current_values` function.
Updated `get_current_values` function to not include undefined keys
in current_values object and if the input field is of type file and
a file is selected then set the value equal to file object.
2023-05-12 11:30:50 -07:00
Aman Agrawal 461d935463 css: Fix unread marker leaking through message header. 2023-05-12 11:13:20 -07:00
Anders Kaseorg ea28083ba4 eslint: Fix unicorn/prefer-at.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-05-12 11:12:20 -07:00
Anders Kaseorg 54f90e41c0 eslint: Fix unicorn/prefer-string-replace-all.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-05-12 11:12:20 -07:00