This commit updates the ID for form element in create_realm.html
to "create_realm" as we would need to update the error handling
for this page in further commits and we do not want to break it
for other forms using "send_confirm" as ID.
Uptil now, 1 new line was added before and 1 after a quoted message. Now
for more breathing room around a quoted message, new lines are inserted
to space it from any content before and after by at least 2 new lines.
Fixes: #23608.
Forms using upload widget were using the
same css for image preview.
We fix this by assigning a class to the
widget and applying specific styles to it.
Previously, there is a bug where the position of the typeahead is off
whenever the user switches from stream typeahead to topic typeahead
in the compose box. The typeahead header was not hidden before
calculation of the position based on container height. These changes
will include the header before calculating for the position.
Previously this was only available on the upgrade page - meaning an
organization that already bought a plan wouldn't be able to request a
sponsorship to get a discount or such, even if qualified.
Added a width for the Change Email and Password dialogs at
sm_min (576px) and ml_min (425px) to make them more responsive
on narrow screens.
Fixes: #24339.
This bug made it impossible to scrub realms where the string_id was a
number, e.g. 123.zulipchat.com because
confirmed_string_id === actual_string_id comparison failed due to one
being a string and the other a number.
Per http://api.jquery.com/data/#data-html5:
Every attempt is made to convert the attribute's string value to a
JavaScript value (this includes booleans, numbers, objects, arrays, and
null).
To retrieve a data-* attribute value as an unconverted string, use the
attr() method.
postcss-preset-env transpiles this back as necessary. (It does a
better job than we did, in fact: we had several four-argument hsl()
calls that should have been hsla().)
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This adds a new search icon which we prefer over the one made
available from bootstrap, and replaces search icons in navbar
search with the Ionic icon.
Changed the id name of the <i></i> tag to user_profile_edit_button_icon
in the user profile modal, as earlier it was edit-button, which is too
vague of a selector name.
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.
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.
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).
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.
This improves the error message captured, from the mildly inscrutable
"Non-Error promise rejection captured with keys: currentTarget,
isTrusted, target, type".
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.
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.
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.
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.
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.
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.
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.
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.
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.
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>
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.
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.
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.
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.
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.
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.
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.
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.
This gives more comprehensive support of new and future CSS features
that can be transpiled for older browsers.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This reverts commit e16e7630e6 (#19542).
This was compiling to
a.messagebox-content .message_time {
z-index: 1;
}
which did nothing, because .messagebox-content is a <div>, not an <a>.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Since the message time of locally echoed messages were not displayed
and their width was restricted by `notvisible` CSS class, it
resulted in width available to message text changing after the message
was successfully sent and the time was displayed.
To fix this, we just try to set opacity of the message time to 0
for locally echoed messages.
`{{#tr}}` supports HTML and allows translators to accidentally
introduce HTML, so it’s safer to use the `{{t}}` helper unless HTML is
needed.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This implements a helper that parses an array that possibly contains
falsy elements into undefined when it does have at least one falsy
element, or returns a type narrowed array of non-undefined elements.
We use this in people.js, which achieves the same check we have using
"arr.every(Boolean)", but with type safety since it is not based on
validation.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Returning undefined as opposed to false makes more sense in the context
of this function. This also will simplify the type annotation.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Fixes#23588
When a new message arrives in an inactive stream, it will lead
to stream being marked as active from inactive which leads to
stream list being rearranged which zooms out the user since the
active stream is reset momentarily. To avoid this, we delay the
stream list redraw until user zooms out and only update the topics
list.
Having active streams greyed out can be confusing to the user. This
is especially useful when the app is still fetching messages on
a reload and the active stream has no messages and is thus marked
as `inactive`.
This makes our frontend code less verbose, and makes this name
consistent with the names of other visibility policies (which
do not have the `VISIBILITY_POLICY` prefix).
Currently, there is a checkbox setting for whether to
"Include realm name in subject of message notification emails".
This commit replaces the checkbox setting with a dropdown
having values: Automatic [default], Always, Never.
The Automatic option includes the realm name if, and only if,
there are multiple Zulip realms associated with the user's email.
Tests are added and(or) modified.
Fixes: #19905.
Prevents multiple simultaneous requests to the API when adding or
removing reactions. This commit blocks emoji state changes until
the request is executed.
Fixes part of #21213
The loading message that appears at the
top of the page when loading the Bots/
Uploaded Files/Users/Deactivated Users
page under Settings appears to be misaligned.
We fix this by changing the height of the
loading-spinner to match the line-height
of loading text.