Commit Graph

25 Commits

Author SHA1 Message Date
Vector73
7b60b2edca stream_popover: Show clear button if topic input is not disabled.
Previously, if the topic input was disabled when "Move messages"
modal was opened, the clear button was not added to the DOM
which caused the bug where the clear button was not shown even
if the topic input was later enabled because user was allowed to edit
topics in the selected channel.
2025-07-09 14:25:53 -07:00
Saubhagya Patel
869e81f14c popovers: Add an x button to topic field in move topic/message modal.
Fixes #33729.
2025-04-07 18:23:12 -07:00
Aman Agrawal
e365ac6d11 move_topic_to_stream: Tag text for translation. 2025-03-18 09:12:23 -07:00
Prakhar Pratyush
4cc0d52f74 move_topic: Improve placeholder when topic is not mandatory.
Earlier, we used to show "general chat" as the placeholder.

This commit adds support to show "Enter a topic (skip for general
chat)" as the placeholder when topic is not mandatory in the
move-topic-new-topic input box.

We show "general chat" (as we show in compose topic input box)
when move-topic-new-topic input box is not focused and topic="".

Fixes #33846.
2025-03-17 10:56:01 -07:00
Joseph Ho
0750c210f7 topic-move: Add warning banner if moving messages to existing topic.
In the move topic modal, when the user would merge messages into an
existing conversation, then we display a warning banner in the modal.
This is similar to the confirmation modal that appears when a user
edits a topic via the message feed header.

We do not show the warning for the empty/general topic for realms
that do not require topics, even if there are messages in the
general topic.

Fixes #31151.

Co-authored-by: Yiming He <heyimingfrog@gmail.com>
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-03-04 11:19:58 -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
Prakhar Pratyush
2416fec468 move_topic: Show "general chat" placeholder when mandatory_topics=false.
This commit updates the move topic modal to always show the empty
string topic placeholder when `mandatory_topics = false`.

It also improves the styling to make it italics.
2025-02-14 09:20:41 -08:00
Prakhar Pratyush
083861fed9 move_topic_modal: Show realm_empty_topic_display_name for topic="".
This commit adds support to display `realm_empty_topic_display_name`
value in the 'move topic modal' heading for topics having the actual
value of empty string.

Also, in the new_topic_name input box we show a placeholder of
`realm_empty_topic_display_name` value when the actual topic value
is empty string.
2025-01-14 13:52:54 -08:00
Saubhagya Patel
14a8fd124a popovers: Restructure the Move Messages and Move Topic Modals.
This commit restructures the layout of the move messages and move topic
modals to follow standard patterns from other modals (e.g., the invite
user modal). It includes the following changes:
- The intro text is removed from the modal for renaming a topic,
  moving a topic, and moving messages between topics.
- The intro text is moved to the modal heading.
- If the heading doesn't fit on one line, it is abbreviated using
  ellipsis.

Fixes #32168.
2024-12-12 13:04:32 -08:00
whilstsomebody
0ce7278edf move_topic_popover: Show the number of messages to be moved.
Added a feature to the move message confirmation box to display the
count of messages that will be moved. The count updates dynamically
based on the selected option in the dropdown.

Fixes #23115.
2024-12-11 12:32:04 -08:00
Anders Kaseorg
d763cbfa2c stream_popover: Read propagate_mode via the existing .serializeArray().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 16:55:00 -08:00
Karl Stolley
d91321a2c4 cleanup: Remove singleton .new-style class refs. 2024-09-11 14:22:45 -07:00
Karl Stolley
8c984f68ec checkboxes: Decouple label.checkbox from .new-style tangle. 2024-09-11 14:22:45 -07:00
evykassirer
ec43b41c2f move_topic: Remove extraneous classname on hidden input, fixes bug.
We initialize the topic typeahead in the modal with the element
`$("#move_topic_form .move_messages_edit_topic")`, which previously
was capturing two elements, the second one being a hidden input
element.

This wasn't causing issues, but once we added `util.the` in the
typeahead code we were getting errors for having multiple elements
where we expected one.

The fix is removing `move_messages_edit_topic` from the hidden
element's classnames, since that class is only used for input
and styling things.
2024-09-03 20:50:34 -07:00
iks1
10c15de0c6 popovers: Simplify instructions for moving topics/messages.
Modified the `Select a channel below or change topic name.`
instruction in `move topics/move messages` modal.
It's not necessary and can be confusing when user does not
have permissions to change the channel and topic name.

