-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make ReactionPicker full screen with search by emoji title #780
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #780 +/- ##
==========================================
Coverage ? 86.92%
==========================================
Files ? 39
Lines ? 673
Branches ? 117
==========================================
Hits ? 585
Misses ? 71
Partials ? 17
Continue to review full report at Codecov.
|
@IlarionHalushka Can you resolve conflicts? |
@diegolmello I resolved conflicts and Made a few performance improvements like: using caching of images (custom emoji), use debounce on handleSearch, remove unneeded View wrappers. Then I decided to hide frequently used if there are 0 items. Finally fixed header title, not sure why it was not displaying when I used |
# Conflicts: # __tests__/__snapshots__/Storyshots.test.js.snap # app/containers/EmojiPicker/CustomEmoji.js # app/containers/message/Message.js # app/containers/message/index.js # app/index.js # app/views/RoomView/index.js # package.json # yarn.lock
@@ -1,12 +1,12 @@ | |||
import React from 'react'; | |||
import { Image } from 'react-native'; | |||
import { ViewPropTypes, Image } from 'react-native'; |
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.
Don't use ViewPropTypes
@@ -33,7 +38,7 @@ export default class EmojiCategory extends React.Component { | |||
onEmojiSelected: PropTypes.func, | |||
emojisPerRow: PropTypes.number, | |||
width: PropTypes.number | |||
} | |||
}; |
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.
Why?
initialNumToRender={45} | ||
getItemLayout={(data, index) => ({ length: this.size, offset: this.size * index, index })} | ||
initialNumToRender={30} | ||
getItemLayout={(data, index) => ({ |
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.
Create a function
@@ -1,44 +1,56 @@ | |||
const list = ['frequentlyUsed', 'custom', 'people', 'nature', 'food', 'activity', 'travel', 'objects', 'symbols', 'flags']; | |||
const titles = ['FREQUENTLY USED', 'CUSTOM', 'PEOPLE', 'NATURE', 'FOOD', 'ACTIVITY', 'TRAVEL', 'OBJECTS', 'SYMBOLS', 'FLAGS']; |
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.
i18n
@@ -94,12 +97,12 @@ export default class EmojiPicker extends Component { | |||
database.write(() => { | |||
database.create('frequentlyUsedEmoji', emoji, true); | |||
}); | |||
}) | |||
}); |
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.
Why?
OnboardingView: { | ||
screen: OnboardingView, | ||
header: null | ||
const OutsideStack = createStackNavigator( |
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.
Why?
@@ -110,6 +121,12 @@ const ChatsStack = createStackNavigator({ | |||
SearchMessagesView, | |||
SelectedUsersView, | |||
ThreadMessagesView, | |||
ReactionPickerView: { | |||
screen: ReactionPickerView, | |||
navigationOptions: { |
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.
Do it on the ReactionPickerView
}, { | ||
defaultNavigationOptions: defaultHeader | ||
}); | ||
const NewMessageStack = createStackNavigator( |
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.
Why?
initialRouteName: 'AuthLoading' | ||
} | ||
)); | ||
const App = createAppContainer( |
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.
Why?
@@ -17,7 +16,15 @@ export default function messages(state = initialState, action) { | |||
return { | |||
...state, | |||
showActions: true, | |||
actionMessage: action.actionMessage | |||
actionMessage: { |
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.
This is error prone.
@RocketChat/ReactNative
Closes #765
Hi @diegolmello ! This is my first PR that fixes the issue "ReactionsPicker should be full screen" including search by emoji title.
Screenshot IOS: http://prntscr.com/n72mjg
Screenshot Android: http://prntscr.com/n73fbg
Video: https://drive.google.com/file/d/1UY7I5eWg5X60i_nCdQtjsnJ2FlTqqQKO/view?usp=sharing