Commit Graph

59868 Commits

Author SHA1 Message Date
Mateusz Mandera 8f461b3c03 email_mirror: Change default topic name if subject ends up empty.
If the email subject is something like `Fwd:`, it gets stripped to an
empty string, activating the "(no topic)" override. This however leads
to failure if the organization enables the setting forcing every message
to have a topic. Such emails should still go through, so we should just
change the topic value used.
2024-07-22 22:31:45 -07:00
Aman Agrawal 9f67452155 settings_components: Keep saved button displayed a little longer. 2024-07-22 22:31:02 -07:00
Kenneth Rodrigues fccc338db5 modals: Fix focus for recent_view_ui and inbox_ui modals.
Earlier the focus was not being set to the modal when it was opened.
This was because `is_in_focus` checks if  `modals.any_active` which
checks `$(".micromodal").hasClass("modal--open")`.
But when `is_in_focus` is called
`$(".micromodal").hasClass("modal--opening")`.

This commit fixes the issue by creating a function
`is_active_or_animating` which checks if the modal has the class
`modal--open` or `modal--opening`.
2024-07-22 22:29:58 -07:00
Kenneth Rodrigues dc85478c5d user_deactivation_ui: Fix focus when modal is open.
Earlier, when the user deactivation modal was open, the focus was not
set on the modal. This commit fixes that by setting
`focus_submit_on_open` to `true` in the modal options.
2024-07-22 22:28:00 -07:00
Tim Abbott 391045ada0 thumbnail: Document thumbnailing API. 2024-07-22 22:41:10 -04:00
Alex Vandiver 2ea0cc0005 thumbnail: Add a data-original-dimensions attribute.
This allows clients to potentially lay out the thumbnails more
intelligently, or to provide a better "progressive-load" experience
when enlarging the thumbnail.
2024-07-22 22:41:10 -04:00
Alex Vandiver 65828b20e9 thumbnail: Factor out a dataclass for markdown image metadata. 2024-07-22 22:41:10 -04:00
Alya Abbott 81a9c8b55b help: Improve previews documentation.
- Make page title more general.
- Document new option for animated image previews.
- Split instructions for showing different preview types.
- Update intro.
2024-07-22 15:28:16 -07:00
roanster007 66a96bee71 settings: Add setting to control how animated images are played.
Previously animated images were automatically played in the
message feed of the web app.

Now that we have still thumbnails available for them, we can add a new
personal setting, "web_animate_image_previews", which controls how the
animated images would be played in the web app message feed -- always
played, on hover, or only in the image viewer.

Fixes #31016.
2024-07-22 14:53:31 -07:00
Alya Abbott 1c30ea1819 help: Document feedback@zulip.com contact email. 2024-07-22 13:48:40 -07:00
Karl Stolley ce56c51e33 compose: Adjust popover-button breakpoints for wider left sidebar. 2024-07-22 12:09:42 -07:00
Karl Stolley c7cdda08f9 app_components: Display as flex in presence of show and flex classes. 2024-07-22 11:15:16 -07:00
Sahil Batra 63e82542d9 recent-view: Fix sorting arrows in recent views table heading.
This commit increases right padding for the th elements in recent
views table to make sure that the sorting arrow is visible correctly
for various screen width and font sizes. This change is similar to
what we did for tables in settings UI.
2024-07-22 11:13:51 -07:00
Prakhar Pratyush 6838a7302d test_import_export: Add test coverage for OnboardingUserMessage. 2024-07-22 10:26:33 -07:00
Sahil Batra e0bcf72521 stream_popover: Fix message topic edit without permission to edit channel.
There was a bug when stream_id field was being passed as NaN when user
tried to edit topic of a message if the user did not had permission
to edit the channel.

This commit fixes it to not pass stream_id field in such cases because
channel cannot be changed.

Fixes #30992.
2024-07-22 10:24:37 -07:00
Shubham Padia 3631ebf3bf user_events: Update email in people_dict before updating compose state.
When a user changed an email, we updated the compose and narrow state
before updating that person's email in `people_dict`. This raised a
warning in `get_direct_message_permission_hints` when using
`emails_strings_to_user_ids_string` since that person's email wasn't
updated in `people_dict` by then.
We just changed the order of update so that the email is updated in
`people_dict` before we update compose and narrow state.
2024-07-22 10:23:24 -07:00
Prakhar Pratyush f48e87cd3c fetch_initial_state: Avoid doing one db query per announcement stream.
In 'fetch_initial_state_data' we were doing one database query
per announcement stream.

This commit updates the logic to prefetch those streams using
select_related hence avoiding the extra db queries.

Fixes #28909.
2024-07-22 10:21:22 -07:00
Alex Vandiver 3ac14632d8 thumbnail: Disable libvips cache.
The libvips cache is 100MB, 100 operations, or 100 files, whichever is
less.  A single Django process or worker is extremely unlikely to ever
see the same image twice, much less within those timeframes.

Disable the cache, since it is mostly useless memory usage for our use
case.
2024-07-22 10:19:33 -07:00
Aman Agrawal 1e42d60850 message_view: Ignore fetched messages if user changed view.
If user is no longer in the current message list, then the
messages fetched for it are relevant to the current narrow and can
be safely ignored.
2024-07-21 23:42:07 -07:00
Aman Agrawal cc867de2c5 search: Fix outline of clear search button.
Fixed by including the margin and padding in the
`width: 100%` calculation.
2024-07-21 22:00:49 -07:00
Aman Agrawal e6df844865 message_view: Select message without rerender if possible.
After navigating to a `near` narrow, user is likely to press back
to go back to previous selected message. To support this, we have
to select `then_select_id` without rerender, if we can.

