Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of pressing Esc during message compose #1342

Open
neiljp opened this issue Mar 21, 2023 · 11 comments · May be fixed by #1362 or #1442
Open

Improve handling of pressing Esc during message compose #1342

neiljp opened this issue Mar 21, 2023 · 11 comments · May be fixed by #1362 or #1442
Labels
area: hotkeys area: message compose further discussion required Discuss this on #zulip-terminal on chat.zulip.org help wanted This issue should be clear enough to work on high priority should be done as soon as possible

Comments

@neiljp
Copy link
Collaborator

neiljp commented Mar 21, 2023

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 ~ TRACKING: Develop drafts feature #302)

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

@neiljp neiljp added help wanted This issue should be clear enough to work on high priority should be done as soon as possible area: hotkeys further discussion required Discuss this on #zulip-terminal on chat.zulip.org area: message compose labels Mar 21, 2023
@zulipbot
Copy link
Member

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

@srdeotarse
Copy link
Collaborator

@zulipbot claim

@srdeotarse srdeotarse linked a pull request Mar 28, 2023 that will close this issue
18 tasks
srdeotarse added a commit to srdeotarse/zulip-terminal that referenced this issue Mar 28, 2023
Fixes zulip#1342
If length of text in msg compose box > 10, then only show confirmation
popup.
@zulipbot
Copy link
Member

zulipbot commented Apr 10, 2023

@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!

@abdulmoiz37
Copy link
Collaborator

abdulmoiz37 commented Apr 10, 2023

@zulipbot claim

@srdeotarse
Copy link
Collaborator

I am working on this issue.

@rsashank
Copy link
Member

rsashank commented Nov 8, 2023

@zulipbot claim

@rsashank rsashank linked a pull request Nov 11, 2023 that will close this issue
18 tasks
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Nov 11, 2023
@zulipbot
Copy link
Member

zulipbot commented Nov 18, 2023

@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!

rsashank added a commit to rsashank/zulip-terminal that referenced this issue Dec 8, 2023
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Dec 19, 2023
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Dec 19, 2023
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Dec 19, 2023
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Dec 21, 2023
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Jan 11, 2024
Fixes zulip#1342.
Introduces variable CONFIRMATION_MSG_LENGTH to set how many characters
are required in compose box to prompt a popup instead of the
current instant exit when Esc is pressed.
@enock-arthur
Copy link

I would like to work on this

@enock-arthur
Copy link

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Mar 5, 2024

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)!

@rsashank
Copy link
Member

rsashank commented Mar 5, 2024

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

rsashank added a commit to rsashank/zulip-terminal that referenced this issue Apr 11, 2024
Introduces variable MAX_MESSAGE_LENGTH_CONFIRMATION_POPUP to set
a threshold for maximum length of message in compose box beyond
which it prompts a confirmation popup instead of the current
instant exit when Esc is pressed.

Fixes zulip#1342.
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Apr 11, 2024
Introduces variable MAX_MESSAGE_LENGTH_CONFIRMATION_POPUP to set
a threshold for maximum length of message in compose box beyond
which it prompts a confirmation popup instead of the current
instant exit when Esc is pressed.

Fixes zulip#1342.
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Apr 11, 2024
Introduces variable MAX_MESSAGE_LENGTH_CONFIRMATION_POPUP to set
a threshold for maximum length of message in compose box beyond
which it prompts a confirmation popup instead of the current
instant exit when Esc is pressed.

Fixes zulip#1342.
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Apr 15, 2024
Introduces variable MAX_MESSAGE_LENGTH_CONFIRMATION_POPUP to set
a threshold for maximum length of message in compose box beyond
which it prompts a confirmation popup instead of the current
instant exit when Esc is pressed.

Fixes zulip#1342.
rsashank added a commit to rsashank/zulip-terminal that referenced this issue Apr 15, 2024
Introduces variable MAX_MESSAGE_LENGTH_CONFIRMATION_POPUP to set
a threshold for maximum length of message in compose box beyond
which it prompts a confirmation popup instead of the current
instant exit when Esc is pressed.

Fixes zulip#1342.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: hotkeys area: message compose further discussion required Discuss this on #zulip-terminal on chat.zulip.org help wanted This issue should be clear enough to work on high priority should be done as soon as possible
Projects
None yet
6 participants