Commit Graph

203 Commits

Author SHA1 Message Date
SameepAher 724af12cd6 css: Fix edit icon bug in user profile modal.
Close user profile modal on clicking the space around edit button, by
calling hide_user_profile() on clicking the hover box around the edit
button.

Also, modified the hover box to center around the edit button.
2023-03-24 15:47:54 -07:00
Alex Vandiver 93bfd3fb5f sentry: Provide a server-side tunnel.
Some well-intentioned adblockers also block Sentry client-side error
reporting.  Provide an endpoint on the Zulip server which forwards to
the Sentry server, so that these requests are not blocked.
2023-03-24 15:16:38 -07:00
Alex Vandiver 164d58bec9 web: Save a 301 redirect from /help to /help/. 2023-03-24 14:51:01 -07:00
Alex Vandiver ab7ff6b582 web: Save a 301 redirect from /billing to /billing/. 2023-03-24 14:51:01 -07:00
Alex Vandiver d9daeb13e0 web: Save a needless 301 redirect from /apps to /apps/. 2023-03-24 14:51:01 -07:00
Alex Vandiver 61adc9cfcc web: Save a needless 301 redirect from /team to /team/. 2023-03-24 14:51:01 -07:00
Alex Vandiver c686c5ed0f web: Save a needless 301 redirect from /plans to /plans/. 2023-03-24 14:51:01 -07:00
Alex Vandiver a1570ff3dd web: Save a needless 301 redirect from /integrations to /integrations/. 2023-03-24 14:51:01 -07:00
Alex Vandiver 5967dda35d web: Save a needless 301 redirect from /upgrade to /upgrade/. 2023-03-24 14:51:01 -07:00
David Rosa 707fa87c74 help: Document `=` keyboard shortcut.
Documents the new shortcut in the `?` menu, Keyboard Shortcuts page,
and Emoji Reactions page.
2023-03-24 12:58:35 -07:00
Daniil Fadeev e8f5e8da4f message_controls: Fix "undefined" tooltip content. 2023-03-24 12:26:57 -07:00
N-Shar-ma b8cb72630f click_handlers: Ensure typeahead clicks do not collapse compose box.
Added condition for when a user clicks anywhere in a typeahead menu, be
it the header or empty space at the top and bottom, to not collapse the
compose box.

This fixes the bug where clicking anywhere on the typeahead except the
options would result in the compose box collapsing, but the typeahead
menu staying open and still working (on selecting a option in this state,
it would be inserted at the start, as visible on reopening the compose box).
2023-03-24 12:00:57 -07:00
Alex Vandiver f812d9bb42 localstorage: Accesses can fail randomly; make best-effort.
The localstorage machinery can fail for totally arbitrary reasons,
including filesystem breakages on the part of the client, or
capricious access control.

