Commit Graph

64900 Commits

Author SHA1 Message Date
Alex Vandiver
5828bfe8ce i18n: Trim {% trans %} sections by default.
This pulls in changes from the latest django-jinja[^1]
`makemessages.py` monkey-patching.  Specifically, it adds support for
`trimmed`, `notrimmed`, and the `ext.i18n.trimmed` policy.  We enable
that, which removes unsightly and unnecessary whitespace inside of
`{% trans %}` blocks.

[^1]: aac828ca63/django_jinja/management/commands/makemessages.py
2025-05-29 11:58:57 -07:00
Evy Kassirer
4751740d3c composebox_typeahead: Focus composebox when topic is selected.
Fixes bug reported here:
https://chat.zulip.org/#narrow/channel/9-issues/topic/focus.20after.20choosing.20from.20topic.20typeahead/near/2180336
2025-05-29 11:39:42 -07:00
Sahil Batra
760026c7a7 groups-ui: Fix scrollbar for groups list in left panel.
Simplebar was not being implemented correctly in groups UI
left panel because $container and $simplebar_container args
passed to ListWidget.create were same elements and thus the
simplebar related elements were being removed when rendering
the list.

This commit fixes it by adding a wrapper element to be used
as simplebar container.
2025-05-29 10:57:02 -07:00
Sahil Batra
bbc1435968 settings: Fix resizing of streams and groups overlay.
We set the height of left and right panel elements in
groups UI when browser window is resized as per the
heights of header, search container, etc.

We used common classes to set the height in both streams
and groups UI so the height for left panel and right panel
of groups UI were being set as per the height of headers,
search container, etc. of streams UI which made the UI
and scrolling experience buggy.

This commit fixes it by changing the Jquery selectors to
be more specific and calling the functions separately for
streams and groups UI.
2025-05-29 10:57:02 -07:00
Sérgio Glórias
d817bd5faf email_mirror: Also strip "SV:" from subject.
Observed in emails from Nordic countries, the prefix SV: is used instead of RE:.
2025-05-29 10:55:18 -07:00
Alya Abbott
d01b147ba2 help: Clarify how to avoid paying after a free trial. 2025-05-29 10:54:27 -07:00
Evy Kassirer
17ce7b90d3 input_pill: Add semi-transparent border around avatar.
Fixes #34499.
2025-05-28 17:40:28 -07:00
Evy Kassirer
8f7aab05e7 input_pill: Round all corners of user avatar.
Fixes part of #34499.
2025-05-28 17:40:28 -07:00
Lauryn Menard
fd16c2e2b0 templates: Update deactivated organization template for deleted data.
If a realm's data has been scrubbed, update the deactivated realm
to note the URL can be reused, but not that the realm can be
reactivated.

Updates the template for context variables that are no longer used.
2025-05-28 17:32:29 -07:00
Evy Kassirer
0563a36b47 buddy_list: Fetch all subscribers before showing search results.
Work towards #34244.
2025-05-28 17:27:18 -07:00
Aman Agrawal
6e9a65e0dc slack_import: Rename heading for input. 2025-05-28 17:19:51 -07:00
Aman Agrawal
9b2bf87bff realm_import_post_process: Show verified email in bold. 2025-05-28 17:19:51 -07:00
Aman Agrawal
47e70ef6b5 slack_import: Show ellipsis for overflowing select option. 2025-05-28 17:19:51 -07:00
Aman Agrawal
33c4185eae slack_import: Use custom string invalid file type error. 2025-05-28 17:19:50 -07:00
Aman Agrawal
6de3ed350b signup: Show error message on upload failure due to restrictions.
Error message due to uppy restrictions were not visible to the user.
2025-05-28 17:18:08 -07:00
Aman Agrawal
2d509c2351 slack_import: Add missing element to show error message.
This appears to have been lost somewhere in one of the rebases.
2025-05-28 17:18:07 -07:00
Aman Agrawal
4823477a70 slack_import: Allow replacing uploaded data export files.
Uppy doesn't allow uploading another file and replacing the exisiting
one in the same session due to `maxNumberOfFiles: 1` set by us.
We don't want to remove this restriction, so only way to allow
replacing files easily is to just resert the current uppy session
after the last upload finishes.

Our backend deletes any existing upload by default. So, this works
as expected on all fronts.
2025-05-28 17:18:07 -07:00
Aman Agrawal
9502d8f9bf signup: Remove obsolete option.
Since v2, this removeFingerprintOnSuccess is obsolete.
See this migration guide here:
https://uppy.io/docs/guides/migration-guides/#removed-resume-and-removefingerprintonsuccess-options-from-uppytus
2025-05-28 17:18:07 -07:00
Aman Agrawal
e07a17eff5 slack_import: Add instruction to get export file. 2025-05-28 17:18:07 -07:00
Aman Agrawal
ef8f9f0585 slack_import: Use textarea for slack access token.
This is to help user see the complete access token at once.
2025-05-28 17:18:07 -07:00
Aman Agrawal
b57b783dd8 slack: Don't show error code to users.
We log the error internally and only show invalid token as the
error message.
2025-05-28 17:18:07 -07:00
Aman Agrawal
18b0681d26 slack_import: Show validation error on empty slack access token.
We used to rely on browser to show error for empty slack access
token, but now we are using our own error element for this.
2025-05-28 17:18:07 -07:00
Aman Agrawal
68372f8e03 slack: Change invalid token error message. 2025-05-28 17:18:07 -07:00
Aman Agrawal
079e46404f slack_import: Tweak instruction to get slack bot user OAuth token.
Note that the link highlights the section to get bot OAuth token.
2025-05-28 17:18:07 -07:00
Sahil Batra
460c471a29 tests: Move channel access tests to test_channel_access. 2025-05-28 17:02:41 -07:00
Sahil Batra
bf7f567009 tests: Move stream permission tests to test_channel_permissions. 2025-05-28 17:02:41 -07:00
Sahil Batra
4b29d402c6 tests: Move channel creation tests to test_channel_creation. 2025-05-28 17:02:41 -07:00
Shubham Padia
5bbb7ebd1a help-beta: Convert tabs syntax to equivalent MDX syntax.
Fixes #31248.
For cases with zero tabs in our current help center, we were using the
tab syntax just to put a border around the instructions without any tab
label. We do not want that border anymore since Tabs also don't have any
borders. So, we just remove the old tab syntax in that case during our
conversion.

We also move the admonition to asides conversion before the tabs syntax
conversion since the tabs conversion happening first was messing with
the asides conversion and was resulting into some missing closing tags.
We can modify things to work regardless of order, but doesn't seem worth
digging into for a conversion script.
2025-05-28 16:42:16 -07:00
Shubham Padia
a23d928662 help-beta: Indent the content inside Asides or KeyboardTip.
MDX files were getting harder to read without proper indentation.
2025-05-28 16:42:16 -07:00
Alex Vandiver
66c123dd43 send_email: Only attempt suppression list removal with credentials.
Servers without any configured credentials raise a NoCredentialsError,
which is not a subclass of botocore.exceptions.ClientError, and hence
abort the password reset attempt.

Check for if we have any credentials at all before we attempt the API
call.
2025-05-28 10:49:17 -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
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