Prevent emoji Picker list jumping while scrolling through arrow keys#13787
Prevent emoji Picker list jumping while scrolling through arrow keys#13787Gonals merged 4 commits intoExpensify:mainfrom
Conversation
…vantage of flatlist getItemLayout for fixed height optimization
Santhosh-Sellavel
left a comment
There was a problem hiding this comment.
Mostly looks good, just some refactoring!
| getItemLayout={(data, index) => ( | ||
| {length: CONST.EMOJI_PICKER_ITEM_HEIGHT, offset: CONST.EMOJI_PICKER_ITEM_HEIGHT * index, index} | ||
| )} |
There was a problem hiding this comment.
Please move this into a separate function and like renderItem
| /** | ||
| * @param {*} data | ||
| * @param {Number} index | ||
| * @returns {Object} | ||
| */ | ||
| getItemLayout(data, index) { | ||
| return {length: CONST.EMOJI_PICKER_ITEM_HEIGHT, offset: CONST.EMOJI_PICKER_ITEM_HEIGHT * index, index}; | ||
| } | ||
|
|
There was a problem hiding this comment.
Can you quickly add comments for the params and a brief comments for the method also?
|
Test step 4
Could be changed to "Verify selected/highlighted emoji is fully visible in the view" |
Reviewer Checklist
Screenshots/VideosWebWeb_Emoji.movMobile Web - Chrome & Mobile Web - SafariScreen.Recording.2022-12-23.at.9.50.48.PM.movDesktopScreen.Recording.2022-12-23.at.3.58.40.AM.moviOSScreen.Recording.2022-12-23.at.4.02.40.AM.movAndroidScreen.Recording.2022-12-23.at.4.00.53.AM.mov |
Santhosh-Sellavel
left a comment
There was a problem hiding this comment.
LGTM tests well. All you @Gonals or @Luke9389
cc: @JmillsExpensify
|
Both Luke and Alberto are out today as a heads up. It looks like Luke is back on Monday, so let's re-assess where things are at then. |
|
Do we have to wait on @Luke9389 at this point? Now that at least one of you has approved, and so has C+, I say we go with that and merge this PR. |
|
Ooops, that was also meant to be a question on my part. @Gonals What do you think? |
|
Hey y'all. I've been OOO. PR looks good. Once the Reviewer checklist gets fixed feel free to merge w/o me. |
|
I don't see any issues with the checklist let's merge this one @Gonals |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
|
Thanks @Luke9389 and welcome back! |
|
🚀 Deployed to production by @chiragsalian in version: 1.2.45-0 🚀
|
|
Oops missed a minor detail! |

Details
Emoji picker menu height changes to display it properly and taking advantage of flatlist getItemLayout for fixed height optimization
Fixed Issues
$ #12772
PROPOSAL: #12772 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
web.mp4
Mobile Web - Chrome
Mobile Web - Safari
Desktop
desktop.mp4
iOS
ios.mp4
Android
android.webm