-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Prevent emoji Picker list jumping while scrolling through arrow keys #13787
Conversation
…vantage of flatlist getItemLayout for fixed height optimization
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you quickly add comments for the params and a brief comments for the method also?
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.
Added
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 |
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.
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. |
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.
LGTM too!
@Luke9389 all yours!
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? |
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.
Looks great, thanks
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component 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