Commit Graph

478 Commits

Author SHA1 Message Date
Alex Vandiver
577b6de43c dependencies: Add re2js. 2026-05-19 21:50:56 -07:00
Anders Kaseorg
7e254d670d dependencies: Upgrade pnpm from 11.1.1 to 11.1.2.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-05-14 05:54:50 -07:00
Anders Kaseorg
e7d517915d dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-05-13 14:20:32 -07:00
Anders Kaseorg
5e66f8a6ee types: Use @types/postcss-import.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-22 10:46:28 -07:00
Anders Kaseorg
a23a3e7847 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-17 15:39:27 -07:00
Anders Kaseorg
5572a86f15 debug-require-webpack-plugin: Remove enhanced-resolve references.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-17 15:39:27 -07:00
Anders Kaseorg
b3d127a60c dependencies: Patch email-addresses TypeScript issue.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-17 15:39:27 -07:00
Anders Kaseorg
b97dcfbbf5 pnpm: Set a 24 hour minimum release age.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-04-17 15:39:27 -07:00
Anders Kaseorg
045e832242 dependencies: Upgrade json-schema-ref-parser to fix DeprecationWarning.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-03-27 10:56:06 -07:00
Anders Kaseorg
4c48884fd4 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-03-11 12:01:31 +08:00
Anders Kaseorg
62dba02c6f tests: Switch from mockdate to @sinonjs/fake-timers.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-03-03 09:56:34 -08:00
Anders Kaseorg
739891c7e2 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-02-24 15:59:05 -08:00
Prakhar Pratyush
ed70609737 jdenticon: Patch to add CLI options to configure lightness range.
The CLI options offered by the jdenticon library doesn't
include option to configure lightness range of colored and
grayscale shapes.

The npm package itself has options to configure these, but
not exposed via CLI tool.

This commit makes changes to add the following two options:
* --lightness-color
* --lightness-grayscale

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2026-02-24 12:12:09 -08:00
Prakhar Pratyush
5c4382023e avatar: Add support to generate avatar using Jdenticon.
This commit adds support to use Jdenticon to generate avatar,
if user's avatar source is configured so.

The avatar is generated using Jdenticon's NPM package and
stored locally or to S3.

When realm's default_avatar_source is set to Jdenticon,
user's avatar is generated using Jdenticon in the following
cases:
* New user created
* User deletes their uploaded avatar image
* Imported user with no user-uploaded avatar

Fixes part of #36522.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2026-02-16 23:16:35 -08:00
Sahil Batra
cb9e95bbca upload-widget: Resize image after cropping.
This commit adds code to resize the image after cropping in
the client itself to the maximum allowed dimensions. If the
cropped image is already within the maximum dimension
limit we do not do anything.

We do this resizing in server, but we need to do it in client
as well to make sure that we do not upload a very large image
file which can happen after image being encoded to PNG after
cropping.
2026-02-04 11:35:45 -08:00
Anders Kaseorg
bc0bbc3f9a dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-02-04 09:30:55 -08:00
Anders Kaseorg
85a2ba8693 webpack: Do not use expose-loader for jQuery.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-02-04 09:30:55 -08:00
Aman Agrawal
401c7a2925 autosize: Patch to fix slow pasting of text.
When pasting a large amount of text (>5k), pasting in compose is
noticeably slow due to `update` event in `autosize` causing
layour reflows since it is called thousands of times during a paste.

To fix it, we throttle the `update` event to only run once every
50ms by default.
2026-01-30 10:04:15 -08:00
apoorvapendse
d27e621f9e gifs: Unify GIPHY and Tenor UI.
This is a big bang commit that combines the
GIPHY picker UI with the custom grid implementation
and completely removes the existing third party
component.

We introduce the GiphyNetwork class as a part
of this commit.

We, also rename some of the CSS classes that would
have otherwise broken the behavior of the GIPHY
picker if done in previous commits.

We rename `tenor.ts` to `gif_picker_ui.ts` and
introduce a `provider` state variable for some
conditional logic in `toggle_picker_popover`.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2026-01-21 10:59:38 -08:00
Shubham Padia
639239a0ea linkifiers: Replace url-template with uri-template-lite.
The former only supports expansion, not extraction (the opposite of
expansion). This is a prep commit for supporting reverse linkifiers.
2026-01-14 09:46:39 -08:00
Anders Kaseorg
1c47b551f9 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2026-01-12 18:31:52 -08:00
Shubham Padia
b3acaf8075 ui_init: Show unsupported browser warning on load.
We are using browserslist-useragent-regexp to build a regex to compare
our user agents against. This regex is generated and stored in
web/generated and is generated on every provision. This will remain
mostly unchanged since .browserlistrc is not a frequently modified file.
Still, we run it on every provision since we don't have a good mechanism
to detect changes in that list. We can look into that in a followup PR.

In terms of chosing the library, the regexp library is the current
recommendation browserslist github. Another library called
browserslist-useragent exists but it is not actively being worked upon
and is slower as well:
https://gist.github.com/dangreen/55c41072d8891efd3a772a4739d6cd9d

In terms of which browsers to flag as unsupported, we don't flag any
browsers that are not part of >=0 % query of browserslist. If they are
part of >= 0 %, but not part of `baseline widely available with
downstream`, we flag the browser as unsupported.

We also allow higher versions while generating the regex, so if our
regex is outdated a little bit, users with newer browsers don't get the
unsupported browser warning.
2026-01-12 16:34:54 -08:00
Anders Kaseorg
2389f51223 eslint: Enable eslint-plugin-promise.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-12-30 09:29:21 -08:00
Anders Kaseorg
17ea45a392 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-12-28 00:49:26 -08:00
Anders Kaseorg
0ded4e5f4c dependencies: Remove obsolete patches.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-12-28 00:49:26 -08:00
Anders Kaseorg
f06f717b75 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-25 21:02:51 -08:00
Anders Kaseorg
70d41b8dba time_zone_util: Replace with @date-fns/tz.
I wrote time_zone_util before date-fns 4 was released with time zone
support.  (There was a separate date-fns-tz, but it didn’t handle
daylight saving time correctly.)  Now we get to replace it.

https://blog.date-fns.org/v40-with-time-zone-support/

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-24 14:47:02 -08:00
Aman Agrawal
8ee196431d slack_import: Use dashboard instead of drag drop for file uploads. 2025-11-13 14:46:15 -08:00
Sahil Batra
fddc9582ff dependencies: Add @uppy/image-editor plugin.
This is needed because we will add support to crop realm
logo, icon and user avatar in further commits.
2025-11-03 16:55:04 -08:00
Anders Kaseorg
be18d71624 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-01 07:24:57 -07:00
Anders Kaseorg
9ac9dbdc1c dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-07 22:42:50 -07:00
Shubham Padia
9fa09f8f87 help: Make canonical URL for the root to be /help/.
We also make sure that /help/ is accessible when using the dev server.

We add vite as a dependency. v7 of vite is the latest version but using
that causes type problems for PluginOptions since astro uses vite v6.
Therefore we pin vite to v6 for now.

This commit also runs `pnpm dedupe` for `tinyglobby` pinning it to
0.2.15 instead of the previous 0.2.14 in the lockfile.
2025-10-06 22:21:39 -07:00
Anders Kaseorg
85c94599c5 emoji: Remove deprecated Google blobs emoji set.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-01 13:35:06 -07:00
Anders Kaseorg
40a022dcc3 zephyr: Remove Zephyr mirroring support.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-16 11:18:18 -07:00
Anders Kaseorg
d8c0eb91c1 postcss: Type-check PostCSS configuration.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-10 09:44:44 -07:00
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