Commit Graph

60022 Commits

Author SHA1 Message Date
Alya Abbott 7f0e3e84f5 help: Document new way to remove pasted formatting. 2024-07-24 12:33:53 -07:00
Sahil Batra 9aa4ce28ce css: Improve selectors used for recent topics table.
Using "*" selector is inefficient as they require checking every
element because of the browser's bottom-up matching process.
This commit instead updates the selector to use individual
classes for elements to apply the CSS rules keeping in mind
to use unique class names instead of general class names.
2024-07-24 12:31:20 -07:00
Sahil Batra b0e8096579 css: Do not use "*" selector for color_animated_button styles.
Using "*" selector is inefficient as they require checking every
element because of the browser's bottom-up matching process.
2024-07-24 12:31:20 -07:00
Kenneth Rodrigues c4c9c59a41 default_channel: Fix multiple modals opening.
Earlier, the `Add Channel` button was being focused even after the
modal was open, causing multiple modals to open on pressing enter
repeatedly.
This commit fixes the issue by removing the focus from the `Add
Channel` button after the modal is open by focusing the dropdown on the
modal.
2024-07-24 12:26:31 -07:00
Kenneth Rodrigues fe557bde77 custom_profile_fields: Fix multiple modals opening.
Earlier the focus remained on the button to open the modal,
causing multiple modals to open on pressing enter repeatedly.
This commit fixes the issue by removing the focus from the button
by focusing on the first input field of the modal.
2024-07-24 12:26:31 -07:00
Tim Abbott 55884b1338 paste_handler: Skip undo dance if formatting was a noop.
The intent had been only to do the fancy undo thing when no formatting
is present.
2024-07-24 11:11:29 -07:00
Aman Agrawal 8a82639762 message_events: Fix compose stream not updated when moving messages.
When moving message while compose box has content, stream was not
updated to the new stream if it was changed.

Tested by moving message with stream changed and with / without topic
changed.
2024-07-24 10:46:01 -07:00
Kislay Verma 3620139700 copy_and_paste: Paste text first unformatted and then formatted.
This commit makes pasting formatted text a two-step process:

- Insert unformatted text
- Insert formatting

This way, undo (Ctrl+Z) will restore the original pre-formatting
syntax.

This is the same as the approach taken with
auto-formatting in #29302.

Fixes #31061
2024-07-24 10:36:06 -07:00
Sayam Samal e6c0e096f9 user_card_popover: Remove presence circle indicator for bot users. 2024-07-24 10:27:27 -07:00
Sayam Samal eed3890be6 user_card_popover: Add bot specific terminology for mute/unmute option. 2024-07-24 10:27:27 -07:00
Sayam Samal fd638664b5 user_card_popover: Rename "Bot owner" to just "Owner". 2024-07-24 10:27:27 -07:00
Sayam Samal 9c2b60a304 user_card_popover: Fix bot owner field overflowing for long names.
This commit fixes the overflowing issue for long bot owner names in the
user card popover, and also repositions the bot owner user card popover
to align with the bot owner name on the bot user card popover.
2024-07-24 10:27:27 -07:00
Sayam Samal 9b314da0ea user_card_popover: Fix bug where owner's avatar replaces bot's avatar.
The `.popover-menu-user-avatar` selector being used to replace the small
avatar with the medium avatar was a broad selector, which also targeted
the bot's avatar when the bot owner's user card was opened. This commit
fixes this bug by scoping the selector to the current popover instance.
2024-07-24 10:27:27 -07:00
Sahil Batra 8734d34cb7 stats: Remove unnecessary CSS.
This CSS was needed when there was label along with the buttons
on the same line when this was originally added in 626c5ef55e.

But there is no label with the buttons now, so this CSS is not
needed.
2024-07-24 10:12:42 -07:00
Sahil Batra b2ca752f75 css: Remove unused css for scheduled-messages-loading class.
This class was removed in 043d54d170.
2024-07-24 10:12:42 -07:00
Tim Abbott 7c792b1f7a upload: Stop importing unused Uppy styles.
I'm not aware of us using any of these; we don't generate the class
names involved, and we're not using `uppy.use` on any of their UI
components.

