-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Approver remains highlighted when navigating the list with keyboard #58892
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
Approver remains highlighted when navigating the list with keyboard #58892
Conversation
@dominictb 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] |
@thelullabyy Where is the fix for the Enter key issue? |
@dominictb I updated PR. Please help to check |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-04-01.at.15.48.56.mp4Android: mWeb ChromeScreen.Recording.2025-03-31.at.21.49.19.moviOS: NativeScreen.Recording.2025-03-31.at.21.40.52.moviOS: mWeb SafariScreen.Recording.2025-03-31.at.21.42.40.movMacOS: Chrome / SafariScreen.Recording.2025-03-31.at.21.34.26.movMacOS: DesktopScreen.Recording.2025-03-31.at.21.37.54.mov |
@thelullabyy Can you help fix this console error when we first open the approval workflow editor? |
@dominictb I fixed the warning. Please help to continue review PR. Thanks. Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-04-01.at.16.32.53.mp4 |
@@ -149,7 +149,10 @@ function ApprovalWorkflowEditor({approvalWorkflow, removeApprovalWorkflow, polic | |||
: undefined; | |||
|
|||
return ( | |||
<OfflineWithFeedback pendingAction={getApprovalPendingAction(approverIndex)}> | |||
<OfflineWithFeedback | |||
key={`offline-feedback-${approver?.email}`} |
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.
@thelullabyy I think just move the below key={
approver-${approver?.email}-${approverIndex}}
here is enough.
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.
@dominictb I updated
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.
🎀👀🎀
@thelullabyy Please update the |
@dominictb updated. Pls help to check again. |
Thanks for the quick work! |
✋ 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/jasperhuangg in version: 9.1.23-1 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.23-7 🚀
|
Explanation of Change
shouldHighlightSelectedItem
completely in all places in the codebase because we setshouldHighlightSelectedItem
to SelectionList make the selected option remains highlighted at all times.Replace
shouldHighlightSelectedItem
byto highlight only selected option row.
Wrap toggleApprover by debounce function for Enter key problem, we ensure that it only triggers after a short delay.
The warning key happens because
<OfflineWithFeedback>
(the top-level element) was missing the key, so we move key from<MenuItemWithTopDescription>
to<OfflineWithFeedback>
Fixed Issues
$#57606
PROPOSAL:#57606 (comment)
Tests
Precondition:
Offline tests
QA Steps
Precondition:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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.mov
Android: mWeb Chrome
android_chorme.mov
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
chorme.mp4
MacOS: Desktop
desktop.mp4