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

KeyboardInput experiment #3

Merged
merged 2 commits into from
Jun 10, 2019
Merged

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

@@ -52,21 +52,20 @@ let createElement = (~children as _, ()) =>
(hooks,
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