fix: qa feedback - fixed background for group member list in create group overlay

This commit is contained in:
William Grant 2022-10-17 13:44:29 +11:00
parent 69d5e2ea41
commit 2a0396d522
2 changed files with 21 additions and 4 deletions

View file

@ -15,11 +15,16 @@ import useKey from 'react-use/lib/useKey';
import { useSet } from '../../hooks/useSet';
import { getConversationController } from '../../session/conversations';
import { initiateClosedGroupUpdate } from '../../session/group/closed-group';
import styled from 'styled-components';
type Props = {
conversationId: string;
};
const StyledClassicMemberList = styled.div`
max-height: 240px;
`;
/**
* Admins are always put first in the list of group members.
* Also, admins have a little crown on their avatar.
@ -54,6 +59,7 @@ const ClassicMemberList = (props: {
onUnselect={onUnselect}
key={member}
isAdmin={isAdmin}
disableBg={true}
/>
);
})}
@ -229,14 +235,14 @@ export const UpdateGroupMembersDialog = (props: Props) => {
return (
<SessionWrapperModal title={titleText} onClose={closeDialog}>
<div className="group-member-list__selection">
<StyledClassicMemberList className="group-member-list__selection">
<ClassicMemberList
convoId={conversationId}
onSelect={onAdd}
onUnselect={onRemove}
selectedMembers={membersToKeepWithUpdate}
/>
</div>
</StyledClassicMemberList>
<ZombiesList convoId={conversationId} />
{showNoMembersMessage && <p>{window.i18n('noMembersInThisGroup')}</p>}

View file

@ -34,6 +34,16 @@ const StyledGroupMemberListContainer = styled.div`
overflow-y: auto;
border-top: 1px solid var(--border-color);
border-bottom: 1px solid var(--border-color);
&::-webkit-scrollbar-track {
background-color: var(--background-secondary-color);
}
`;
const StyledGroupMemberList = styled.div`
button {
background-color: var(--background-secondary-color);
}
`;
const NoContacts = () => {
@ -119,7 +129,7 @@ export const OverlayClosedGroup = () => {
{noContactsForClosedGroup ? (
<NoContacts />
) : (
<div className="group-member-list__selection">
<StyledGroupMemberList className="group-member-list__selection">
{contactsToRender.map((memberPubkey: string) => (
<MemberListItem
pubkey={memberPubkey}
@ -127,9 +137,10 @@ export const OverlayClosedGroup = () => {
key={memberPubkey}
onSelect={addToSelected}
onUnselect={removeFromSelected}
disableBg={true}
/>
))}
</div>
</StyledGroupMemberList>
)}
</StyledGroupMemberListContainer>