Commit Graph

61571 Commits

Author SHA1 Message Date
Shubham Padia a297ce7371 mention: Remove extra whitespace from mentions.
This was introduced in 5b70775ab6.
2024-11-13 09:13:38 -08:00
Anders Kaseorg 9e76b3ef89 test-js-with-node: Remove missing files from EXEMPT_FILES.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 02:17:56 -08:00
evykassirer 048387da05 stream_edit: Fix bug where personal settings weren't being saved. 2024-11-12 23:33:03 -08:00
Anders Kaseorg ffc99d2025 webpack: Remove unused hexoid alias.
koa-body was switched to @koa/bodyparser during development of #29198,
so this was never used.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-12 15:03:29 -08:00
Karl Stolley 3c9c6f0a3b settings: Improve layout of user-list style previews. 2024-11-12 14:40:45 -08:00
Karl Stolley eb89719221 settings: Simplify user-list preview styles. 2024-11-12 14:40:45 -08:00
Anders Kaseorg 3cf7513498 babel: Remove transform-optional-chaining workaround.
This was a workaround for a bug in babel-plugin-rewire-ts, which we’ve
now removed.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-12 12:31:55 -08:00
Sahil Batra 54595f80cc settings: Fix filtering users based on role.
This bug was introduced in 174a458928 as `this` parameter
passed to role_selected_handler was DropdownWidget instance
and not the Jquery element for the selected role option.
2024-11-12 09:49:36 -08:00
Lalit Singh 8eab7591a3 ts: Convert `portico/google_analytics.js` to TypeScript.
Created a custom type declaration file `ga-gtag.d.ts` for
`ga-gtag` npm module.

`@types/gtag.js` is installed as a devDependency so that the type
for `gtag` function can be provided.
2024-11-12 09:48:52 -08:00
Vishesh Singh 5b70775ab6 mention_pill: Show bot icon in bot mention pill.
Render a bot icon to the right of bot name, in case
it is a bot.
2024-11-12 09:34:07 -08:00
evykassirer 482f6c5449 stream_list: Add tooltip in left sidebar when clicking opens feed. 2024-11-11 16:41:30 -08:00
evykassirer 8a0063f641 stream_sidebar_row: Remove title for topic name. 2024-11-11 16:41:30 -08:00
evykassirer d8a4ca38ab stream_sidebar_row: Remove title for channel name. 2024-11-11 16:41:30 -08:00
evykassirer f29f1299aa stream_list: Use more specific classname for click handler.
This avoids this code being fragile with any future refactoring.
2024-11-11 16:41:30 -08:00
Aman Agrawal e734694229 message_header: Fix message content visible above sticky header.
This was due to `box-shadow` used to hide the content was incorrectly
overridden in `.sticky_header` from the `.message_header` just above.

The bug is highly reproducible since it happens due to minor pixel
differences when rendering.
2024-11-11 14:19:20 -08:00
Aman Agrawal 6fe3ceb0ee recent_view: Fix backfill data not updated after reload.
This fixes backfill data not being inserted in recent view if
recent view was open when it received the backfill data.

Fixed by inserted rows in the sorted order instead of inserting
them randomly which caused rows to not be inserted if there were
no rows around the row being inserted.
2024-11-11 12:07:23 -08:00
Anders Kaseorg b3f18b805d ruff: Enable B008 function-call-in-default-argument.
https://docs.astral.sh/ruff/rules/function-call-in-default-argument/

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-10 22:43:55 -08:00
Aman Agrawal b85dcd0175 webpack: Remove unused landing_page dependency on event status page.
Event status page no longer uses any styles from this page.

Fixes #23629
2024-11-10 22:42:42 -08:00
Anders Kaseorg 9e9e951a4a corporate: Fix misuse of timezone_now() as parameter default.
Python parameter defaults are only evaluated once at the function
definition site, not at each call site.  So these defaults were
incorrectly evaluating to the server’s startup time rather than the
current time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-10 19:14:32 -08:00
Mateusz Mandera 70fb590466 change_realm_subdomain: Revoke user sessions.
If we don't revoke sessions, this can lead to issues when we import a
realm (e.g. from Slack) into the original subdomain for the same
organization. Because then, users who already had sessions before the
move end up stuck:
- when they try to open Zulip on the original subdomain, which now has
the imported instance, they get redirected to the moved subdomain due to
their pre-existing session cookie.
- they can't even log out to get rid of the bugged cookie, because the
account they're logged into in that session is now on the moved
subdomain.
2024-11-10 19:13:14 -08:00
Mateusz Mandera 1f21b7437c test_import_export: Don't hard-code ZULIP_VERSION in fixtures.
Otherwise, these tests fail if ZULIP_VERSION is different locally from
what's hard-coded. Use a placeholder instead and replace dynamically in
a helper function.
2024-11-10 19:12:39 -08:00
Anders Kaseorg 9506950f09 lint: Further recognize more JavaScript file extensions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-10 17:52:49 -08:00
Anders Kaseorg ff70ab441d dependencies: Remove three JS argument parsing libraries.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-10 16:00:29 -08:00
Anders Kaseorg da749d1c94 mdiff: Add missing exit for --help.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-10 16:00:29 -08:00
Anders Kaseorg 9c6e261861 dependencies: Remove mkdirp.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-10 15:02:52 -08:00
Anders Kaseorg efd7c06e30 lint: Recognize more JavaScript file extensions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-09 23:09:46 -08:00
Anders Kaseorg b020d5e2e8 tests: Remove deprecated Sentry.addTracingExtensions() call.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-09 22:18:10 -08:00
Anders Kaseorg 9b7a4c89ec svgicons2svgfont: Patch to fix Node 22 punycode DeprecationWarning.
(node:13734) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    (Use `node --trace-deprecation ...` to show where the warning was created)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 18:19:30 -08:00
PieterCK 0d7199b22e data_import: Add migration status file to converted exports.
This commit updates all third-party importer tools (Slack, Mattermost,
and Rocket Chat) in the `zerver/data_import` directory to also output a
migration_status.json file in their output tarball.

