Commit Graph

64870 Commits

Author SHA1 Message Date
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
Alex Vandiver
098228a210 upload: Handle non-200 responses more gracefully. 2025-05-28 09:23:51 -07:00
Shubham Padia
009eeb22ad upload: Pass filename to get_translated_status instead of file.
We only need the name to get the translated status, there's not much
point passing the complete file object as an argument. This will help us
in making future changes where the file name may not be coming either
from the file object or file.name.
2025-05-28 09:23:51 -07:00
Karl Stolley
1406fbf370 docs: Update comment, docs links to Format.JS. 2025-05-28 09:10:15 -07:00
Shubham Padia
26595799c7 icons: Let the system using the icons specify the stroke property.
Fixes #34716.
The stroke property is ignored when we generate webfonts in our main
app. See
https://zulip.readthedocs.io/en/latest/subsystems/icons.html#cleaning-up-the-svg-code
for more details.
2025-05-27 10:00:21 -07:00
Shubham Padia
840817d2df icons: Let the system using the icons specify the fill-rule color.
The fill-rule color is ignored when we generate webfonts in our main
app. See
https://zulip.readthedocs.io/en/latest/subsystems/icons.html#cleaning-up-the-svg-code
for more details.
2025-05-27 10:00:21 -07:00
Anders Kaseorg
7eec8fe3a2 popover_menus: Allow focusing an item when none is focused.
Commit 71fbc93c03 (#34685) incorrectly
removed this behavior.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-26 22:47:41 -07:00
Anders Kaseorg
ac29ae21da postcss: Work around postcss-extend-rule incompatibility with :is().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-23 22:25:38 -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
Aditya Kumar Kasaudhan
c5f126c6ff navigation_views: Add backend for navigation views in left sidebar.
Fixes part of #32077.
2025-05-23 16:25:08 -07:00
PieterCK
0dfb709152 slack_data_import: Support converting integration bot messages.
Integration bot messages in Slack may include "blocks" and
"attachments," which are Slack's messaging features.
Currently, these messages aren't processed when converting
Slack export data.

This commit adds support for converting integration bot
messages, as well as other Slack messages containing "blocks"
and "attachments".

Message payload with the block type `rich_text` is skipped because all
messages sent by users have this format.

Fixes #31162.

[1]=https://docs.slack.dev/reference/block-kit/blocks/rich-text-block/
2025-05-23 14:27:31 -07:00
Alex Vandiver
359939ba77 push_notifications: Update for breaking change in aioapns 4.0.
In aioapns 4.0, which we upgraded to in acd7353538, the `key`
parameter is treated as the ASCII-armored string contents of the key,
not the path to the file with that content.

Read the file ourselves, and pass the string it expects.
2025-05-23 11:29:28 -07:00
PieterCK
5b32fa7227 mattermost_import: Add message with faulty HTML to fixture.
This adds a new message sample with faulty HTML content that crashes
`html2text`. The previous test for this mocks a function that raises the
error that this fixture emulates.
2025-05-23 11:28:41 -07:00
Niklas Fiekas
e4d366d159 email_mirror: Also strip "Re[123]:" from subject.
Observed consecutively numbered replies from Outlook.
2025-05-23 11:27:22 -07:00
Shubham Padia
259ef423ad icons: Let the system using the icons specify the fill color.
The fill color is ignored when we generate webfonts in our main app.
For our help center beta project using Astro, we would have needed to
come up with a way to change fill colors for all the icons. Since, there
was no reason for us to keep the fill colors in the SVGs, we decided to
remove it instead and add a lint rule to keep that in check.
See
https://chat.zulip.org/#narrow/channel/6-frontend/topic/fill.20in.20our.20current.20svg.20icons
for more details.
2025-05-22 16:00:21 -07:00
Karl Stolley
1db859db4a svg: Convert CRLF line-endings to LF. 2025-05-22 15:59:55 -07:00
Karl Stolley
584bd13b09 gitattributes: Diff SVGs as code.
We also no longer worry about preventing newline
conversions.
2025-05-22 15:59:55 -07:00
Shubham Padia
43a27423d5 help: Remove single use macro manage-configured-topics.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
5131008682 help: Remove single use macro trying-out-zulip.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
0c131cf624 help: Remove single use macro tips-for-creating-channels.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
0d168ff7bb help: Remove single use macro set-up-integrations.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
f5d4a5a942 help: Remove single use macro self-hosted-log-in.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
3a13bcf432 help: Remove single use macro self-hosted-billing-admin-only.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
15f0750480 help: Remove single use macro remove-from-a-group.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
1b40ec4576 help: Remove single use macro register-server.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
946e6c6055 help: Remove single use macro register-server-legacy.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
ca38c388c1 help: Remove single use macro reading-dms.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
9afa916fb1 help: Remove single use macro organization-profile-intro.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
4f73a9d969 help: Remove single use macro migrating-from-other-chat-tools.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
32f609a88d help: Remove single use macro manual-billing-intro.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
88c1a3dcde help: Remove single use macro self-hosted-billing.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
0b094b98d8 help: Remove single use macro legacy-log-in-intro.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
683b372708 help: Remove single use macro custom-organization-settings.md.
Having these single use macros exist was not intentional
2025-05-22 11:05:29 -07:00
Shubham Padia
fd89d91fbe help: Remove single use macro configure-topic-notifications.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
489370b1b1 help: Remove single use macro cloud-only.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Shubham Padia
0770adcebf help: Remove single use macro advantages-of-self-hosting-zulip.md.
Having these single use macros exist was not intentional.
2025-05-22 11:05:29 -07:00
Karl Stolley
aecba99132 settings: Rename banner function to reference desktop. 2025-05-22 11:03:54 -07:00
Karl Stolley
a420dfd6cc settings: Don't update desktop notification banner in mobile.
Fixes #34668
2025-05-22 11:03:54 -07:00
Anders Kaseorg
c356595ed5 upload: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
4814898ccf user_group_popover: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
2c19cac621 user_card_popover: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
90c5bcad9a settings_panel_menu: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
71fbc93c03 popover_menus: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
42b05fdd5f navbar_menus: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Alex Vandiver
df74c54f38 find_account: Fix HTML version of email.
This was broken in the refactor in 0078310be7.
2025-05-22 10:31:21 -07:00
Alex Vandiver
198a5a8294 email_senders: Handle a None realm_id.
Some codepaths send an event with `realm_id=None` -- which we still
must trim out of the event, even if we do not add a `realm` value for
them.
2025-05-22 10:30:39 -07:00
Anders Kaseorg
42360c9477 production-build: Bump es-check language version to es2022.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-21 16:30:07 -07:00
PieterCK
201a71b575 mattermost_import: Except error when converting messages HTML.
This adds a try-except block when running html2text when processing raw
messages from HTML to markdown.

convert_html_to_text is added mainly for testing convinience. We don't
have any sample of Mattermosts' problematic content that could trigger
this sort of error yet, so the test mocks convert_html_to_text to raise
error instead.
2025-05-21 16:08:30 -07:00
PieterCK
45b396393f mattermost_import: Log when processing messages.
This logs a line for every batch of messages processed by
process_list_in_batches.
2025-05-21 16:08:30 -07:00
Lauryn Menard
8830373c9e demo-orgs: Disable allowing users to join until owner email set.
Until a demo organization creator sets an email address, we want to
restrict other users from joining the organization. Therefore, we
disable changing the "invite_required" setting for the organization
until they set their email address. Otherwise, the owner could
share the demo organization URL with someone and they could create
an account via the homepage.

Checks the demo organization owner delivery email address state
on the server-side.

Disables updating the organization setting in the web app UI.
2025-05-21 15:52:38 -07:00