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

Reimplement Keyboarding Behavior on top of Pressability #4598

Closed
NickGerleman opened this issue Apr 14, 2020 · 3 comments · Fixed by #4930
Closed

Reimplement Keyboarding Behavior on top of Pressability #4598

NickGerleman opened this issue Apr 14, 2020 · 3 comments · Fixed by #4930

Comments

@NickGerleman
Copy link
Collaborator

We had previously patched Touchable to support activation by pressing down on spacebar, enter, or the gamepad "A" key. This code was rewritten in 0.62 with the introduction of Pressability. We need to reimplement our patches here. We should ideally make this change upstream as well, but we likely don't have enough keyboarding changes there yet.

@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Apr 14, 2020
@NickGerleman NickGerleman self-assigned this Apr 14, 2020
@NickGerleman NickGerleman added this to the 0.62 (M5) milestone Apr 14, 2020
@NickGerleman NickGerleman changed the title Touchable Cannot Be Activated By Keyboard or Gamepad (0.62) Touchable Cannot Be Activated By Keyboard or Gamepad Apr 14, 2020
@chrisglein chrisglein added Upstream must-have p1 and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Apr 16, 2020
@chrisglein
Copy link
Member

Obviously un-breaking controller and stuff is top priority (labeling must-fix). Upstreaming the changes would be good but isn't necessarily on the same timeline. Feel free to split out a separate issue for that.

@NickGerleman NickGerleman changed the title (0.62) Touchable Cannot Be Activated By Keyboard or Gamepad Reimplement Keyboarding Behavior on top of Pressability May 10, 2020
@NickGerleman
Copy link
Collaborator Author

NickGerleman commented May 10, 2020

Dropping this for now because I don't have the bandwidth to look at both this and the OOM issues preventing developers from building the app at the same time.

Clarified the title of this issue, since this requires a new implementation for 0.62 instead of straight mechanical work. Marking for discussion.

Hoping to pick this up again right after.

@NickGerleman NickGerleman added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label May 10, 2020
@NickGerleman
Copy link
Collaborator Author

Jumping back onto this. Don't remember why I took the triage tag off of this one...

@NickGerleman NickGerleman removed the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label May 14, 2020
NickGerleman added a commit to NickGerleman/react-native-windows that referenced this issue May 17, 2020
Fixes microsoft#4598

This change reenables touchables to be activated by keyboard/Gamepad. The implementation is mostly stolen from the previous that was used for Touchable. Like before, this doesn't participate in the input state machine, as its coupled to touch input. This means we don't get things like long-press detection, but we do still get feedback for key-in and key-out.

We should do something better when we upstream keyboard behavior to do proper integration into the Pressability state machine, but this is invasive enough that we shouldn't fork this.

Validated Spacebar and enter functionality with various touchables.
@ghost ghost closed this as completed in #4930 May 19, 2020
ghost pushed a commit that referenced this issue May 19, 2020
* Implement Keybpoarding/Gamepad Activation for Pressability

Fixes #4598

This change reenables touchables to be activated by keyboard/Gamepad. The implementation is mostly stolen from the previous that was used for Touchable. Like before, this doesn't participate in the input state machine, as its coupled to touch input. This means we don't get things like long-press detection, but we do still get feedback for key-in and key-out.

We should do something better when we upstream keyboard behavior to do proper integration into the Pressability state machine, but this is invasive enough that we shouldn't fork this.

Validated Spacebar and enter functionality with various touchables.

* Change files

* Flow fixes

* Fix typo
NickGerleman added a commit to NickGerleman/react-native-windows that referenced this issue May 19, 2020
…4930)

* Implement Keybpoarding/Gamepad Activation for Pressability

Fixes microsoft#4598

This change reenables touchables to be activated by keyboard/Gamepad. The implementation is mostly stolen from the previous that was used for Touchable. Like before, this doesn't participate in the input state machine, as its coupled to touch input. This means we don't get things like long-press detection, but we do still get feedback for key-in and key-out.

We should do something better when we upstream keyboard behavior to do proper integration into the Pressability state machine, but this is invasive enough that we shouldn't fork this.

Validated Spacebar and enter functionality with various touchables.

* Change files

* Flow fixes

* Fix typo
NickGerleman added a commit that referenced this issue May 19, 2020
* Implement Keybpoarding/Gamepad Activation for Pressability

Fixes #4598

This change reenables touchables to be activated by keyboard/Gamepad. The implementation is mostly stolen from the previous that was used for Touchable. Like before, this doesn't participate in the input state machine, as its coupled to touch input. This means we don't get things like long-press detection, but we do still get feedback for key-in and key-out.

We should do something better when we upstream keyboard behavior to do proper integration into the Pressability state machine, but this is invasive enough that we shouldn't fork this.

Validated Spacebar and enter functionality with various touchables.

* Change files

* Flow fixes

* Fix typo
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants