zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

Improve handling of pressing `Esc` during message compose

Open neiljp opened this issue 1 year ago • 11 comments

Currently Esc can be pressed to exit compose, without sending the message.

This can be useful if one wants to cancel the send, but can also be frustrating if accidentally hitting the key after having written a good message which you intend to send.

This can be made worse, if a key is near the Esc key and used for composition, eg. the ` key for inline code or quote/code blocks.

Ideas for resolving this:

  • Prompt with a confirmation popup to exit compose, if there is more than some threshold of content present (could be empty message, could be 5, 10, 15, ... characters)
  • Prompt with a variation on a confirmation popup, giving the option to save as a draft
  • Automatically save as a draft, but prompt if a draft already exists (like we do now)
  • Automatically save as a draft - *only possible if we support more than one draft in the session, ie. improve draft handling generally ~ #302)

Please discuss this in the stream before proceeding with this, since it would be good to get more views on this first.

neiljp avatar Mar 21 '23 01:03 neiljp

Hello @zulip/server-hotkeys members, this issue was labeled with the "area: hotkeys" label, so you may want to check it out!

zulipbot avatar Mar 21 '23 01:03 zulipbot

@zulipbot claim

srdeotarse avatar Mar 28 '23 13:03 srdeotarse

@srdeotarse You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

zulipbot avatar Apr 10 '23 02:04 zulipbot

@zulipbot claim

abdulmoiz37 avatar Apr 10 '23 10:04 abdulmoiz37

I am working on this issue.

srdeotarse avatar Apr 10 '23 10:04 srdeotarse

@zulipbot claim

rsashank avatar Nov 08 '23 12:11 rsashank

@rsashank You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

zulipbot avatar Nov 18 '23 15:11 zulipbot

I would like to work on this

enock-arthur avatar Mar 05 '24 13:03 enock-arthur

@zulipbot claim

enock-arthur avatar Mar 05 '24 13:03 enock-arthur

Welcome to Zulip, @enock-arthur! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

zulipbot avatar Mar 05 '24 13:03 zulipbot

Hello @enock-arthur, I already have an open PR for this, I'd recommend looking into other issues :)

rsashank avatar Mar 05 '24 13:03 rsashank