-
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
fix: Focus not removed when selection list changes. #39141
Conversation
Signed-off-by: Krishna Gupta <[email protected]>
@Krishna2323 please fix all of these: |
@situchan, only perf-tests are failing now. What can be the reason? |
@Krishna2323 please pull main again |
@situchan, still not resolved. |
Signed-off-by: Krishna Gupta <[email protected]>
@situchan, I'm unable to understand perf failure, do you have any suggestion? The code changes are also quite simple. |
I also have no idea why this is failing |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktop |
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 good except perf tests failure. Still need to investigate how to fix it.
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'm not sure what to do about the perf tests, I've started a thread here: https://expensify.slack.com/archives/C01GTK53T8Q/p1712085243828569
Signed-off-by: Krishna Gupta <[email protected]>
Signed-off-by: Krishna Gupta <[email protected]>
The performance tests are expected to fail based on this discussion, then the number of the selected options changes, we re-render the list to fix the focus. This will set a new baseline for the tests, lets keep an eye on any performance bug reports coming from heavy account usage that could be linked to this additional re-render |
@Krishna2323 can you sync up with main please |
@mountiny, sorry I forgot to ping yesterday after syncing, can you pls merge now 🙏🏻 |
Thanks @Krishna2323! @bondydaa should be on this one today 🙇 |
Hmm the test is still failing, if we're okay with the additional re-render don't we need to fix the test to expect 1 instead of 0? otherwise if we merge with this failing won't it fail for everyone going forward? |
We are fine with it and the test is build to merge with main on all branches before running so it should not fail for everyone |
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.
ah vit helped clarify how the perf tests work 1:1, merging even with this failing since once we do that the perf tests will automatically get rebuilt and all new PRs will be compared with a re-render of 1 instead of 0. there isn't actually anything to update manually on our end 👍
✋ 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/bondydaa in version: 1.4.62-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.4.62-0 🚀
|
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.4.62-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.62-17 🚀
|
// Remove the focus if the search input is empty else focus on the first non disabled item | ||
const newSelectedIndex = textInputValue === '' ? -1 : 0; | ||
// Remove the focus if the search input is empty or selected options length is changed else focus on the first non disabled item | ||
const newSelectedIndex = textInputValue === '' || flattenedSections.selectedOptions.length !== prevSelectedOptionsLength ? -1 : 0; |
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.
Coming from this issue #36140 (comment), we also need to check all options's length here
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.
Coming from #42583 this was causing the first category search result to not be highlighted.
Details
Fixed Issues
$ #35665
PROPOSAL: #35665 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
android_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4