Commit Graph

443 Commits

Author SHA1 Message Date
Anders Kaseorg
7157a424a8 babel: Type-check Babel configuration.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-10 09:44:44 -07:00
Anders Kaseorg
56fc587dfd eslint: Type-check ESLint configuration.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-10 09:44:44 -07:00
Anders Kaseorg
49caa9dc85 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-04 15:20:47 -07:00
Anders Kaseorg
6615756437 lint: Don’t auto-fix with remark unless requested.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-04 13:13:37 -07:00
Anders Kaseorg
619cb0dd4f eslint: Add eslint-plugin-mdx.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-03 22:36:42 -07:00
Anders Kaseorg
7b0c6f9d3f dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-08-14 21:37:50 -07:00
Anders Kaseorg
d0f9fb73cc dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 14:19:56 -07:00
Anders Kaseorg
c431785d3f web: Upgrade to Zod 4.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Shubham Padia
aebbdee5b5 help-beta: Add eslint plugin for astro files. 2025-06-30 09:06:18 -07:00
Shubham Padia
f37ffd8937 help-beta: Add prettier plugin for astro files.
Even though we have separate packages for `help-beta`, we have opted to
put the prettier plugin and config for astro files in the main project
itself, so that linting needs to be configured only at one place.
2025-06-30 09:06:18 -07:00
Anders Kaseorg
dbd63203af dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-06-25 16:53:17 -07:00
Anders Kaseorg
9dd4dc08fd dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-06-04 16:24:47 -07:00
Alex Vandiver
c2e0a27d2c upload: Fix uploading the same file twice in the same session.
This commit fixes a bug where uploading the same file a second time
in the same browser session would appear to the user to stall with
`Uploading [filename]...` in the composebox.  This is because
`tus-js-client` makes a HEAD request to check for already-uploaded
files -- and, if found, that request is used in the `upload-success`
callback.  That left the callback with no response body to parse, to
know what URL to insert.

Store the `/user_uploads/...` URL in the file metadata after a
successful upload, and if the fingerprint matches a previous upload,
pull that URL (and filename, as it may have changed server-side) out
of the previous upload's metadata.

Co-authored-by: Shubham Padia <shubham@zulip.com>
2025-05-28 09:23:51 -07:00
Anders Kaseorg
d33d52f3af types: Upstream winchan types to DefinitelyTyped.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-23 18:46:34 -07:00
Anders Kaseorg
dc7f34491b dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-05 14:15:44 -07:00
Alex Vandiver
eae18738a6 signup: Add optional Altcha to realm registration. 2025-04-23 17:18:40 -07:00
Anders Kaseorg
440864e7c9 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-09 15:46:56 -07:00
Anders Kaseorg
eadc9a8530 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-14 18:32:23 -07:00
Anders Kaseorg
c71aeae34d dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-26 16:20:47 -08:00
Anders Kaseorg
ac19e90f40 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-29 15:04:09 -08:00
Sayam Samal
c8de1debf8 stream_color: Remove spectrum-colorpicker library.
As a follow-up to the previous commit which replaces the spectrum color
picker instances with the custom color picker popover, this commit
removes the spectrum-colorpicker library and its related code from the
codebase.
2025-01-07 17:27:58 -08:00
Alex Vandiver
b61b9876fa dependencies: Update @uppy/core and @uppy/tus. 2025-01-06 15:25:32 -08:00
Anders Kaseorg
a9d64d5604 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-02 17:30:40 -08:00
Aman Agrawal
04e6b4eb4e textarea-caret: Improve performance of getCaretCoordinates.
`getCaretCoordinates`'s performance is improved 5x on average after
this patch due to reduced forced reflows of the layout.
2024-12-12 09:08:30 -08:00
Anders Kaseorg
1bf3bc0f18 dependencies: Move stylelint-high-performance-animation to devDependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 23:27:38 -08:00
Anders Kaseorg
040469ada8 dependencies: Move @babel/register to devDependencies.
This is not needed in production as of #32327.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 23:27:38 -08:00
Anders Kaseorg
cac3bca409 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 09:54:56 -08:00
Anders Kaseorg
9a4728425d eslint: Migrate to flat configuration.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 09:54:56 -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
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
dc514f69ee dependencies: Remove ts-node.
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
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
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
9c6e261861 dependencies: Remove mkdirp.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-10 15:02:52 -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
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
799e59bb8f dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-05 17:01:09 -08:00
Anders Kaseorg
2671a5c32c stylelint: Enable stylelint-high-performance-animation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-23 14:56:39 -07:00
Anders Kaseorg
7bd5ec28ae dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-04 08:47:07 -07:00
Alex Vandiver
94dad72b75 upload: Use @uppy/tus to upload files through tusd.
Replace the XHRUpload plugin for Uppy with the Tus plugin, to make use
of the new tusd endpoint.  This allows for resumable files, as well as
files which are larger than comfortably fit in memory (the source of
the old 25MB limit).

MAX_FILE_UPLOAD_SIZE is still applied, but can safely be raised above
25MB.

Fixes: #9391.

Co-authored-by: Brijmohan Siyag <brijsiyag@gmail.com>
2024-09-19 11:37:29 -07:00
Anders Kaseorg
892f988404 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-26 07:44:14 -07:00
Alex Vandiver
2840e68548 static: Pre-compress with zopfli, for better compression.
Zopfli[^1] performs very good, but time-intensive, zlib compression.
It is hence only suitable for pre-compressing objects, not on-the-fly
compression.

Use a webpack plugin to write pre-compressed versions of JS and CSS
assets using Zopfli, and configure nginx to serve those assets when
`Accept-Encoding: gzip` is provided.

This reduces the size of the JS and CSS assets on initial pageload
from 1422872 bytes to 1108267 bytes, or about a 22% savings.

[^1]: https://github.com/google/zopfli
2024-08-13 09:01:06 -07:00
Anders Kaseorg
3a535cacdc dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-16 23:25:37 -07:00
adnan-td
4ecb46964f dependencies: Add textarea-caret. 2024-07-11 16:04:15 -07:00
Aman Agrawal
2b33a5af83 tippy: Add patch to avoid text Node as target in Firefox.
In Firefox, event targets can be pseudo elements like text
nodes which don't have .closest method. This results in error
when delegate tries to handle trigger for a text node target.

Since https://github.com/atomiks/tippyjs/pull/1166 has no
response from the developer, we decided to apply this patch
ourselves.
2024-07-05 10:15:45 -07:00
Aman Agrawal
f27488adc9 giphy: Upgrade giphy to implement TODO.
Upgraded to use the tabindex support provided by giphy itself.
2024-06-27 09:19:23 -07:00
Anders Kaseorg
3dccb72519 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 21:34:18 -07:00
Shubham Padia
d0ba886df8 dependencies: Update simplebar to 6.2.7.
We need this update to configure tabIndex for simplebar.
2024-06-20 10:25:51 -07:00
Anders Kaseorg
a4042d8a5a dependencies: Add confusing-browser-globals.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-07 16:10:39 -07:00