Tested by using breakpoints with `near` links to check if the
correct code is being executed.
2024-07-21 21:03:39 -07:00
Tim Abbott 54c2c02011 thumbnail: Add support for multiple queue workers.
There's no need for sharding, but this allows one to spend a bit of
extra memory to reduce image-processing latency when bursts of images
are uploaded at once.
2024-07-21 19:15:43 -07:00
Alex Vandiver 14880b2b59 lightbox: Update caching to work with thumbnails.
This moves the cache key for parse_media_data to being the "canonical"
image URL, not the displayed `img src`.  We may not even have the `img
src`, if the thumbnail has not yet been generated.
2024-07-21 18:41:59 -07:00
Alex Vandiver 60fc9eae2f thumbnail: Swap in our preferred thumbnail format. 2024-07-21 18:41:59 -07:00
Alex Vandiver 39d6f4ce10 thumbnail: Show the right spinner based on dark/light mode. 2024-07-21 18:41:59 -07:00
Alex Vandiver b42863be4b markdown: Show thumbnails for uploaded images.
Fixes: #16210.
2024-07-21 18:41:59 -07:00
Alex Vandiver 71406ac767 thumbnail: Factor frames into account for IMAGE_BOMB_TOTAL_PIXELS. 2024-07-21 18:41:59 -07:00
Alex Vandiver aacf28f7e3 test_classes: Extract a thumbnailing output format helper. 2024-07-21 18:41:59 -07:00
Alex Vandiver 94ff443c00 test_classes: Merge verbose assertEquals into ZulipTestCase. 2024-07-21 18:41:59 -07:00
Niloth P e1d35b1e72 integration-docs: Update Opsgenie for new doc format.
Part of zulip#29592.
2024-07-21 18:09:13 -07:00
Niloth P d972d76725 integration-docs: Update Pivotal for new doc format.
Part of zulip#29592.
2024-07-21 18:09:13 -07:00
Niloth P d571410ba3 integration-docs: Update Rundeck for new doc format.
Part of zulip#29592.
2024-07-21 18:09:13 -07:00
Niloth P 650a1384ca integration-docs: Update RhodeCode for new doc format.
Part of zulip#29592.
2024-07-21 18:09:13 -07:00
Niloth P 8fe7f4e409 integration-docs: Update Review Board for new doc format.
Part of zulip#29592.
2024-07-21 18:09:13 -07:00
Niloth P ec018780b5 integration-docs: Update Raygun for new doc format.
Part of zulip#29592.
2024-07-21 18:09:13 -07:00
Niloth P 335f9b8119 integration-docs: Update Radarr for new doc format.
Part of zulip#29592.
2024-07-21 18:09:13 -07:00
Mateusz Mandera f50104d475 import_realm: Update incorrect comment about emoji dir in exported data.
The emoji dir is present in the data from our export tool. This was
added in 468afe4840.

This comment hasn't been updated since
c4b886d8ae, so probably we just forgot to
refresh it when custom emoji export was added.
2024-07-21 13:16:49 -07:00
Kenneth Rodrigues 8b489f4b96 streams: Convert to typed_enpoint. 2024-07-21 12:57:50 -07:00
Aman Agrawal 025fba0a11 views_util: Extract common calls. 2024-07-21 12:39:23 -07:00
Aman Agrawal 2a998e98a6 inbox: Don't capture key input when navbar search is in focus. 2024-07-21 12:39:23 -07:00
Kenneth Rodrigues 6815cded83 zerver: Migrate some files to typed_endpoint.
Migrates `invite.py`, `registration.py` and
`email_mirror.py` to use `typed_endpoint`.
2024-07-20 15:46:48 -07:00
Niloth P 16abd82fa5 integrations: Remove Solano integration. 2024-07-20 15:44:17 -07:00
Kislay Verma de430f541c search: Improve text about searching public channels.
We use different text for guest users, specifying that they can
only search in channels they can view.
The issue description suggests the same for spectators, but
we already use different text for them.

The search-operators help overlay is also updated with the same.

Fixes #30902
2024-07-20 15:42:41 -07:00
Alya Abbott ed5d291781 help: Improve custom profile fields article.
- Describe user cards in intro.
- Remove outdated list of info in user profiles (not needed here).
- Document required profile fields.
2024-07-20 15:36:11 -07:00
evykassirer d5883cfbb2 search: Empty input on open, and show current narrow search suggestions.
Fixes #30911
2024-07-19 16:55:09 -07:00
evykassirer 26429a81e0 search: Remove freshly-opened logic.
Reverts 991c8451cd, to be
replaced with other logic in an upcoming commit.
2024-07-19 16:55:09 -07:00
evykassirer 962667f81c search: Add function to calculate search query text. 2024-07-19 16:55:09 -07:00
Karl Stolley 707187edbf app_layout: Express calculated max-width in 14px / 1em. 2024-07-19 16:54:53 -07:00
Karl Stolley 800ae6d027 left_sidebar: Adjust left sidebar size, and account for right margin. 2024-07-19 16:54:53 -07:00
Karl Stolley 6793d5148c app_layout: Increase max-width to 1500px. 2024-07-19 16:54:53 -07:00