I confirmed that the only use of an Uppy UI component was the progress
bar, which was stopped using in
b01ac3623f.
2024-07-24 10:12:17 -07:00
Sahil Batra 5b98bc4848 settings: Allow admins/owners to deactivate themselves from users list.
We previously did not allow users to deactivate themselves from users
list to avoid users deactivating themselves accidentally. But we now
show a confirmation modal before deactivating, so it is fine to allow
it.
2024-07-24 10:05:03 -07:00
Alex Vandiver e3a238fc89 thumbnail: Remove unused thumbnail sizes.
47683144ff switched the web client to prefer the 840x560 size, as the
mobile apps prefer; remove the now-unused 300x200 size.  No client was
using the generated `.jpg` formats, as all clients support `.webp`, so
remove the unused `.jpg` thumbnail as well.
2024-07-24 09:57:20 -07:00
Alex Vandiver fccddf9f0d thumbnail: Fix comment. 2024-07-24 09:57:20 -07:00
Alex Vandiver e4a8304f57 thumbnail: Store the post-orientation-transformation dimensions.
Modern browsers respect the EXIF orientation information of images,
applying rotation and/or mirroring as specified in those tags.  The
the `width="..."` and `height="..."` tags are to size the image
_after_ applying those orientation transformations.

The `.width` and `.height` properties of libvips' images are _before_
any transformations are applied.  Since we intend to use these to hint
to rendering clients the size that the image should be _rendered at_,
change to storing (and providing to clients) the dimensions of the
rendered image, not the stored bytes.
2024-07-24 09:56:42 -07:00
Alex Vandiver e7ac62aad7 tests: Add a test that the thumb is actually the expected size. 2024-07-24 09:56:42 -07:00
Alex Vandiver d824988bc4 tests: Remove THUMBNAIL_IMAGES overrides, since the setting was dropped.
These were omitted from b42863be4b.
2024-07-24 09:53:14 -07:00
Tim Abbott 47683144ff thumbnail: Prefer 840x560 thumbnails for web app.
While this has no real effect in the message feed itself, it makes the
transition in the lightbox a lot nicer.
2024-07-24 09:21:50 -07:00
Aman Agrawal 66da0a0945 popover_menus: Fix user card moves to top left of screen.
When the user card is displayed via right sidebar, the reference
can be lost due to it being updated or hidden on window resize.

To fix it, we show user card as an overlay when we cannot find
the reference.

Another solution would have been to relocate the reference and
update it for the popover but that is not naturally supported by
tippy once the popover has been displayed.
2024-07-24 09:19:39 -07:00
Karl Stolley 829212a76a lightbox: Set payload.source on srcset.
This eliminates a flash of the smaller/blurrier preview image when
navigating to images that have already been loaded in full.
2024-07-24 09:14:36 -07:00
Alex Vandiver d448a0b271 thumbnail: Use the pre-fetched thumbnail as a temporary stand-in.
This improves the user experience by showing *something* as we fetch
the full-resolution image in the background.
2024-07-23 16:41:09 -07:00
Sayam Samal 4b121a8573 user_card_popover: Focus on menu options first when key is pressed.
As a follow-up to the commit f124ef931, which deals with the keyboard
focus when opened via the keyboard shortcut `U`, this commit ensures
that when the user card is opened via the mouse, and the first
navigational key is pressed, the focus is on the first menu option
instead of the other tabbable elements which can be distracting.
2024-07-23 16:39:05 -07:00
roanster007 c9667048b7 popovers: Skip updating url hash when clicked on "View user profile".
Previously, clicking on "view user profile" in the user card popover
would open up the profile as an overlay, changing the hash, and
closing other already opened overlays when opened.

This commit would modify it to behave as a modal rather when
an overlay is already open in the background, thus preventing
the hash change, and allowing the background overlays to exist
when it is opened.

Fixes #30481
2024-07-23 15:07:33 -07:00
Sayam Samal 1f020816c2 user_card_popover: Update text item colors to improve contrast.
This commit updates the color of the text items in the user card popover
which are mostly user related information, to use the new Zulip color
palette.

This increases the contrast of the custom profile fields and other user
related information such as the user's local time and status text to
improve readability.

Fixes part of #31027.
2024-07-23 14:56:15 -07:00
Sayam Samal ee26f16d67 css: Replace var() color arguments with static hsl() equivalent values.
The postcss-color-mix-function plugin does not support var() color
arguments since those cannot be dynamically resolved. This commit
replaces all var() color arguments with their static hsl() equivalent
values to ensure that color-mix() functions are successfully compiled
to rgb() for browser compatibility.
2024-07-23 14:56:15 -07:00
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