-
Notifications
You must be signed in to change notification settings - Fork 734
Move from KeyboardAwareListView to KeyboardAwareFlatList #960
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
Conversation
…ecate KeyboardAwareListView)
src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js
Outdated
Show resolved
Hide resolved
onLayout={(layoutEvent) => { | ||
this._onKeyboardAwareViewLayout(layoutEvent.nativeEvent.layout); | ||
}} | ||
onScroll={(event) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for the onScroll callback.
maybe you can unify the logic in KeyboardAwareBase.
Anyway, avoid passing inline callbacks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you didn't update KeyboardAwareListView
with the same fixes..
Is that because we're deprecating the component ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, it should be aligned even if it should not be used, fixed
src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js
Outdated
Show resolved
Hide resolved
src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js
Outdated
Show resolved
Hide resolved
@@ -81,6 +81,9 @@ export default { | |||
get KeyboardAwareListView() { | |||
return require('./components/KeyboardAwareScrollView').KeyboardAwareListView; | |||
}, | |||
get KeyboardAwareFlatList() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I notice we export KeyboardAwareFlatList, KeyboardAwareScroll and KeyboardAwareListView as standalone components and not as part of the Keyboard group.
Why is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did not start migrating all of the OS libs, only react-native-keyboard-input
and react-native-keyboard-tracking-view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But still?
Why not include them in the keyboard namespace?
Which libraries we have left?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fear that someone will start using it, and I'm not sure there won't be conflicts (in native code).
We're using the Keyboard
as is in the private lib and we're not exporting the KeyboardAware
part (which is installed from the original by the engine).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, these are the ones I remember:
https://github.com/wix/react-native-keyboard-aware-scrollview
https://github.com/wix/react-native-autogrow-textinput
I think I left my notebook with the notes in the office :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fear that someone will start using it, and I'm not sure there won't be conflicts (in native code).
We're using the Keyboard as is in the private lib and we're not exporting the KeyboardAware part (which is installed from the original by the engine).
Im a little confused about this one..
let's have a quick talk about when you have time..
…e scrollToEnd and remove ScrollViewManager (which is iOS only)
* master: Fix missed issue with migrating Picker API - PickerItem needs to retrieve the correct value format Add Slider testID (#999) Remove declaration of ref type on TouchableOpacity convert three digit hex to six (#976) Fix/text field right icon alignment (#997) migrate Switch to TS (#991) Move from KeyboardAwareListView to KeyboardAwareFlatList (#960) Update constants typings migrate ActionBar to TS (#987) Do not notify the user onPageChange for the fake page (fix autoscroll on Android bug) (#994) Add progress type for ProgressBarProps (#996) Fix generated JS files to include propTypes (#995) # Conflicts: # generatedTypes/components/touchableOpacity/index.d.ts
Description
KeyboardAwareFlatList - add new type to the KeyboardAware view and deprecate KeyboardAwareListView
I think we need to do some more refactoring around this (fix warnings and code duplications), but maybe in another task\PR.
Changelog
Move from KeyboardAwareListView to KeyboardAwareFlatList