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

feat: enable pausing handling keystrokes in watch mode #2041

Conversation

szymonrybczak
Copy link
Collaborator

Summary:

In this PR I created KeyPressHandler that allows us to pause handling keystrokes because in nearest future we will add interactive prompts to start command, so they will run in watch mode. If we do not pause the handling keystrokes, the "focus" will be on the prompt. I created a function that wraps prompts and pauses and resumes interactivity in watchMode.

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js start
  1. Press key that we're handling (a, i, d, r) and check if keystrokes are properly handled.

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nits and this is good to go

@szymonrybczak szymonrybczak requested a review from thymikee August 10, 2023 07:56
@thymikee thymikee merged commit 4b281bd into react-native-community:main Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants