-
Notifications
You must be signed in to change notification settings - Fork 426
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
[form-builder] Make inputs focusable and manage form builder focus #393
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Looks good from an initial glance - will take a deeper look in a bit. Would you mind rebase this against the current next? |
bjoerge
force-pushed
the
focus-handling
branch
from
November 30, 2017 06:50
d24ce42
to
441659e
Compare
bjoerge
force-pushed
the
focus-handling
branch
from
November 30, 2017 06:50
441659e
to
9b55ee9
Compare
Rebased |
rexxars
approved these changes
Nov 30, 2017
rexxars
pushed a commit
that referenced
this pull request
Dec 1, 2017
rexxars
pushed a commit
that referenced
this pull request
Dec 6, 2017
skogsmaskin
pushed a commit
that referenced
this pull request
Dec 7, 2017
rexxars
pushed a commit
that referenced
this pull request
Dec 7, 2017
rexxars
pushed a commit
that referenced
this pull request
Dec 20, 2017
bjoerge
added a commit
that referenced
this pull request
Jan 9, 2018
bjoerge
added a commit
that referenced
this pull request
Jan 9, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this is finally in a state that can be released.
Summary:
onFocus
-events and tracks the current focus path on its state..focus()
method. The responsibility of calling this method according to current focus path belongs to theFormBuilderInput
-component (which is a delegate for each and every input component in the form builder).path
-prop, which is appended to eachonFocus
-events. We could use this path to automatically append path segments to patch events too, but that should probably be done in a separate pass as it requires a bit more thinking to ensure backwards compatibility with custom input components.Styleable
HOC from DefaultTextInput and DefaultFieldtext. (I'm starting to realize that Higher Order Components should be avoided as they often introduces more problems than they solve). In this particular case,Styleable
just did a simple merge of aprop
anyway, so its better to leave it explicit IMO.Remaining bits:
focus()
, nor do they emitonFocus
for nested fields.None of the remaining bits are blockers, and can be fixed later on. Lets get this merged and keep it for a few days in
next
to smoke out new 🐛 before we release.