Commit Graph

53555 Commits

Author SHA1 Message Date
Anders Kaseorg dd7b09d71a ruff: Fix C416 Unnecessary `list` comprehension.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-24 23:25:52 -07:00
David Rosa 9c20be8ffc help: Document "Show unread count for" display preference.
- Adds a new page in "Reading messages" section to document this new
  feature.
2023-09-24 15:28:50 -07:00
Alex Vandiver 4cef665e98 zilencer: Log how long the remote server delayed the push notification. 2023-09-24 15:24:02 -07:00
Alex Vandiver fd6091ad17 push_notifications: Provide message timestamp in both APNS and GCM notifications. 2023-09-24 15:24:02 -07:00
Alex Vandiver b8581e2895 push_notifications: Provide subsecond granularity on the sent time. 2023-09-24 15:24:02 -07:00
Alex Vandiver c22a1b7b88 zilencer: Switch to the more canonical import form of timezone_now(). 2023-09-24 15:24:02 -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
Alex Vandiver 2057057be4 pgroonga: Do not attempt to configure pgroonga without a database.
This can happen if `machine.pgroonga` is set during initial
installation.  We cannot run `CREATE EXTENSION PGROONGA` because the
database that we need to run that statement in does not exist yet;
make the command a silent no-op that does not create the
`pgroonga_setup.sql.applied` flag file, such that a later
`zulip-puppet-apply` once the database exists can pick up and install
the extension.
2023-09-22 11:45:00 -07:00
Alex Vandiver 5308fbdeac puppet: Add postgresql-client depenencies to monitoring.
The `unless` step errors out if /usr/bin/psql does not exist at
first evaluation time -- protect that with a `test -f` check, and
protect the actual `createuser` with a dependency on `postgresql-client`.
To work around `Zulip::Safepackage` not actually being safe to
instantiate more than once, we move the instantiation of
`Package[postgresql-client]` into a class which can be safely
included one or more times.
2023-09-22 11:45:00 -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
Lauryn Menard 48a1cf04d0 api-docs: Update the add and remove update_message_flags events.
Clarifies that the `all` field in the `op: "add"` event is only
relevant for the `"read"` message flag, and that it will be false
for all other specified flags in theses events.

Deprecates the `all` field in the `op: "remove"` event and document
that it is false for all specified flags.

Updates the deprecated `operation` field description and makes
a few other small revisions to the event text for clarity and
accuracy.
2023-09-22 11:28:09 -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 be653dd5b4 org_settings: Add backend for `realm_jitsi_server_url` setting.
This commit adds a `jitsi_server_url` field to the Realm model, which
will be used to save the URL of the custom Jitsi Meet server. In
the database, `None` will encode the server-level default. We can't
readily use `None` in the API, as it could be confused with "field not
sent". Therefore, we will use the string "default" for this purpose.

We have also introduced `server_jitsi_server_url` in the `/register`
API. This will be used to display the server's default Jitsi server
URL in the settings UI.

The existing `jitsi_server_url` will now be calculated as
`realm_jitsi_server_url || server_jitsi_server_url`.

Fixes a part of #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