Skip to content
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: Select all checkbox is not aligned with member checkboxes #27264

Merged
merged 3 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/SelectionList/BaseSelectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function BaseSelectionList({
disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}
/>
<View style={[styles.flex1]}>
<Text style={[styles.textStrong, styles.ph5]}>{translate('workspace.people.selectAll')}</Text>
<Text style={[styles.textStrong, styles.ph3]}>{translate('workspace.people.selectAll')}</Text>
</View>
</PressableWithFeedback>
)}
Expand Down
40 changes: 21 additions & 19 deletions src/components/SelectionList/UserListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function UserListItem({item, isFocused = false, showTooltip, onSelectRow, onDism

const avatar = (
<Avatar
containerStyles={styles.pl5}
containerStyles={styles.pl3}
source={lodashGet(item, 'avatar.source', '')}
name={lodashGet(item, 'avatar.name', item.text)}
type={lodashGet(item, 'avatar.type', CONST.ICON_TYPE_AVATAR)}
Expand Down Expand Up @@ -64,29 +64,31 @@ function UserListItem({item, isFocused = false, showTooltip, onSelectRow, onDism
hoverStyle={styles.hoveredComponentBG}
focusStyle={styles.hoveredComponentBG}
>
<View
style={[
StyleUtils.getCheckboxContainerStyle(20, 4),
item.isSelected && styles.checkedContainer,
item.isSelected && styles.borderColorFocus,
item.isDisabled && styles.cursorDisabled,
item.isDisabled && styles.buttonOpacityDisabled,
]}
>
{item.isSelected && (
<Icon
src={Expensicons.Checkmark}
fill={themeColors.textLight}
height={14}
width={14}
/>
)}
<View style={styles.checkboxPressable}>
<View
style={[
StyleUtils.getCheckboxContainerStyle(20, 4),
item.isSelected && styles.checkedContainer,
item.isSelected && styles.borderColorFocus,
item.isDisabled && styles.cursorDisabled,
item.isDisabled && styles.buttonOpacityDisabled,
]}
>
{item.isSelected && (
<Icon
src={Expensicons.Checkmark}
fill={themeColors.textLight}
height={14}
width={14}
/>
)}
</View>
</View>
{Boolean(item.avatar) &&
(showTooltip ? (
<UserDetailsTooltip
accountID={item.accountID}
shiftHorizontal={styles.pl5.paddingLeft / 2}
shiftHorizontal={styles.pl3.paddingLeft / 2}
>
<View>{avatar}</View>
</UserDetailsTooltip>
Expand Down
Loading