Commit Graph

61647 Commits

Author SHA1 Message Date
Sayam Samal c79d0c4cfd settings_emoji: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal f529c992f5 settings_components: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 6664672dc8 settings_playgrounds: Rename btn -> button in JS variables. 2024-11-14 12:03:36 -08:00
evykassirer 76d3bf2532 stream_list: Use delegate instead of default for tippy. 2024-11-14 10:09:41 -08:00
Prakhar Pratyush 6820cbb980 realm_export: Change tarball_size_bytes to PositiveBigIntegerField.
This commit updates `tarball_size_bytes` field from
`PositiveIntegerField` to `PositiveBigIntegerField` to support
larger values.
2024-11-14 10:09:03 -08:00
Sahil Batra dccf39a245 settings: Fix checking max values for message move limit settings.
The setting value for message move limit seconds was not being
converted to seconds before checking if the value was allowed or
not and that resulted in requests being made for values greater
than the allowed values.
2024-11-14 10:08:00 -08:00
Anders Kaseorg 2de648df02 makemessages: Write with orjson.
orjson’s use of Unicode is more consistent with what we get from
Transifex.  (We could alternatively use json’s ensure_ascii=False
flag.)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 17:40:51 -08:00
Anders Kaseorg 06a9600aa7 bundles: Remove unnecessary bootstrap_typeahead import.
Commit db24df488c (#29286) made this a
normal function rather than a jQuery plugin, so it doesn’t need to be
imported for side effects.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 17:08:37 -08:00
Anders Kaseorg dd3d8e1bc6 tsconfig: Enable verbatimModuleSyntax.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 14:10:37 -08:00
Anders Kaseorg e82b7641c6 giphy: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 11:56:57 -08:00
opmkumar c4ad9d8e09 tooltip: Remove "last active" time from deactivated user tooltip.
Removes "last active" time from deactivated user tooltip and instead adds
"This user has been deactivated." Also, in the deactivated bot tooltip,
"This bot has been deactivated." has been added.

Fixes #32136.
2024-11-13 10:39:09 -08:00
Anders Kaseorg e3118d8fc9 Revert "settings_account: Move async call into ui_init."
This reverts commit 8eb0ca3a7c (#32068).

We fixed the TypeScript configuration in #32327.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 10:15:29 -08:00
Anders Kaseorg 01540b45b0 web: Set "type": "module" and convert various CJS files to ESM.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 905fc3b50e marked: Rename to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg daa9552548 zulip-icons: Rename to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 73f7818510 debug-require: Rename to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 2c68ee08d2 eslint: Rename configuration to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 687f1b1651 tests: Rename the Node tests to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 30eabb9d6c eslint: Configure sourceType for *.cjs files.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg dc514f69ee dependencies: Remove ts-node.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 26c72bf7ec test-js-with-puppeteer: Run with node --experimental-strip-types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 45de69465a webpack: Run with node --experimental-strip-types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg a70babaec4 eslint: Decouple from webpack configuration.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg e73f1a74f3 webpack: Remove resolve.extensions from config.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg ec3177c834 web: Add explicit extensions to imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 4e8d028c49 dependencies: Patch handlebars to declare its types correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
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