Skip to content

Commit 03c99c5

Browse files
committed
people autocomplete: Make users and user groups more uniform
In particular, the icon for user-group items and the avatar for user items are now both 32px, and the horizontal padding for user-group items is reduced from 16px to 8px to match user items.
1 parent 0fe1cd7 commit 03c99c5

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/autocomplete/PeopleAutocomplete.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export default function PeopleAutocomplete(props: Props): Node {
8686
user={item}
8787
showEmail
8888
onPress={handleUserItemAutocomplete}
89+
size="medium"
8990
/>
9091
),
9192
}: Section<AutocompleteOption>),

src/common/Icons.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ export const IconRight: SpecificIconType = makeIcon(Feather, 'chevron-right');
9292

9393
export const IconPlusCircle: SpecificIconType = makeIcon(Feather, 'plus-circle');
9494
export const IconLeft: SpecificIconType = makeIcon(Feather, 'chevron-left');
95+
96+
// UserGroupItem depends on this being square.
9597
export const IconPeople: SpecificIconType = makeIcon(Feather, 'users');
98+
9699
export const IconPerson: SpecificIconType = makeIcon(Feather, 'user');
97100
export const IconImage: SpecificIconType = makeIcon(Feather, 'image');
98101
export const IconCamera: SpecificIconType = makeIcon(Feather, 'camera');

src/user-groups/UserGroupItem.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ export default function UserGroupItem(props: Props): Node {
4141
wrapper: {
4242
flexDirection: 'row',
4343
alignItems: 'center',
44-
paddingVertical: 8,
45-
paddingHorizontal: 16,
44+
padding: 8,
4645
},
4746
}),
4847
[],
@@ -51,7 +50,13 @@ export default function UserGroupItem(props: Props): Node {
5150
return (
5251
<Touchable onPress={handlePress}>
5352
<View style={styles.wrapper}>
54-
<IconPeople size={32} color={themeContext.color} />
53+
<IconPeople
54+
// Match the size of the avatar in UserItem, which also appears in
55+
// the people autocomplete. We're counting on this icon being a
56+
// square.
57+
size={32}
58+
color={themeContext.color}
59+
/>
5560
<View style={componentStyles.textWrapper}>
5661
<ZulipText
5762
style={componentStyles.text}

0 commit comments

Comments
 (0)