Commit Graph

7524 Commits

Author SHA1 Message Date
Kislay Verma
766467c5e3 composebox_typeahead: Allow easily linking to topics in same channel.
This commit makes it easier to link to topics in the same channel.
Typing `#>` in the compose box replaces it with `#**channel_name>`
and opens the topic_list typeahead.

Channel names producing broken link syntax
are handled by generating a fallback md link
syntax when the topic is chosen.

Fixes #31420
2025-02-25 09:51:49 -08:00
Kislay Verma
1500ba4211 composebox_typeahead: Improve insertion of link syntax.
We do not need to extract the stream name from typed text as we have
it available in the TopicSuggestion.
2025-02-25 09:51:49 -08:00
Kislay Verma
676fbb6d99 composebox_typeahead: Fix bug in generating link syntax.
A minor bug was introduced in #32184 where we didn't check if the
channel name would cause a broken link syntax (and hence should
generate a fallback md link).  This would cause problems when
implementing a shortcut syntax to link to current channel.

Fixes part of #31420.
2025-02-25 09:51:49 -08:00
Aditya Kumar Kasaudhan
914cdd5b3a settings_users: Live update of role count on activation/deactivation.
Previously, the role count in the active and deactivated users
sections was not updated live upon activation/deactivation.

This commit introduces live updates for the corresponding role
counts.

Fixes: #33566.
2025-02-25 09:41:15 -08:00
Aditya Kumar Kasaudhan
a6d6a04489 settings_users: Refactor role filter dropdown creation and setup.
This commit reorganizes the role filter dropdown initialization code
to prepare for implementing live updates of role counts.
2025-02-25 09:41:15 -08:00
evykassirer
37cf88bb87 compose: Scale send button with font size. 2025-02-24 22:33:05 -08:00
Aman Agrawal
19b96ce9a8 composebox_typeahead: Fix failing tests.
Fixing test failure from
6d30b10b60.
2025-02-24 22:14:31 -08:00
Aman Agrawal
606bb778c5 typeahead: Wrap topic name in topic edit recipient bar form.
Fixes #33288
2025-02-24 21:55:13 -08:00
Aman Agrawal
1556dd8fb9 typeahead: Fix stream description not aligned with stream name. 2025-02-24 21:55:13 -08:00
Aman Agrawal
290ecba48c compose: Fix topic input box not visible for long stream names.
Since we want the width of the stream name to change responsively,
we need to use either media breakpoints or `vw` to ensure
that the stream name and topic name are visible at all widths.
2025-02-24 21:55:13 -08:00
Aman Agrawal
6d30b10b60 composebox_typeahead: Fix topic completion broken for long stream names.
Previous value of `40` didn't account for full length of stream name
which results in topic completion not working for stream names bigger
than that.
2025-02-24 21:55:11 -08:00
Karl Stolley
d7ac4aa651 user_circles: Show deactivated icon in sidebars, inbox, recents. 2025-02-24 18:18:16 -08:00
Karl Stolley
7cdcf72c9a user_circles: Better fit and position circles over avatars. 2025-02-24 18:18:16 -08:00
Karl Stolley
bd94e3a932 user_circles: Improve gradients in light mode and over avatars. 2025-02-24 18:18:16 -08:00
Karl Stolley
205917f9d0 user_circles: Experiment with horizontal gradient on idle circles. 2025-02-24 18:18:16 -08:00
Karl Stolley
331870afeb user_circles: Reduce size to spec in sidebars. 2025-02-24 18:18:16 -08:00
Karl Stolley
28d785c133 user_circles: Introduce Vlad's new color schemes. 2025-02-24 18:18:16 -08:00
Karl Stolley
53032577cf user_circles: Match idle icon to active icon. 2025-02-24 18:18:16 -08:00
PieterCK
3773ba10e1 url_decoding: Add parse_narrow_url.
This adds the Python copy of `hash_util.parse_narrow`. In the web app,
it will mainly be used in the import process later on. So, although it
has the same purpose as its frontend twin, there are differences:

- This doesn't convert a user-id-slug into a list of user emails. It
will instead parse it into a list of user IDs, as that is the preferred
form for those kinds of operators. It will also help in later operations
to remap the object IDs during import.

