Always scroll to the top where there are new options selected#9798
Merged
Conversation
MariaHCD
previously approved these changes
Jul 11, 2022
Co-authored-by: Maria D'Costa <maria@expensify.com>
Contributor
Author
|
Updated |
Contributor
Author
|
I wish GH was smart enough to know that if all I did was commit your suggestion it shouldn't dismiss your approving review 😠 |
MariaHCD
approved these changes
Jul 12, 2022
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
95 tasks
Contributor
Contributor
|
🚀 Deployed to production by @chiragsalian in version: 1.1.84-13 🚀
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
The previous version of this component was not scrolling to the top when new items were selected with something other than the
Enterkey. It's interesting that it was consistently reproducible because I believe this was a race condition betweensetState,scrollToIndex, and theonSelectRowcallback triggeringcomponentDidMount.In any event, this simplifies things a bit and seems to work in all cases.
Fixed Issues
$ #9742
Tests / QA Steps
Note: Created issue for existing console error: #9799
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly 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)PR Reviewer Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followed/** comment above it */displayNamepropertythisproperly 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)Screenshots
Web
Screen.Recording.2022-07-08.at.12.22.00.AM.mov
Mobile Web
Simulator.Screen.Recording.-.iPhone.13.-.2022-07-08.at.14.50.56.mp4
Desktop
Screen.Recording.2022-07-08.at.2.54.23.PM.mov
iOS
iOSScrollToTop.mov
Android
Screen.Recording.2022-07-08.at.3.19.58.PM.mov