Clarify behavior for SMS-only conversations

This commit is contained in:
trevor-signal
2025-01-05 15:19:43 -05:00
committed by GitHub
parent 85c74e7e68
commit 9b84402fb0
8 changed files with 42 additions and 57 deletions

View File

@@ -36,6 +36,7 @@ export default {
areWePendingApproval: { control: { type: 'boolean' } },
},
args: {
acceptedMessageRequest: true,
addAttachment: action('addAttachment'),
conversationId: '123',
convertDraftBodyRangesIntoHydrated: () => undefined,
@@ -116,8 +117,7 @@ export default {
groupAdmins: [],
cancelJoinRequest: action('cancelJoinRequest'),
showConversation: action('showConversation'),
// SMS-only
isSMSOnly: false,
isSmsOnlyOrUnregistered: false,
isFetchingUUID: false,
renderSmartCompositionRecording: _ => <div>RECORDING</div>,
renderSmartCompositionRecordingDraft: _ => <div>RECORDING DRAFT</div>,
@@ -158,17 +158,26 @@ export function StickerButton(args: Props): JSX.Element {
export function MessageRequest(args: Props): JSX.Element {
const theme = useContext(StorybookThemeContext);
return <CompositionArea {...args} theme={theme} />;
return (
<CompositionArea {...args} theme={theme} acceptedMessageRequest={false} />
);
}
export function SmsOnlyFetchingUuid(args: Props): JSX.Element {
const theme = useContext(StorybookThemeContext);
return <CompositionArea {...args} theme={theme} isSMSOnly isFetchingUUID />;
return (
<CompositionArea
{...args}
theme={theme}
isSmsOnlyOrUnregistered
isFetchingUUID
/>
);
}
export function SmsOnly(args: Props): JSX.Element {
const theme = useContext(StorybookThemeContext);
return <CompositionArea {...args} theme={theme} isSMSOnly />;
return <CompositionArea {...args} theme={theme} isSmsOnlyOrUnregistered />;
}
export function Attachments(args: Props): JSX.Element {