This is required because all importable tarball will be checked for
migration compatibility during import.

Fixes #28443.
2024-11-08 15:52:45 -08:00
PieterCK a9838d8089 import: Verify exported realm's migration compatibility.
When transferring a realm to a server that has a different set of
applied migrations (different Zulip versions), there is a chance that
the imported data formats appear to be compatible but data invariants
could still be violated.

This commit adds an assertion during the import process to verify
that both the exported realm and the importing server have matching
Zulip versions and have a compatible set of migrations.
2024-11-08 15:52:45 -08:00
PieterCK 40bcb4b42b export: Add migration status file to export tarball.
This commit updates the export process to write the migration status of
the realm as a JSON file to be included in the export tarball.

This is a preparatory step for adding an assertion to ensure that the
importing and exporting realms have a compatible set of applied
migrations.
2024-11-08 15:52:45 -08:00
Giovanni Silva 70d559cafa integrations: Update New Relic integration.
Newrelic has introduced a new update. This commit
updates the exisiting integration by adding support
for new types of payloads and cleaning up legacy
codes and fixtures.

Fixes #29729.

Co-authored-by: Pieter CK <pieterceka123@gmail.com>
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2024-11-08 15:49:56 -08:00
evykassirer 424e5d6ad0 buddy_list: Add background color placeholder to loading avatar. 2024-11-08 15:44:14 -08:00
Mateusz Mandera 420849ff6a slack: Call the correct resize_* function when importing realm icon.
For resizing the icon.png files, we use resize_avatar, not resize_logo.
This is pretty confusing - sure, for icons we use the same function as
for avatars, but we should have a proper name for the function called in
the icon context. So this commit also adds resize_realm_icon, and
changes the calls to resize_avatar in icon contexts to
resize_realm_icon.
2024-11-08 15:43:18 -08:00
evykassirer cb6c60ef7a stream_create: Fix puppeteer test flake from modal reopening.
In 245357c868 we added a redirect
after stream creation, to go to the stream feed. This means
the stream settings modal was closed partway through the tests.
This caused a flake where when the modal was reopened it was
not always open by the time we fetched the stream name.

The main fix in this commit is changing the classname for
the stream in the modal to be more specific (`stream-name`
can also be found in the left sidebar in many places) and
waiting for it to be visible again before getting text from
it.

More discussion here:
https://chat.zulip.org/#narrow/channel/43-automated-testing/topic/stream.20create.20puppeteer.20failure/near/1976724

Co-authored-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 14:12:24 -08:00
Mateusz Mandera a669fece3a email_mirror: Check that email gateway bot can send to the channel.
Otherwise this leads to an uncaught exception when the check happens
later in `check_message`.
2024-11-08 13:13:15 -08:00
Anders Kaseorg 2f2a207ae0 tests: Remove babel-plugin-rewire-ts.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg aab541bd4e namespace: Recognize immutable ES modules without checking __Rewire__.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg 8c60b66a95 tests: Use setters instead of __Rewire__.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg 52e59a9605 web: Add setters for rewired variables.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg e2cc125583 eslint: Exempt function variables from no-use-before-define.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg a208870b59 tests: Fix override of immutable ES module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg df6bcf6d3d tests: Avoid override_rewire of overloaded function.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg ee52618e1b namespace: Require rewired variables to be exported.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg db2723036f tests: Export rewired variables.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg a37aab19ed tests: Avoid override_rewire of imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg c57f12a792 tests: Remove override_rewire of nonexistent variables.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Harsh e468818d2b import: Remove skipping of too-long messages during import.
This commit eliminates the skipping of messages longer than 10K characters during the import process.
2024-11-07 16:04:14 -08:00
Karl Stolley 4038832889 unread_count: Set class for legacy quiet counters. 2024-11-07 14:56:38 -08:00
Karl Stolley 0e3be942b9 unread_count: Introduce classes for different counts.
This includes more prominent quiet counts, with increased
font-weight and, in dark mode, a brighter text color.
2024-11-07 14:56:38 -08:00