Feature: Make the mentions auto-complete menu scrollable#21196
Conversation
|
@abdulrahuman5196 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@Nikhil-Vats Screen.Recording.2023-06-22.at.4.24.05.PM.mp4 |
|
@Nikhil-Vats as far as I tested other functions are working fine. Could you kindly fix the above issue and ping here so that i can review again, |
|
@abdulrahuman5196 fixed! You can review it again. |
| const emojiRowCount = isAutoSuggestionPickerLarge | ||
| ? Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) | ||
| : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); | ||
| const getMaxArrowIndex = (numRows, isAutoSuggestionPickerLarge, isMentionSuggestion = false) => { |
There was a problem hiding this comment.
Maybe instead of isMentionSuggestion param, can we use maxAmountOfItems = CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS param and for mentions we would pass CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_MENTIONS.
Seems to be cleaner. Or other suggestions also welcome, but the current change doesn't seem clean.
|
@Nikhil-Vats App is crashing on the below steps,
Screen.Recording.2023-06-22.at.8.37.22.PM.mp4 |
|
@abdulrahuman5196 fixed. Added |
|
@Nikhil-Vats It seems the latest update from the thread is to have consistent number between emojis and suggestions. So we can show 20 emojis as well. |
|
@abdulrahuman5196 done. |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-06-23.at.12.43.03.PM.mp4Mobile Web - Chromeaz_recorder_20230623_125053.mp4Mobile Web - SafariUntitled.mp4DesktopScreen.Recording.2023-06-23.at.1.54.31.PM.mp4iOSScreen.Recording.2023-06-23.at.1.09.17.PM.mp4Androidaz_recorder_20230623_140435.mp4 |
|
NAB: Kindly mark the "Verify that no errors appear in the JS console" in QA steps as well |
|
@abdulrahuman5196 done. |
abdulrahuman5196
left a comment
There was a problem hiding this comment.
Changes looks good and works well. Reviewers checklist also complete.
All yours. @puneetlath
🎀👀🎀
C+ Reviewed
Apologies for code redos due to delay in emoji consistency decision. @Nikhil-Vats
|
Are steps 6 and 7 of the test steps still accurate? |
|
Yeah, it needs to be updated. @Nikhil-Vats Could you kindly update the emoji steps to reflect latest change of 20 suggestions? |
puneetlath
left a comment
There was a problem hiding this comment.
Just a couple small comments.
| MIN_AMOUNT_OF_ITEMS: 3, | ||
| MAX_AMOUNT_OF_ITEMS: 5, | ||
| // max number of suggestions | ||
| MAX_AMOUNT_OF_ITEMS: 20, |
There was a problem hiding this comment.
I think a better name would take a way the need for the comment. Maybe like:
| MAX_AMOUNT_OF_ITEMS: 20, | |
| MAX_AMOUNT_OF_SUGGESTIONS: 20, |
| MAX_AMOUNT_OF_ITEMS: 20, | ||
| // used for limiting the height of suggestions container, we show a scrollable list | ||
| // with max height equal to MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW (5) * ITEM_HEIGHT. | ||
| MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW: 5, |
There was a problem hiding this comment.
Similarly, with a better constant name, I think we can obviate the need for the comment. How about:
| MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW: 5, | |
| MAX_AMOUNT_OF_VISIBLE_SUGGESTIONS_IN_CONTAINER: 5, |
|
@abdulrahuman5196 @puneetlath changed test steps and constant names. You can review again. |
abdulrahuman5196
left a comment
There was a problem hiding this comment.
Changes looks good and works well. Reviewers checklist also complete.
All yours @puneetlath . Good to merge.
🎀👀🎀
C+ Reviewed
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 1.3.32-1 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.32-5 🚀
|
Details
Make the mentions menu auto-scrollable and limit the maximum mentions to 20.
Fixed Issues
$ #20481
$ #20481 (comment)
Tests
@.:hein composer. Verify 20 emojis are shown and menu is scrollable.:heart_) and emojis should be filtered further.Offline tests
Same as above.
QA Steps
Same as above.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
20481_chrome.mov
Mobile Web - Chrome
20481.web.chrome.mov
Mobile Web - Safari
safari.ios.MP4
Desktop
20481_desktop.mov
iOS
20481.ios.mov
Android
20481.android.mov