You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-10-09] Member - Green highlight on member jumps to other member when selecting member #25884
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
Green highlight on member jumps to other member and selected/unselected member is still focused.
What is the root cause of that problem?
When a member is checked/unchecked it is intention the focussed index change to next index. The root cause here is that the checked/unchecked member still has focus which keep the dim background on that member
What changes do you think we should make in order to solve the problem?
we want to blur the focussed member by passing ref to PressableWithFeedback in CheckboxListItem.
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
This is a regression from #22622
Highlighting the next item after selecting a member is useful on some scenarios like selecting the member using the enter key from the keyboard especially on mobile devices, it will help fasten the flow. but when selecting a member using a mouse/click it should not highlight the next index, because it will become confusing instead of helping unlike using keyboard.
This is the code causing this issue, highlighting the next item on selection.
What changes do you think we should make in order to solve the problem?
We should check if the selection is from keyboard/shortcut and only set the next index if it's coming from it
We should check whether the selection was made from the keyboard / a shortcut (up, down and enter key), and only set the next index if it was made from the keyboard/shortcut
We can add a param to selectRow for example called usingArrowKey which will be used as a value to check if it is called from selectFocusedOption which is utilized to be used for ArrowKeyFocusManager and by passing true, we can use the value from here whether to focus the next item if it is from arrow focus.
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.75-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-10-09. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
For reference, here are some details about the assignees on this issue:
Activity
OSBotify commentedon Aug 24, 2023
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
StagingDeployCashdeploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:melvin-bot commentedon Aug 24, 2023
Triggered auto assignment to @deetergp (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.ishpaul777 commentedon Aug 24, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Green highlight on member jumps to other member and selected/unselected member is still focused.
What is the root cause of that problem?
When a member is checked/unchecked it is intention the focussed index change to next index. The root cause here is that the checked/unchecked member still has focus which keep the dim background on that member
What changes do you think we should make in order to solve the problem?
we want to blur the focussed member by passing
refto PressableWithFeedback in CheckboxListItem.function CheckboxListItem({item, isFocused = false, onSelectRow, onDismissError = () => {}}) { const hasError = !_.isEmpty(item.errors); + const ref = React.useRef(null); return ( <OfflineWithFeedback onClose={() => onDismissError(item)} pendingAction={item.pendingAction} errors={item.errors} errorRowStyles={styles.ph5} > <PressableWithFeedback + ref={ref} // rest of componentgetusha commentedon Aug 24, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
This is a regression from #22622
Highlighting the next item after selecting a member is useful on some scenarios like selecting the member using the enter key from the keyboard especially on mobile devices, it will help fasten the flow. but when selecting a member using a mouse/click it should not highlight the next index, because it will become confusing instead of helping unlike using keyboard.
This is the code causing this issue, highlighting the next item on selection.
App/src/components/SelectionList/BaseSelectionList.js
Lines 182 to 183 in b38181a
What changes do you think we should make in order to solve the problem?
We should check if the selection is from keyboard/shortcut and only set the next index if it's coming from it
We should check whether the selection was made from the keyboard / a shortcut (up, down and enter key), and only set the next index if it was made from the keyboard/shortcut
We can add a param to
selectRowfor example calledusingArrowKeywhich will be used as a value to check if it is called fromselectFocusedOptionwhich is utilized to be used forArrowKeyFocusManagerand by passing true, we can use the value from here whether to focus the next item if it is from arrow focus.App/src/components/SelectionList/BaseSelectionList.js
Lines 177 to 178 in b38181a
selectFocusedOptionis being used for handling the shortcut and keyboard calls.App/src/components/SelectionList/BaseSelectionList.js
Lines 290 to 293 in b38181a
inside
selectFocusedOptionwe will pass the additional argument like the following:App/src/components/SelectionList/BaseSelectionList.js
Lines 194 to 202 in b38181a
Result:
Screen.Recording.2023-08-24.at.11.20.35.PM.mov
What alternative solutions did you explore? (Optional)
We can remove this code, if the arrow navigation is not required.
App/src/components/SelectionList/BaseSelectionList.js
Lines 182 to 183 in b38181a
and set the focused indext to -1, we probably should remove other codes related to this.
Santhosh-Sellavel commentedon Aug 24, 2023
@deetergp
This is not a deploy blocker, I guess this is expected cc: @cristipaval @thiagobrez.
If this needs changed can be handled along with phase 3 of SelectionList Improvement!
cc: @shawnborton
ishpaul777 commentedon Aug 24, 2023
I agree with @getusha this behaviour feels confusing sometimes for eg. user is checking off backward with arrowkeys
Screen.Recording.2023-08-25.at.2.02.50.AM.mov
shawnborton commentedon Aug 24, 2023
Hmm I agree, that is weird and feels unexpected.
thiagobrez commentedon Aug 25, 2023
Agree with @Santhosh-Sellavel here. We can handle it on #20354
@shawnborton So I guess we should keep the highlight in the same item when selecting it?
Here's a relevant comment regarding the highlight in Workspace Members vs. Workspace Invite members: #22622 (comment)
42 remaining items
melvin-bot commentedon Oct 11, 2023
Triggered auto assignment to @muttmuure (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 11, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)cristipaval commentedon Oct 11, 2023
@muttmuure, I just added the
Buglabel to have someone issuing the payment for the C+ 🙏muttmuure commentedon Oct 11, 2023
Sibtain gets paid on NewDot so adding a summary here
C+ - $500 - @allroundexperts
JmillsExpensify commentedon Oct 13, 2023
$500 payment approved for @allroundexperts based on BZ summary.
melvin-bot commentedon Feb 4, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.