Use a more instructive placeholder instead of "Topic" when
topic is not mandatory in a realm.
Updated placeholder:
'Enter a topic (skip for general chat)'.
This commit also attempts to fix a bug, present in main, where a
draft restored directly to the compose box loses its original topic
upon switching to other topic narrows.
Co-authored-by: Prakhar Pratyush <prakhar@zulip.com>
Note that the puppeteer tests only tested
copying whereas the node tests only tested
pasting, which is why the puppeteer tests
for pasting and node tests for copying are
absent after this split.
There's a rare possibility for a user to have no last_active_time. In
such a case, we always want to fall back to date_joined for displaying
"Last active" in the UI.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
This commit implements the frontend of migrating the
`allow_edit_history` setting to `message_edit_history_visibility`.
This allows organizations, to have an intermediate setting to
view only the "Moves" history of the messages.
Fixes#21398.
Co-authored-by: Shlok Patel <shlokcpatel2001@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
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
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.
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.
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.
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>
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.
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.
"role:members" group name is displayed as "Everyone except guests"
in the UI and "role:everyone" group name is displayed as
"Everyone including guests".
Before this, we were using `is_user_in_setting_group` which does not do
the extra checks around a guest user's permissions (and in future, some
other checks).
We introduced `initialize_and_override_current_user` in stream_data test
to make it easier to set current_user.user_id.
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
We can configure a custom playground for any language, including ones
which we don't have in our typeahead suggestions. One might then want to
make that language the default for code blocks, which is now possible
with this commit.
Fixes: #33282.
This commit updates the traditional url of a channel-topic narrow
to topic permalink upon arrival of new message in the narrow, by
using the `with` operator on it.
The requirement for this change arises when we navigate to an
empty topic. Since it has no messages yet, we fallback to the
traditional channel-topic links. However, when a new message
arrives to this empty topic, we want the url to live update to
a permalink of the narrow.
This is done as an effort to make sure channel-topic narrows
always contain `with` term.
This commit updates the topic links obtained from clicking
the topics in the left sidebar, recent view and inbox, and
those obtained from "Copy link to topic" to use the new
topic permalinks.
Fixes part of #21505.
This commit adds typing indicators for message editing in stream
as well as in dm, if the send typing notification
for corresponding is enabled.
Based on earlier work in #28585.
Co-authored-by: Rohan Gudimetla <rohan.gudimetla07@gmail.com>
Fixes#25719.
Earlier, it was not possible to configure the user that the forwarded
email will be sent by.
This commit updates the 'Generate channel email address' modal to
make sender configurable when generating channel email.
Fixes#31566.
'can_access_stream_email' function determines who can
generate email to send message in a channel.
Earlier, the function was not considering channel post policy.
So, a user which doesn't have permission to post in
a channel as per channel post policy could generate channel email.
This commit makes sure to not show the "Generate email address"
button in such cases.
We show the button only if the current user or any of the bots
they control has the permission to post in the channel.
Fixes part of #31566.