Skip to content

KeyboardInput experiment#3

Merged
schinns merged 2 commits intoschinns:masterfrom
bryphe:test-keyboard-input
Jun 10, 2019
Merged

KeyboardInput experiment#3
schinns merged 2 commits intoschinns:masterfrom
bryphe:test-keyboard-input

Conversation

@bryphe
Copy link
Contributor

@bryphe bryphe commented Jun 7, 2019

Hi @benschinn !

Just an experiment adding the <KeyboardInput /> from this PR: revery-ui/revery#509

Also experimented with some of the semantic components we have now (<Center />, <Container />) - feel free to use the Style instead though (whichever you prefer).

switch(state.gameState) {
| Stop => (
<View
ref={r => Focus.focus(r)}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The KeyboardInput at least lets us remove this ref/focus handling (handles it under the hood for us). Since the <KeyboardInput /> also grabs input if its lost - it seemed to work more reliably for me when clicking on the screen.

Copy link
Owner

Choose a reason for hiding this comment

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

Ah!I like that <Keyboard /> handles ref/focus under the hood!

@schinns schinns merged commit f2c2405 into schinns:master Jun 10, 2019
@schinns
Copy link
Owner

schinns commented Jun 10, 2019

@bryphe sorry I just noticed your PR! Sorry for the late reply. 😅

But I think the changes you suggested make more sense semantically. Thank you for your help here! ❤️

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants