Commit Graph

21 Commits

Author SHA1 Message Date
Aman Agrawal 4e7bb6c57a message_edit: Show confirm dialog to explain the behaviour. 2024-11-18 15:06:26 -08:00
Aman Agrawal 98265fd149 message_edit: Fix edit last msg hotkey unintentionally marks msgs read.
Fixes #17737

If you write a message in a narrowed view, then go back to an unnarrowed
view, there may now be many unread messages between your new current
position and the message you just wrote. If you then accidentally press
`←`, all of those messages will be marked read unexpectedly, causing you
to lose your place while catching up.

So, we disable the hotkey in this scenario to fix this bug.
2024-11-18 15:06:26 -08:00
Aman Agrawal dd58698c02 message_edit: Rename variable for clarity. 2024-11-18 15:06:26 -08:00
Aman Agrawal c16f3c5eca message_edit: Remove incorrect `from_scroll` value.
Since it is important that the message being edited is visible,
it is safe to ignore `from_scroll` here which is also an
unlikely possibility here.
2024-11-18 15:06:26 -08:00
Sayam Samal ef929efa1f message_edit: Rename disable-btn class.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Anders Kaseorg ec3177c834 web: Add explicit extensions to imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Vector73 ed5638ec3c settings: Add `can_move_messages_between_topics_group` realm setting.
Added `can_move_messages_between_topics_group` realm setting to replace
`edit_topic_policy`.
2024-10-29 16:27:04 -07:00
sanchi-t 5dfa8ac9fe popover_menus_data: Hide actions user can't take for archived channels. 2024-10-25 16:06:42 -07:00
Vector73 1be0cb1b75 settings: Add `can_move_messages_between_channels_group` realm setting.
Added `can_move_messages_between_channels_group` realm setting to replace
`move_messages_between_streams_policy`.
2024-10-16 14:26:18 -07:00
Kislay Udbhav Verma 8b7820ca71 resolve_topic: Change dialog button text.
We replace the comma in the buttons to an em dash.
This is a follow up to #31312.
2024-10-11 11:49:18 -07:00
Kislay Udbhav Verma a787c7ff80 topic: Add a first-time explanation for "Resolve topic".
We show a confirmation dialog explaining the "resolve topics"
feature when the user marks a topic resolved for the first time.
If the user confirms the action, we mark the
topic resolved, else we don't.

We don't show anything the first time a topic is marked
unresolved.

Fixes #31242
2024-10-09 18:12:55 -07:00
Aman Agrawal 521bb1f722 message_edit: Fix `save/cancel` on message edit form not working.
`Enter` keypress on `save/cancel` was not working for users without
`should_enter_send` user setting due to it being prevented from
triggering default behaviour.

Fixed by only handling enter keypress if pressed inside
`message_edit_content` textarea.`
2024-09-23 10:58:57 -07:00
Aman Agrawal 33a677f317 message_edit: Fix `tab + enter` broken for saving.
There is no `.message_edit_content` in `focus` when user does
`tab + enter` to save the message. We use the existing text
content edit object get identify the row being edited which is
more robust and efficient.
2024-09-20 18:40:18 -07:00
Sayam Samal 2e4e017a18 copy: Use redesigned copy button in view original message UI.
This commit also updates the copy icon in the related /help docs.
2024-09-20 15:44:20 -07:00
Sayam Samal a95c6a610e copy: Indicate successful copy by displaying a check icon momentarily. 2024-09-20 15:44:20 -07:00
Aman Agrawal a35c8a08de message_edit: Attach keydown to $form instead of textarea.
This allows any event handlers that are attached to textarea
like typeahead to handle the keypress and stop propagation if
they successfully handle it.

This fixes a bug where message edit form gets saved on enter keypress
instead of selecting the active item in the message edit typeahead.

Introduced in 0696e234bd.
2024-09-20 09:50:38 -07:00
joseph 5d3edf06c8 message_edit: Ask users to delete attachments after editing.
currently, after a user edits a message and removes an reference to the
uploaded file, the uploaded file stays on the storage taking up space.
We want to ask the user to possibly delete the removed attachments if
they are no longer needed. These changes applies a modal that will appear
prompting the user to delete the attachments.

Fixes: #25525.

Co-authored-by: brijsiyag
Co-authored-by: wandrew0
2024-09-06 11:40:51 -07:00
Aditya Kumar Kasaudhan b2ab77746b compose: Fix disabled buttons after exiting preview mode in edit UI.
This commit fixes the issue by ensuring that the `clear_preview_area` function is called within the `end_message_row_edit` method. This ensures that when the edit UI is reopened, it resets to the correct state, with all buttons enabled and functioning as expected.

Fixes #31503.
2024-09-03 09:19:10 -07:00
Sayam Samal e4f1156bea condense: Dynamically render content for message length toggle.
This moves the content inside `message_length_controller` to a new
handlerbars template `message_length_toggle.hbs`, and dynamically
renders the content based on the message length.

Since the majority of the messages aren't collapsed/condensed, this
change should improve the initial rendering of the message list.

Fixes #31133.
2024-08-29 15:52:08 -07:00
evykassirer 113de14547 message_edit: Remove TODOs to parse more data that we don't need.
I'd thought maybe we want to make sure they were in sync, but we don't
need to parse the full data structure.
2024-08-20 09:48:15 -07:00
evykassirer b1198785be message_edit: Convert module to typescript. 2024-08-19 16:33:04 -07:00