- To the same effect as the first point, operands can be an actual list
or int instead of a list or int as a string (e.g., "12,14,15" or "93").

- It has fewer validations than its frontend counterpart. It doesn't
look up the parsed object IDs for validity. This is partly because of
its main use case in import.
2025-02-24 15:37:40 -08:00
Vishesh Singh
c8983c0d31 popovers: Add x-gfm content type for copied Zulip links.
Copying links to a Zulip element now generate 3 content types:
- plain url, pasteable in address bar and non rich text editor
- HTML, for rich text editors.
- x-gfm, for pasting into GitHub and other services that support
  Markdown, new in this PR.

Fixes: #31813.
2025-02-24 11:18:01 -08:00
Vishesh Singh
6619b3b589 topic_link_util: Extract get_topic_link_content and helpers.
Refactors the get_fallback_markdown_link to generate some reusable
functions.
2025-02-24 11:07:37 -08:00
Maneesh Shukla
28cbc498d7 combined-feed-ui: Add placeholder text to empty combined feed.
Also, added live update behaviour to the combined feed narrow.

Fixes #31602.
2025-02-24 11:06:29 -08:00
Saubhagya Patel
99f3de5855 css: Fix CSS of Notification triggers table in Default user settings.
This commit applies CSS styles to the Notification triggers table in
the Default user settings under Organization settings, similar to how
they are applied to the Notification triggers table in the Notification
settings under Personal settings.
2025-02-24 10:17:48 -08:00
Maneesh Shukla
d8f609d088 unresolved: Add support for searching for unresolved topics.
Fixes: #31725.
2025-02-24 09:59:30 -08:00
Maneesh Shukla
3f88fe5903 resolved: Rename "Topics marked as resolved" -> "Resolved topics".
Fixes part of #31725.
2025-02-24 09:59:21 -08:00
harshbansal8705
b9561daefb compose: Keep focus on recipient field when input is invalid.
Previously, if an invalid user was entered in the recipient field,
the input box would shake to indicate an error but also move the
cursor to the message field. This was unintended and disrupted the
user experience.

This commit ensures that the focus remains in the recipient field
when the input is invalid, preventing premature cursor movement.
2025-02-24 09:41:59 -08:00
Apoorva Pendse
b547dcd643 compose_banner: Flash only once for exceeded length.
https://chat.zulip.org/#narrow/channel/101-design/topic/invalid.20message.20border.20flashing/near/2094736
2025-02-23 23:11:18 -08:00
apoorvapendse
0b12c51771 compose: Add tooltip support for invalid messages.
This commit adds tooltip support for various
invalid conditions mentioned in issue 32115.

A `show_banner` positional argument is added
in the `validate` method which has a default
value of true.

The reason behind introducing this is to
not trigger banners on hovering the disabled
send button, since the tooltip message is also
determined using the same validate method.

We want to only disable the button on hover,
which is why the update_send_button_status() method
is called only on "mouseenter" event, which is
added to the send button in compose_setup.js

To incorporate this change a new param is
introduced which determines whether to enable/disable
send_button by running update_send_button_status

Earlier, typing something in the textarea or
recipient box would also trigger
`update_send_button_status` which doesn't
work well since we've introduced a lot of
new booleans which determine whether send
button gets disabled causing send button to
get disabled while typing instead while hovering
Hence this change.
2025-02-23 23:11:18 -08:00
Apoorva Pendse
8496a40564 compose_banner: Assign banner priority.
Assigns priority to banner errors as
mentioned in #32115.
2025-02-23 23:11:18 -08:00
Tim Abbott
7972dde7af compose: Focus textearea after trying to send empty message. 2025-02-23 23:11:18 -08:00
Tim Abbott
71f36e241c compose_validate: Update state in validate_message_length. 2025-02-23 23:11:18 -08:00
Apoorva Pendse
2b250e7e64 compose_validate: Refactor conditionals for existing errors.
Pre commit for #32115.
2025-02-23 23:11:18 -08:00
Apoorva Pendse
979b4203c7 compose_banner: Reword no channel selected banner error.
Preparatory commit for #32115.
2025-02-23 23:11:18 -08:00
apoorvapendse
4b82e08b13 compose: Disable send button with a default cursor.
This commit is a pre commit to a change that will
introduce banners and tooltips as per various
unmet conditions while composing a message.

