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 #1362

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

srdeotarse
Copy link
Collaborator

@srdeotarse srdeotarse commented Mar 28, 2023

What does this PR do, and why?

Adds a confirmation popup to save composed message as a draft before exiting the message compose to avoid accidental exit while typing a message and loosing it.

External discussion & connections

  • Discussed in #zulip-terminal in Improve handling Esc during msg compose #T1342 #T1362 #T1442
  • Fully fixes Improve handling of pressing Esc during message compose #1342
  • Partially fixes issue #
  • Builds upon previous unmerged work in PR #
  • Is a follow-up to work in PR #
  • Requires merge of PR #
  • Merge will enable work on #

How did you test this?

  • Manually - Behavioral changes
  • Manually - Visual changes
  • Adapting existing automated tests
  • Adding automated tests for new behavior (or missing tests)
  • Existing automated tests should already cover this (only a refactor of tested code)

Self-review checklist for each commit

  • It is a minimal coherent idea
  • It has a commit summary following the documented style (title & body)
  • It has a commit summary describing the motivation and reasoning for the change
  • It individually passes linting and tests
  • It contains test additions for any new behavior
  • It flows clearly from a previous branch commit, and/or prepares for the next commit

Visual changes

image

This function facilitates showing a confirmation popup when esc key is
pressed when user is in the msg compose box.
@zulipbot zulipbot added the size: M [Automatic label added by zulipbot] label 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 Mar 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve handling of pressing Esc during message compose
3 participants