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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support focusable, Yellowbox on acceptsKeyboardFocus #655
Conversation
Fixes microsoft#498 This change adds support for the "focusable" property present in upstream RN, along with react-native-windows and NetUI. We need to reconcile this against the existing acceptsKeyboardFocus property. This is tricky since its usage was untyped. We follow the same strategy as react-native-windows for this. 1. Usages of acceptsKeyboardFocus will continue to work, but will yellowbox 2. Components will prefer to use focusable, and Touchables with slightly different semantics will prefer focusable semantics when present acceptsKeyboardFocus will redbox in RNW 0.64 instead of yellowbox, but this change should allow xplat code to use focusable and not be effected by that. Validated setting a view to focusable is propagated, and that acceptsKeyboardFocus is propagated with a yellowbox.
Need to fix prettier formatting stuff. Will take a look at what's going on with the podfile lock. |
Need to remove focusable from the TouchableHighlight snapshot. This looks expected though, since upstream behavior (differing from aceptsKeyboardFocus) is to not set the View to be focusable without an onPress handler, with the snapshot test doesn't seem to provide. |
And RCTSinglelineTextInputView snaps already had focusable it looks like 馃槃 . |
/azp run |
No pipelines are associated with this pull request. |
馃殌 |
Please select one of the following
Summary
Fixes #498
This change adds support for the "focusable" property present in upstream RN, along with react-native-windows and NetUI. We need to reconcile this against the existing acceptsKeyboardFocus property. This is tricky since its usage was untyped. We follow the same strategy as react-native-windows for this.
acceptsKeyboardFocus will redbox in RNW 0.64 instead of yellowbox, but this change should allow xplat code to use focusable and not be effected by that.
Changelog
[macOS] [Added] - Support focusable, Yellowbox on acceptsKeyboardFocus
Test Plan
Validated setting a view to focusable is propagated, and that setting a view to acceptsKeyboardFocus works but triggers a yellowbox. More fine-grained tests for Touchable were done with the same changes in react-native-windows.
Microsoft Reviewers: Open in CodeFlow