-
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
[HOLD for payment 2024-04-03] [$500] Workspace - Member and Role can be clicked to select all the members in Members list #37295
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01cbcba3e1d6d489b9 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
👋 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:
|
Triggered auto assignment to @nkuoch ( |
We think that this bug might be related to #wave5 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Member and Role can be clicked to select all the members in Members list What is the root cause of that problem?We wrap both the Listheader and Checkbox with Pressable here What changes do you think we should make in order to solve the problem?We move move the customlistheader out of pressable in Move this code out of the Pressable wrapper here App/src/components/SelectionList/BaseSelectionList.tsx Lines 448 to 452 in cfa0ae3
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Member and Role can be clicked to select all the members in Members list. What is the root cause of that problem?We are rendering
What changes do you think we should make in order to solve the problem?
// Wrap with a View
<View
// move the styles into here
style={[styles.peopleRow, styles.ph4, styles.pb3, listHeaderWrapperStyle]}
>
<PressableWithFeedback
style={[styles.userSelectNone, /* add this styles : */ styles.flexRow, styles.alignItemsCenter]}
onPress={selectAllRow}
accessibilityLabel={translate('workspace.people.selectAll')}
role="button"
accessibilityState={{checked: flattenedSections.allSelected}}
disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined}
>
<Checkbox
accessibilityLabel={translate('workspace.people.selectAll')}
isChecked={flattenedSections.allSelected}
onPress={selectAllRow}
disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}
/>
{/* display "Select all" only if there is no customListHeader*/}
{!customListHeader ? (
<View style={[styles.flex1]}>
<Text style={[styles.textStrong, styles.ph3]}>{translate('workspace.people.selectAll')}</Text>
</View>
) : null
}
</PressableWithFeedback>
{/* display customListHeader outside PressableWithFeedback*/}
{customListHeader}
</View> |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace - Member and Role can be clicked to select all the members in Members list What is the root cause of that problem?The pressable at this line take full width, so when we click on empty space also trigger toggle all What changes do you think we should make in order to solve the problem?We have to wrap the pressable with a view and move all style of PressableWithFeedback to view wrapper and then move customListHeader outside PressableWithFeedback + <View style={[styles.peopleRow, styles.userSelectNone, styles.ph4, styles.pb3, listHeaderWrapperStyle]}>
<PressableWithFeedback
- // style={[styles.peopleRow, styles.userSelectNone, styles.ph4, styles.pb3, listHeaderWrapperStyle]}
onPress={selectAllRow}
accessibilityLabel={translate('workspace.people.selectAll')}
role="button"
accessibilityState={{checked: flattenedSections.allSelected}}
disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined}
>
<Checkbox
accessibilityLabel={translate('workspace.people.selectAll')}
isChecked={flattenedSections.allSelected}
onPress={selectAllRow}
disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}
/>
-
</PressableWithFeedback>
+ {customListHeader ?? (
+ <View style={[styles.flex1]}>
+ <Text style={[styles.textStrong, styles.ph3]}>{translate('workspace.people.selectAll')}</Text>
+ </View>
+ )}
+ </View> |
ProposalPlease re-state the problem that we are trying to solve in this issue.The current issue involves the clickability of the "Member" and "Role" text. Not only that in my observation entire row is clickable. Clicking on these elements selects all members, which is unintended behavior. What is the root cause of that problem?The root cause lies in the fact that the PressableWithFeedback is not diabled causing entire row to be pressable. There is no reason for enabling it. Code for it is in
What changes do you think we should make to solve the problem?To address this issue, it is suggested to explicitly disable the PressableWithFeedback by setting the disabled prop to true. Since the checkbox is already pressable on its own, disabling the entire row's pressable functionality will prevent unintended selections. disabled={true} tested: What alternative solutions did you explore? (Optional)NA |
@suneox I think your proposal is same as #37295 (comment). Any meaningful difference to consider? |
Taking this over as C+ (discussion) |
@rayane-djouah's proposal looks good to me. |
Current assignee @nkuoch is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
We have a difference on my primary solution is only click on check box |
As production behavior is to click full item row, I think it's fine to keep that. |
Expected Result: @aimane-chnaif the behavior conflicts with the Expected Result, as I mean the expected behavior is only clickable on the checkbox for the header |
I know. I meant the case when |
Thank you for the review @aimane-chnaif ! |
@nkuoch, un-assign myself, please reassign it to @aimane-chnaif. 😄 |
📣 @aimane-chnaif 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@rayane-djouah bump |
Will get the PR ready today |
Let's add this issue to the scope here - #37511 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.56-8 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 2024-04-03. 🎊 For reference, here are some details about the assignees on this issue:
|
Triggered auto assignment to @sonialiap ( |
@rayane-djouah $500 - paid ✔️ |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.44-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Issue found when executing PR #37074
Action Performed:
Expected Result:
Member and Role should not be clickable, Only the checkbox is clickable
Actual Result:
Member and Role are clickable, which will select all members when clicked
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6393862_1709032651523.bandicam_2024-02-27_10-20-02-315.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: