From cce7424e76333418926777ee2f0f68f2b8d0a741 Mon Sep 17 00:00:00 2001 From: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> Date: Wed, 20 Dec 2023 08:16:21 -0800 Subject: [PATCH] Fix calling needs permission screen not fullscreen --- stylesheets/_modules.scss | 5 +++- .../CallNeedPermissionScreen.stories.tsx | 27 +++++++++++++++++++ ts/components/CallNeedPermissionScreen.tsx | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 ts/components/CallNeedPermissionScreen.stories.tsx diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index ba9a3886fe0..5a7e0c27189 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -4438,7 +4438,10 @@ button.module-image__border-overlay:focus { flex-direction: column; height: var(--window-height); justify-content: center; - position: relative; + position: fixed; + top: 0; + /* stylelint-disable-next-line liberty/use-logical-spec */ + left: 0; width: 100%; &__text { diff --git a/ts/components/CallNeedPermissionScreen.stories.tsx b/ts/components/CallNeedPermissionScreen.stories.tsx new file mode 100644 index 00000000000..42e68498419 --- /dev/null +++ b/ts/components/CallNeedPermissionScreen.stories.tsx @@ -0,0 +1,27 @@ +// Copyright 2023 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import type { ComponentMeta } from '../storybook/types'; +import { setupI18n } from '../util/setupI18n'; +import enMessages from '../../_locales/en/messages.json'; +import type { Props } from './CallNeedPermissionScreen'; +import { CallNeedPermissionScreen } from './CallNeedPermissionScreen'; +import { getDefaultConversation } from '../test-both/helpers/getDefaultConversation'; + +const i18n = setupI18n('en', enMessages); + +export default { + title: 'Components/CallNeedPermissionScreen', + component: CallNeedPermissionScreen, + args: { + i18n, + close: action('close'), + conversation: getDefaultConversation(), + }, +} satisfies ComponentMeta; + +export function Default(args: Props): JSX.Element { + return ; +} diff --git a/ts/components/CallNeedPermissionScreen.tsx b/ts/components/CallNeedPermissionScreen.tsx index 2a357df2d81..8530aaeda4c 100644 --- a/ts/components/CallNeedPermissionScreen.tsx +++ b/ts/components/CallNeedPermissionScreen.tsx @@ -9,7 +9,7 @@ import { Intl } from './Intl'; import { ContactName } from './conversation/ContactName'; import type { ConversationType } from '../state/ducks/conversations'; -type Props = { +export type Props = { conversation: Pick< ConversationType, | 'acceptedMessageRequest'