Commit Graph

59992 Commits

Author SHA1 Message Date
Sayam Samal 97c27374d6 css: Use `oklch` color space in `color-mix()` for Zulip color palette. 2024-07-23 14:56:15 -07:00
Tim Abbott daca62513d i18n: Update translation data from Transifex. 2024-07-23 14:45:19 -07:00
Karl Stolley 096bb22e40 help: Update edit icon across help pages. 2024-07-23 14:34:44 -07:00
Shubham Padia 451a9979dd state_data: Add types to current_user_schema.
Types have been taken from user_schema for fields present in that schema
and rest have been take from zulip.yaml.
2024-07-23 14:14:15 -07:00
Shubham Padia c96e76be8b hotkey: Alt + P now toggles preview mode for message_edit.
Fixes #30851.
Since there can be multiple messages being edited at once, with a
possibility for them to be out of the DOM, we use
compose_state.get_last_focused_compose_type_input to determine which
message edit to toggle the preview mode on.

We keep the compose box preview toggle behaviour more or less the same,
where we do not check whether the compose box was last focused or not if
there are no eligible message edit boxes and the compose box is open.
This behaviour works well for compose box since there's always one
possible compose box at a time compared to multiple message edit boxes.

One thing to note behaviour wise is that if you have 1 message edit
box open and you shift the focus to compose box, and then close the
compose box, `Alt + P` will not work until the focus is brought back again to
the message edit box.
2024-07-23 14:14:15 -07:00
Shubham Padia 78bb2a4c9b message_edit: Extract clear_preview_area from click_handlers.
We want to able to use the clear_preview_area in other places than
click_handlers and that's why it has been moved to message_edit.js.
The name was chosen to be consistent with a similar function in
compose.js.
2024-07-23 14:14:15 -07:00
Shubham Padia f4704f0419 message_edit: Extract show_preview_area from click_handlers.
We want to able to use the show_preview_area in other places than
click_handlers and that's why it has been moved to message_edit.js.
2024-07-23 14:14:15 -07:00
Shubham Padia f97ffd07d2 compose: Move render_and_show_preview to compose_ui.
We want to use render_and_show_preview in message_edit, but that will
cause a dependency cycle because of message_events. In order to avoid
the dependency cycle, the function has been moved to compose_ui and
relevant types have been added.
This commit does not audit the existing function for improvements, just
moves it around and adds types.
The `msg` and `result` are same as the other files (e.g.
activity.test.js) with success responses.
2024-07-23 14:14:15 -07:00
Shubham Padia c5fc0ae4a2 state_data: Add type for full_name in current_user_schema. 2024-07-23 14:14:15 -07:00
Tim Abbott 2e252ec502 team: Count contributors with 20+ commits too.
This is a useful supplement to the number for 100+ commits.
2024-07-23 14:01:01 -07:00
Karl Stolley 9716ad9e84 search_box: Specify consistent, veritable height. 2024-07-23 14:00:32 -07:00
Karl Stolley 92fcd7cc9e search_box: Remove needless margin-right value. 2024-07-23 14:00:32 -07:00
Sayam Samal cd8aa727ce user_card_popover: Add `LONG_HOVER_DELAY` delay to user card tooltips.
This adds the `LONG_HOVER_DELAY` delay to the user card tooltips, which
prevent the tooltips from becoming distracting when the user is just
navigating the popover.
2024-07-23 13:59:02 -07:00
Sayam Samal f124ef931d user_card_popover: Focus on menu options when opened with keyboard.
When the user card is opened via the keyboard shortcut `U`, the initial
focus should be on the first popover menu option, rather than the copy
buttons or the custom profile field links which can be distracting due
to the presence of tooltips on them.

Fixes part of #31027.
2024-07-23 13:59:02 -07:00
Karl Stolley 99111a90d7 invite_modal: Simplify Administrator, Owner role labels. 2024-07-23 13:54:11 -07:00
Anders Kaseorg 94fe3f6194 rendered_markdown: Move thumbnail rewriting to postprocess_content.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-23 13:26:37 -07:00
Anders Kaseorg edf34ada63 util: Rename clean_user_content_links to postprocess_content.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-23 13:26:37 -07:00
Alya Abbott b88b11b958 help: Add a note about frequency of Zulip updates. 2024-07-23 13:10:36 -07:00
Prakhar Pratyush f586366272
onboarding_steps: Update button text of onboarding modals to "Got it".
Changing the button text of one-time modals to introduce the recent and
inbox view to say "Got it" rather than "Continue" helps reinforce the 
vocabulary we're using "Got it" = dismiss one-time content forever.
2024-07-23 12:28:59 -07:00
Shubham Padia 304d948416 docs: Replace `Advanced` with relevant section for user Preferences.
This is a followup commit to #30824.
Fixes
https://chat.zulip.org/#narrow/stream/9-issues/topic/.F0.9F.8E.AF.20help.20not.20updated.20for.20new.20preferences.20sections/near/1899330.
git grep in the help directory will still show up results for `Advanced`
but those are mostly used in either plain english language instructions
or refer to some other part of the app. At the point of writing this
commit, there were 6 results for `Advanced`, 4 of which were plain
english, 1 refers to the Advanced settings in chrome for desktop
notifications, and another one refers to `Advanced configurations` for
channel settings.
2024-07-23 09:44:25 -07:00
Karl Stolley af441971b5 message_row: Add ellipsis to edited notices below avatar. 2024-07-23 09:44:14 -07:00
Sahil Batra b07ba1c100 css: Increase right padding for table headers.
This commit increases right padding of headers of sortable
table columns, so that there is some space between the arrow
and the hover shadow border.
2024-07-23 09:43:42 -07:00
Sahil Batra a888763141 css: Extract variable for the right padding for table headers.
This commit extracts CSS value for right padding, used in headers
of sortable columns of a table, in a variable.
2024-07-23 09:43:42 -07:00
Tim Abbott 461663c08a stream_list: Fix clicks on muted channels.
The previous logic did not properly account for the fact that in muted
channels, unmuted/followed topics are sorted above normal topics.

Rather than trying to reproduce that logic, we just call the function
for computing the topics in the left sidebar, and pull off the top
topic.
2024-07-22 22:32:47 -07:00
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