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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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