Commit Graph

7506 Commits

Author SHA1 Message Date
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
Karl Stolley
c605c069ed stars: Hide stars button on locally echoed messages. 2025-02-21 09:42:25 -08:00
Maneesh Shukla
15f0aa5acd loading_spinner: Add loading spinner to settings page.
Remove "Loading..." text from settings page and replace it
with a spinner.
2025-02-20 17:58:49 -08:00
Karl Stolley
0ce20fb515 sidebars: Refactor to remove .default-sidebar-behaviour.
Despite the comment in `ui_init.js`, this class is never in fact
removed, and appears only to add unnecessary complexity to certain
selectors, which are here cleaned up.
2025-02-20 11:17:02 -08:00
evykassirer
c9109ef736 compose: Use em for message-limit-indicator font size. 2025-02-20 11:14:49 -08:00
apoorvapendse
ac3bacb61e move_topic_to_stream: Limit topic name length in modal.
Fixes:
https://chat.zulip.org/#narrow/channel/9-issues/topic/no.20topic.20length.20limit.20in.20move.20modal/with/2097474.
2025-02-20 10:45:14 -08:00
Karl Stolley
13c3e36bd2 topic_summaries: Ensure modal takes rendered_markdown class. 2025-02-20 10:37:42 -08:00
Karl Stolley
509a71a666 message_row: Mock available icons to prevent post-echo reflow. 2025-02-20 10:26:36 -08:00
Prakhar Pratyush
c777fede07 compose_state: Remove empty_topic_placeholder function.
This commit removes `empty_topic_placeholder` function as
it is no longer used.
2025-02-20 10:09:41 -08:00
Prakhar Pratyush
7cfe3b7828 message_list_view: Remove always_visible_topic_edit.
We no longer have "(no topic)" placeholder for empty string topic,
so there's no need to push for configuring a topic.
2025-02-20 10:09:41 -08:00
Prakhar Pratyush
995724225f recent_view_ui: Use last_visited_topic=undefined when no topic is set.
This commit updates `last_visited_topic` to be explicitly `undefined`
instead of an empty string when no topic is set.
2025-02-20 10:09:41 -08:00
Prakhar Pratyush
6e568d686a stream_list: Fix not being narrowed to stream feed on click.
When narrowed to an empty string topic, clicking on the stream
name in the left sidebar should narrow to stream feed.

Earlier, it was not working. This commit fixes the bug.
2025-02-20 10:09:41 -08:00
Prakhar Pratyush
1beb9ec10c stream_list: Fix missing 'go to channel feed' tooltip for topic="".
Earlier, the 'go_to_channel_feed_tooltip' was missing when
hovering over the stream name in left sidebar while being
narrowed to an empty string topic.

This commit fixes the bug.
2025-02-20 10:09:41 -08:00
evykassirer
3fccbdd369 saved snippets: Use em for width, font-size, padding. 2025-02-20 10:06:55 -08:00
Sahil Batra
8a76da5953 typeahead: Fix left margin for groups icon in typeahead.
This commit fixes the left margin for groups icon in the
typeahead so that icon is aligned correctly with the
avatar in user item in typeahead.
2025-02-19 17:02:51 -08:00
Sahil Batra
434a145e31 typeahead: Handle matching for "role:members" system group.
The name displayed for "role:members" group is
"Everyone, except guests" and "role:members" group should
be shown in the typeahead when searching for "Members" as
well, i.e. while matching the query in the input "Members"
and "Everyone, except guests" both should be considered as
display names for "role:members" group.
2025-02-19 17:02:51 -08:00
Sahil Batra
ff05fd558c groups: Change display names of everyone and members system groups.
"role:members" group name is displayed as "Everyone except guests"
in the UI and "role:everyone" group name is displayed as
"Everyone including guests".
2025-02-19 17:02:51 -08:00
Sahil Batra
04ec16a172 typeahead: Consider display name for system groups when sorting.
When sorting items for typeahead in sort_recipients, display
names should be considered for system groups and not their
original names.
2025-02-19 17:02:51 -08:00
Anders Kaseorg
3ead4c06f0 app_variables: Rename “color” variables that are actually gradients.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-19 11:01:48 -08:00