1) On the `Move topic` modal, dropped the line
2) On the `Move messages` modal, replaced the
   line with `Move messages to:`

Fixes #30055.
2024-07-10 20:35:40 -07:00
adnan-td
4bde1586e4 topic_name: Fix compressing of display topic names.
Fixes part of #30478.
2024-06-26 12:23:32 -07:00
Lauryn Menard
4dcb0258a5 web-i18n: Update frontend translated strings for stream rename channel.
Updates translated strings in web/ that do not need updates to any
tests. The majority of these strings are also unique to the file/
template that they are in. A few have overlap with one other file.

Some changes here update placeholders/variables in these strings to
no longer use stream so that all the translation updates for this
rename happen at the same time.

The exception to this are cases of "<z-stream>" placeholders in
these translated strings.

Part of the stream to channel rename project.
2024-04-24 14:35:04 -07:00
Mahhheshh
1c48ed0a1c stream picker: Remove stream colorblock.
To achive this the `stream_header_colorblock` div was removed from
`dropdown_widget_with_stream_colorblock.hbs` template. this change made
the file name irelevenet so it was necessary to rename the file to
`dropdown_widget_wrapper.hbs`. After removing the html strcuture for
colorblock from templates the css for colorblock was also removed.
followed by the javascript which was used to add colorblock to the
stream picker. After removing javascript tests were updated.
Fixes: #28796.
2024-03-15 11:11:04 -07:00
Sayam Samal
5c82a923a9 message-editing: Make default "Move messages" form context-dependent.
In the previous menu for moving messages, the default option was
"Move this and all following messages." However, this default choice
was not always aligned with user intentions, particularly when moving
the first or last message in a topic. In such cases, the desired
behavior often corresponds to "Move all messages in this topic" for the
first message and "Move only this message" for the last message.

To address this, we have updated the default options as follows:

1. **When moving the first message in a topic:** The default option is
now "Move all messages in this topic." This change better represents
the user's intention when moving the initial message in a topic.

2. **When moving the last message in a topic:** The default option has
been adjusted to "Move only this message." This change ensures that
users can easily move the last message without affecting other messages
in the topic.

These changes are designed to enhance the user experience and
facilitate the management of topics, especially when users follow or
unmute topics.

Fixes: #27298.
2023-11-21 18:15:11 -08:00
Aman Agrawal
6efcb7a349 dropdown_widget: Refactor to use Class. 2023-07-27 14:10:08 -07:00
Aman Agrawal
fcac413138 move_topic_to_stream: Migrate to use tippy dropdown widget. 2023-07-11 13:37:50 -07:00
Hardik Dharmani
cfbcbe901a topic_edit: Rename inline_topic_edit to move_messages_edit_topic.
In move_topic modal, Renamed inline_topic_edit to
move_messages_edit_topic to be more specific selector as
inline_topic_edit is also used in message header.

Additionally, Removed id inline_topic_edit as it was only used
in zulip.css instead used `.inline_topic_edit` selector as that
element also have class with same name inline_topic_edit.

Fixes #24805
2023-05-09 13:51:07 -07:00
Sahil Batra
8874328b87 stream_popover: Add "Rename topic" option in topic sidebar popover.
This commit adds "Rename topic" option in topic sidebar popover
which will be shown when user is only allowed to edit topics and
not streams.

Note that we still cannot show or hide the option as per the time
limit setting (since client may not have the first message of the
topic locally), so we just show or hide it as per
move_messages_within_stream_policy setting.

Fixes #19886.
2023-04-18 09:01:39 -07:00
Sahil Batra
1c6bed55e4 modals: Add modal_text_input class to text inputs.
This commit adds modal_text_input class to text inputs
in modals to set width of them as set by bootstrap.
This class is used to set the width of inputs to 206px,
as we will be removing the boostrap rule which sets width
of the input in further commits.
2023-03-27 22:34:30 -07:00
Anders Kaseorg
c1675913a2 web: Move web app to ‘web’ directory.
Ever since we started bundling the app with webpack, there’s been less
and less overlap between our ‘static’ directory (files belonging to
the frontend app) and Django’s interpretation of the ‘static’
directory (files served directly to the web).

Split the app out to its own ‘web’ directory outside of ‘static’, and
remove all the custom collectstatic --ignore rules.  This makes it
much clearer what’s actually being served to the web, and what’s being
bundled by webpack.  It also shrinks the release tarball by 3%.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00