Wrap accesses to localstorage with try/catch blocks to do our best,
but continue execution in the event that the localstorage API errors
out; it is better to continue with the rest of our intended actions
than get hung up on those failures.
2023-03-23 16:16:04 -07:00
Alex Vandiver b2c048f172 emojiset: Promise reject calls want an error, not an event.
This improves the error message captured, from the mildly inscrutable
"Non-Error promise rejection captured with keys: currentTarget,
isTrusted, target, type".
2023-03-23 15:58:11 -07:00
Alex Vandiver 75008d5f50 sentry: Drop HttpClientIntegration.
We have the information about all of these failures from the server
side, and Sentry groups all 5xx failures together with no stacktrace,
which makes them very difficult to get signal out of.
2023-03-23 15:57:41 -07:00
Anders Kaseorg 39b48e85a4 recent_topics_row: Remove unused dataset attributes from template.
Commit 084cbd4ff7 (#15064) removed the
.data() calls that inspected these.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-23 13:34:59 -07:00
Anders Kaseorg 508b9f7bd0 reactions: Pass missing vote_text to Handlebars template.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-23 13:26:37 -07:00
Daniil Fadeev b65b94894f stream_popover: Migrate Bootstrap to Tippy in starred messages' popover. 2023-03-23 11:59:46 -07:00
Tim Abbott 2b6ec56238 popovers: Use default our font size for Tippy popovers.
We'd accidentally shrunk the actions popover to 12px when migrating it
to Tippy.
2023-03-23 11:59:46 -07:00
Tim Abbott d3152800a6 css: Refactor Tippy popover CSS.
The CSS for our first Tippy popover, actions_popover, incorrectly did
not split the CSS that is meant to be applied to all popovers from
that CSS that is only for that specific popover.

Reorganize this with some clarifying comments.
2023-03-23 11:59:46 -07:00
Daniil Fadeev 3bfdac3e03 tippy: Fix tippy-arrow thickness. 2023-03-23 09:24:38 -07:00
Anders Kaseorg 36475daba7 templates: Remove references to undefined fields.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-22 17:10:28 -07:00
Anders Kaseorg a1f530fcc0 tests: Pass missing data to Handlebars templates.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-22 17:10:28 -07:00
Anders Kaseorg 73d400e4a3 web: Pass missing data to Handlebars templates.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-22 17:10:28 -07:00
Anders Kaseorg 5d7da7e537 settings_bots: Avoid Handlebars iteration with block parameters.
The fix at https://github.com/handlebars-lang/handlebars.js/pull/1855
is not released yet.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-22 17:10:28 -07:00
Aman Agrawal f5f79048fe notifications: Handle exception when trying to play audio.
Safari denies user from playing audio without an interactive
trigger like a button by default. So, when user received a
notification in Zulip via Safari, it triggers an error when
trying to play the notification sound.

Our goal for this commit is to simply handle the error.
2023-03-22 12:27:20 -07:00
Aman Agrawal dbc2b2a839 recent_conversations: Fix unread topics navigation behaviour.
When marking an unread topic as read with `unread` filter selected,
we don't need to move user a row down since removing the selected row
will automatically move the user down.

Without this, the user goes down twice which is not intended.
2023-03-22 11:53:41 -07:00
N-Shar-ma 83e182a6fa typeahead: Fix stream typeahead flashing before topic typeahead.
Removed a redundant call to bootstrap typeahead's `lookup` function when
the `automated` function returns true, which was causing the streams
typeahead to show up briefly before the topic typeahead on pressing `>`
immediately after a stream name.
2023-03-22 11:43:21 -07:00
Lauryn Menard 90205a490d account-settings: Pass delivery email to change email modal.
When we converted the change email form to a dialog widget modal,
in commit f43d3b9986, the page_params value for delivery email
that was being referenced in the handlebars template
`change_email_modal.hbs` was not set, so instead an empty string
was the initial input value. Because the email change dialog
widget post_render callback sets the input value to the same
delivery email, the fact that the email was not being set when
the template was initially rendered was not noticable.

Passes the page_params.delivery_email to the html parameter in
dialog_widget.launch so that the template has the initial value
set when the form is initially rendered. Removes the now redundant
post_render callback, which resets the initial input value to the
same delivery email.
2023-03-22 11:18:49 -07:00
Lauryn Menard 25fb810d81 account-settings: Pass password page params to dialog widget.
When the password change form was converted to a dialog widget
modal, in commit f5fbf5f0e0, the page_params values for
password_min_length and password_min_guesses that were referenced
in the handlebars template `dialog_change_password.hbs` had no
value to set, which meant the password quality bar was no longer
checking the input value against those organization settings.

Passes the page_params values for password_min_length and
password_min_guesses to the html parameter in dialog_widet.launch
for the password change modal so that those values are available
and set when the template is rendered.
2023-03-22 11:18:49 -07:00
Tim Abbott 35440672a7 message_list: Rename confusing hide-date CSS class.
The previous hide-date CSS class had a semantic meaning of "this
recipient row has the same date as the previous one"; since we're now
having logic read that value, it's worth giving it a semantic name
that makes that code easier to understand.
2023-03-21 12:55:13 -07:00
Aman Agrawal 404f6a404a message_list: Fix duplicate date headers at the top of message feed.
Hide the date on date separator when it is above a sticky header; see
the comments for the full algorithm.
2023-03-21 12:55:13 -07:00
Joseph Ho c8d043e12c
popovers: Fix tooltip partially hidden by recipient bar when selected.
Previously, when a user view the message source of a message at the
very top with the blue box around, the tooltip for the button will
be partially hidden by the recipient bar. Ths cause is some legacy 
CSS from, for example, 3cd33c0fea,
which increased the z-index for the bodies of selected messages.

The intent of that code appeared to be something around handling overlaps
between unread indicators and the blue selected message box. It's logically
incorrect, and testing demonstrates that the blue box works fine next to unread
messages without this change, so we can safely remove these z-index values.
2023-03-21 12:47:47 -07:00
Anders Kaseorg 730eda60bc webpack: Disable webpack-dev-server overlay for runtime errors.
webpack-dev-server 4.12.0 introduced a global handler that shows a
full-screen overlay for all runtime errors, but it’s redundant with
our blueslip_stacktrace handler and less functional at this time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-21 12:36:37 -07:00
palashb01 ac45a3f20d narrow_banner: Add a period at the end of the default banner.
This commit adds a period ('.') at the end of the default banner
in the narrow empty search for multiple filters. This is required
to maintain consistency among all banners, as for most banners, we
use punctuation at the end of the banner to create complete and
meaningful sentences.
2023-03-21 11:23:43 -07:00
palashb01 ce11657204 narrow_banner: Display title only for empty search with multiple filters.
This commit improves the display of the narrow banner when there are
multiple filters used in a narrow search and no results are found.
The banner will now only display the title 'No search results'
The node tests have been updated to reflect this change.
2023-03-21 11:23:43 -07:00
Hardik Dharmani e07bb82704 js: Fix dependency cycle in overlays.js.
Removing browser_history.js import in overlays.js
helps to completely solve the dependency cycle issue for
importing dialog_widget.js in upload_widget.ts in PR #24426.

Removed the only use of browser_history in overlays.js
which was 'browser_history.exit_overlay()'cin open_settings
function by defining open_settings_overlay function in settings.js
and calling 'browser_history.exit_overlay()' in settings.js.

also removed overlays.js import in admin.js as the only use of
overlays was to call open_settings function which is now shifted
to settings.js and is called as settings.open_settings_overlay.
2023-03-21 11:22:11 -07:00
Hardik Dharmani b722cf31cb js: Move popover.initialize to end of file.
Moved the initialize function in popover.js at end of file to
follow 'no-use-before-define' for function 'hide_all' being called
in initialize function and to follow convention to put
initialize at the end of the file.
2023-03-21 11:22:11 -07:00
Hardik Dharmani 2c30bbbf74 js: Fix dependency cycle in unread.js.
The import of recent_topics_ui.js from unread.js generates an import
loop. To remove this, we need to move the logic for rerendering recent
topics after update_message_for_mention out of the low-level unread.js
data module.

Since the logic was conditional on `content_edited` being true, and
that parameter is only passed in the message_events.js code path, we
can do this by just making the function return a boolean for whether
this rerender may be required, and moving the rerender logic to that
calling module.
2023-03-21 11:22:11 -07:00
Aman Agrawal 00505e9903 pm_list: Fix tooltips mutation handler.
The mutation handler was correct for user list in the right
sidebar but was incorrect for pms list in the left sidebar.

Since the left sidebar is updated differently, we need to
check for mutations on the element actually being updated.

This also required using a target node that is always present
for the pms list which otherwise throws an exception.
2023-03-21 10:53:25 -07:00
Aman Agrawal 05674f3ab5 pm_list_item: Convert pm_user_status to a class.
Since there are multiple elements that use pm_user_status, it
makes sense to have it as a class.
2023-03-21 10:53:25 -07:00
Alex Vandiver 66de81425e portico: Use jQuery better to select the first integration.
The `.integration-lozenges` children may contain
non-`.integration-lozenge` elements; if there were no matching
integrations, attempting to fetch the css `display` property of those
failed.

Switch to using jQuery to find the full set of visible lozenges
directly; this does the right thing if there are no such elements.
2023-03-21 08:50:06 -07:00
Joelute 4d55192e21 compose_typeahead: Add hint text to topic typeahead dropdown.
With the autocomplete dropdown, some users face trouble or uncertainty
while selecting topics. The autocomplete dropdown may encourage users
to find and select an existing topic rather than starting a new topic.
The changes adds a hint text to the topic typeahead dropdown to
encourage users to either start a new topic or select an existing
topic.

Fixes #23295.
2023-03-20 16:28:28 -07:00
Anders Kaseorg 3a27b12a7d dependencies: Switch to pnpm.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00
Anders Kaseorg b3f9fdf99a dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00
Anders Kaseorg 61f91f8503 tests: Mock autosize.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00
Anders Kaseorg d5b2a667c5 message_view_header: Remove unused value for absent i18n placeholder.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00
Anders Kaseorg 13066e6406 styles: Fix dark-theme mixin in zulip.css.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00
Anders Kaseorg ecde9066d7 stylelint: Fix declaration-block-no-redundant-longhand-properties.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00
Anders Kaseorg 790c8a1582 stylelint: Fix at-rule-empty-line-before.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-20 15:48:29 -07:00