To accomodate future changes, the toggling is
switched to conditional addition/removal of the
`disabled-message-send-controls` class while
updating the status of the send button.

Also a default cursor is added and the send
area tooltips are disabled whenever the
`disabled-message-send-controls` class is
present.
2025-02-23 23:11:18 -08:00
apoorvapendse
6a443c0418 compose_banner: Update message for no private recipient.
This commit updates the error banner message when no
private recipient is specified.
2025-02-23 23:11:18 -08:00
apoorvapendse
fb5730a8fb copy_and_paste: Use parse instead of fixtures for inline cases.
Fixes: https://chat.zulip.org/#narrow/channel/6-frontend/topic/Use.20original.20markup.20to.20generate.20HTML.20for.20katex.20tests/near/2097702
2025-02-23 17:04:48 -08:00
Sahil Batra
ada386f7c2 settings: Rearrange "Other settings" section. 2025-02-23 16:09:50 -08:00
Aman Agrawal
7933cecf22 message_length_toggle: Fix tooltip not hidden on narrow change.
We fix tooltip being still visible once collapse / expand tooltip
is visible and user changes narrow by destroying the tooltip when
reference is hidden.
2025-02-23 16:04:19 -08:00
Maneesh Shukla
032a757def tooltip_delay: Change the tooltip_delay of restore_draft. 2025-02-23 15:54:07 -08:00
Maneesh Shukla
3db2104fe9 drafts: Add a copy draft button.
This adds a button to the draft overlay that allows the user to copy
the draft to the clipboard.
2025-02-23 15:54:07 -08:00
Aman Agrawal
94fd268abe inbox: Fix width of inbox search input at different window sizes. 2025-02-23 15:03:55 -08:00
Saubhagya Patel
d3c20f0b25 notifications: Render emoji in desktop notifications.
In desktop notifications, we no longer display an emoji's status
code. Instead, we show the corresponding Unicode emoji to
render it properly in desktop notifications. For custom
emojis, we continue to display their name.

Fixes #30598.

Co-authored-by: Tanmay Kumar <tnmdotkr@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-02-23 10:57:09 -08:00
Maneesh Shukla
a2c0d2d385 left_sidebar: Show tooltip only for truncated channel names. 2025-02-23 10:55:19 -08:00
Maneesh Shukla
e8d47ff550 styles: Modify users table spinner css to scale properly with font size. 2025-02-23 10:53:04 -08:00
Maneesh Shukla
b7ce31135d deactivated_user: Correctly display deactivated users in the right sidebar.
Fixes: #30797.
2025-02-21 18:01:26 -08:00
userAdityaa
196f4e92a3 resize_observer: Prevent loop using requestAnimationFrame.
This commit solves the issue where the ResizeObserver loop completes
with undelivered notifications. By using requestAnimationFrame, the
resize event is deferred until after the paint cycle, preventing an
infinite loop caused by consecutive resize triggers before repaint.
2025-02-21 17:20:18 -08:00
Shubham Padia
3132bdb20f composebox: Streams without content access shouldn't be in typeahead.
Other places where we use get_unsorted_subs do not require content
access.
See https://chat.zulip.org/#narrow/channel/101-design/topic/dropdown.20for.20metadata.20access.20stream/near/2096230
2025-02-21 15:36:07 -08:00
Shubham Padia
5d7a78f721 stream_data: Users with content access should be able to preview.
Before this, not all users with content access were able to see the
preview button.
2025-02-21 15:36:07 -08:00
Prakhar Pratyush
eed056a591 topic_list_data: Add support to filter empty string topic.
We show `realm_empty_topic_display_name` for empty string topics
in the left sidebar.

This commit makes it possible for users to search for
the `realm_empty_topic_display_name` value to filter out empty
string topics.
2025-02-21 14:13:22 -08:00
evykassirer
cc60fed749 stream_settings: Fix height of right pane for two-row header. 2025-02-21 10:12:19 -08:00