-
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
Feature: Make the mentions auto-complete menu scrollable #21196
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
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.
@abdulrahuman5196 I agree, fixed.
@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. |
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.
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? |
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.
Just a couple small comments.
src/CONST.js
Outdated
@@ -847,7 +847,11 @@ const CONST = { | |||
ITEM_HEIGHT: 40, | |||
SMALL_CONTAINER_HEIGHT_FACTOR: 2.5, | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, |
src/CONST.js
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.
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
@
.:he
in 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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