123 Commits

Author SHA1 Message Date
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
Shubham Padia
57b7ada2e4 help: Pre compress astro build files before serving.
This way nginx doesn't have to compress it every time.
2025-09-11 10:50:10 -04:00
Anders Kaseorg
473c8fa81a starlight_help: Downgrade sharp to the version Astro expects.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-10 16:33:41 -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
57e8c44e81 starlight_help: Use ‘astro check’ for development only.
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
083464fb16 remark: Don’t exclude remark-lint-list-item-indent.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-04 11:30:43 -07:00
Anders Kaseorg
1c085b1d77 remark: Don’t exclude remark-lint-no-duplicate-definitions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-04 11:04:02 -07:00
Anders Kaseorg
1178048a08 format-mdx: Add remark-gfm.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-04 10:27:47 -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
Shubham Padia
9a0ac354ed starlight_help: Move @types/mdast away from dev dependencies.
@types/mdast was in dev dependencies while it shouldn't have been, we
move that away from dev dependencies and bump the version. We need the
package when running the astro build step.
2025-08-28 10:07:25 -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
Shubham Padia
3e60b16ac1 starlight_help: Move help-beta over to starlight_help.
We are starting the cutover process and starlight_help is the directory
we have agreed on to place our new help center project. We do not want
to use `starlight_help` as the URL for the project, but this commit
changes the url from `help-beta` to `starlight_help` temporarily since
we can only change URL once we get rid of the current help center
project. That will be done in a future commit.
2025-08-08 11:59:29 -07:00
Shubham Padia
ec72c46ed6 help-beta: All lists should start with one after conversion.
The format step was converting our ordered list items to have
incremental numbering instead of using `1.` for every list item. This
was not because of any remark-lint rule, but because of
`remark-stringify` which auto increments any lists it processes. We
followed the recommended fix from
ae2f941d88/packages/remark-lint-ordered-list-marker-value/readme.md (L185)

We also don't need remark-lint-ordered-list-marker-value package, since
that is already part of the markdown style guide with the value we
desire. Setting it to false was a mistake in the first place.
2025-08-04 09:58:14 -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
7236476a9d help-beta: Downgrade to Zod 3.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 10:29:37 -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
4dc802aa9a help-beta: Add option to format mdx documents.
Partially fixes #35129.

Prettier could not be used because of prettier issue number 12209, not
linked here to avoid spam backlinks on the original issue. Prettier does
not have support for mdx v2 and v3.

We are using remarkLintRulesLintRecommended and
remarkPresentLintMarkdownStyleGuide as our starting set of rules.
None of the rules were giving an error on the starting set, but some
rules were giving lots of warnings on the generated mdx. They are
set to false in this file, we can add them back later as and when
required.

We have not inserted this in the main lint tool, we should do that in
the final cutover PR since we don't want the lint here to give any
unexpected warnings when people are linting stuff unrelated to the mdx
files.

This commit has been tested out on the current state of help center to
not produce any errors or warnings. The first run of format will produce
tons of warnings which are the issues being auto-fixed by the linter.
After that, the second run should produce zero errors.
2025-07-18 12:44:29 -07:00
Shubham Padia
070b94aabc help-beta: Set first paragraph of content as meta.description.
Fixes #35115.
2025-07-16 12:02:32 -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
Shubham Padia
c97cd1c5dd help-beta: Add support for displaying font-awesome icons.
In our app, we use the font-awesome stylesheet, add it to our webpack
bundle and use the appropriate class with the <i> tag.
Here. although for font-awesome, we can use the stylesheet to do the
same, we would need to use `webfonts-loader` for our custom icons.
In this astro project, we want to follow the Astro way, and
unplugin-icons fits better with the Astro way of doing things.
See this topic on the discussion on how we chose unplugin-icons:
https://chat.zulip.org/#narrow/channel/19-documentation/topic/Stage.202.3A.20Icons/near/2168842
2025-05-12 18:13:26 -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
Shubham Padia
b813d868a7 help-beta: Merge lists of same type adjacent to each other.
Fixes #31252.
One of our major use cases for file imports is to have bullet points as
partials to import at different places in the project. But when
importing the file with Astro, it creates its own lists. So we merge
lists together if they have nothing but whitespace between them.
There were some talks to use a component called FlattenList that would
flatten the list inside it, but that would also flatten lists that were
nested on purpose. This approach while feeling a bit hacky would not
flatten nested lists.
2025-04-15 13:55:09 -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
5d94541b6d dependencies: Downgrade @uppy/tus from 4.1.4 to 4.1.3.
It seems 4.1.4 is causing the client to ask the server to delete each
upload immediately when it succeeds.

https://chat.zulip.org/#narrow/channel/9-issues/topic/broken.20image.20uploads/near/1989833

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 21:58:59 -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
dc514f69ee dependencies: Remove ts-node.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00