Disable selecting existing group members in add members modal

This commit is contained in:
trevor-signal 2023-10-06 11:45:43 -04:00 committed by GitHub
parent 8af39e630a
commit 363142569b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 19 deletions

View file

@ -52,6 +52,7 @@
&:disabled:checked {
&::before {
background: $color-gray-15;
border-color: $color-gray-15;
}
}
}
@ -65,6 +66,7 @@
&:disabled:checked {
&::before {
background: $color-gray-45;
border-color: $color-gray-45;
}
}
}
@ -80,7 +82,7 @@
input[type='checkbox'] {
&:checked {
&::before {
&:not([disabled])::before {
background: $color-ultramarine;
border: 1.5px solid $color-ultramarine;
}

View file

@ -34,10 +34,6 @@ button.ListTile {
display: flex;
flex-direction: column;
font-family: $inter;
.ListTile[aria-disabled='true'] & {
opacity: 0.5;
}
}
&__title {

View file

@ -40,7 +40,7 @@ type PropsType = ComponentProps<typeof AddGroupMembersModal>;
const createProps = (
overrideProps: Partial<PropsType> = {},
candidateContacts: Array<ConversationType> = []
candidateContacts: Array<ConversationType> = allCandidateContacts
): PropsType => ({
clearRequestError: action('clearRequestError'),
conversationIdsAlreadyInGroup: new Set(),

View file

@ -329,6 +329,7 @@ export function ChooseGroupMembersModal({
onClick={handleContactClick}
isChecked={row.isChecked}
badge={undefined}
disabledReason={row.disabledReason}
/>
);
break;

View file

@ -110,14 +110,11 @@ describe('pnp/accept gv2 invite', function needsName() {
.waitFor({ state: 'hidden' });
debug('Leave the group through settings');
await conversationStack
await window
.locator('button.module-ConversationHeader__button--more')
.click();
await conversationStack
.locator('.react-contextmenu-item >> "Group settings"')
.click();
await window.locator('.react-contextmenu-item >> "Group settings"').click();
await conversationStack
.locator('.conversation-details-panel >> "Leave group"')

View file

@ -166,9 +166,7 @@ describe('pnp/send gv2 invite', function needsName() {
.locator('button.module-ConversationHeader__button--more')
.click();
await conversationStack
.locator('.react-contextmenu-item >> "Group settings"')
.click();
await window.locator('.react-contextmenu-item >> "Group settings"').click();
debug('editing group title');
{

View file

@ -98,7 +98,7 @@ describe('storage service', function needsName() {
);
await moreButton.click();
const archiveButton = conversationStack.locator(
const archiveButton = window.locator(
'.react-contextmenu-item >> "Archive"'
);
await archiveButton.click();

View file

@ -67,9 +67,7 @@ describe('storage service', function needsName() {
);
await moreButton.click();
const pinButton = conversationStack.locator(
'.react-contextmenu-item >> "Pin chat"'
);
const pinButton = window.locator('.react-contextmenu-item >> "Pin chat"');
await pinButton.click();
const newState = await phone.waitForStorageState({
@ -111,7 +109,7 @@ describe('storage service', function needsName() {
);
await moreButton.click();
const pinButton = conversationStack.locator(
const pinButton = window.locator(
'.react-contextmenu-item >> "Pin chat"'
);
await pinButton.click();