diff --git a/ts/components/conversationList/StartNewConversation.tsx b/ts/components/conversationList/StartNewConversation.tsx index f7494ceca6..c705325cbc 100644 --- a/ts/components/conversationList/StartNewConversation.tsx +++ b/ts/components/conversationList/StartNewConversation.tsx @@ -6,7 +6,10 @@ import React, { useCallback, useState } from 'react'; import { ButtonVariant } from '../Button'; import { ConfirmationDialog } from '../ConfirmationDialog'; -import { BaseConversationListItem } from './BaseConversationListItem'; +import { SPINNER_CLASS_NAME } from './BaseConversationListItem'; +import { ListTile } from '../ListTile'; +import { Avatar, AvatarSize } from '../Avatar'; +import { Spinner } from '../Spinner'; import type { ParsedE164Type } from '../../util/libphonenumberInstance'; import type { LookupConversationWithoutUuidActionsType } from '../../util/lookupConversationWithoutUuid'; @@ -87,19 +90,33 @@ export const StartNewConversation: FunctionComponent = React.memo( return ( <> - + } title={phoneNumber.userInput} + onClick={boundOnClick} + trailing={ + isFetching ? ( + + ) : undefined + } /> {modal} diff --git a/ts/components/conversationList/UsernameSearchResultListItem.tsx b/ts/components/conversationList/UsernameSearchResultListItem.tsx index 2a1004f8a2..979a55ed81 100644 --- a/ts/components/conversationList/UsernameSearchResultListItem.tsx +++ b/ts/components/conversationList/UsernameSearchResultListItem.tsx @@ -3,7 +3,10 @@ import React, { useCallback } from 'react'; -import { BaseConversationListItem } from './BaseConversationListItem'; +import { SPINNER_CLASS_NAME } from './BaseConversationListItem'; +import { ListTile } from '../ListTile'; +import { Avatar, AvatarSize } from '../Avatar'; +import { Spinner } from '../Spinner'; import type { LocalizerType } from '../../types/Util'; import type { LookupConversationWithoutUuidActionsType } from '../../util/lookupConversationWithoutUuid'; @@ -55,18 +58,32 @@ export function UsernameSearchResultListItem({ ]); return ( - + } title={username} + onClick={boundOnClick} + trailing={ + isFetchingUsername ? ( + + ) : undefined + } /> ); } diff --git a/ts/test-mock/pnp/username_test.ts b/ts/test-mock/pnp/username_test.ts index 658a98f4f1..31c2266715 100644 --- a/ts/test-mock/pnp/username_test.ts +++ b/ts/test-mock/pnp/username_test.ts @@ -261,7 +261,7 @@ describe('pnp/username', function needsName() { await searchInput.type(`@${CARL_USERNAME}`); debug('starting lookup'); - await window.locator(`button >> "${CARL_USERNAME}"`).click(); + await window.locator(`div.ListTile >> "${CARL_USERNAME}"`).click(); debug('sending a message'); {