diff --git a/stylesheets/components/CallControls.scss b/stylesheets/components/CallControls.scss index d1ac36f53d8..d689f64ac97 100644 --- a/stylesheets/components/CallControls.scss +++ b/stylesheets/components/CallControls.scss @@ -135,3 +135,7 @@ margin-bottom: auto; max-width: calc(var(--window-width) / 2 + 20px); } + +.CallControls__MoreOptionsButtonContainer--menu-shown .module-tooltip { + opacity: 0; +} diff --git a/stylesheets/components/CallingReactionsToasts.scss b/stylesheets/components/CallingReactionsToasts.scss index 408bb2e99e3..1db31675f91 100644 --- a/stylesheets/components/CallingReactionsToasts.scss +++ b/stylesheets/components/CallingReactionsToasts.scss @@ -8,10 +8,6 @@ width: 100%; } -.module-ongoing-call__container--controls-faded-out .CallingReactionsToasts { - inset-block-end: 16px; -} - // Normally the newest toasts are appended on top, like this: // | Second | // | First | -> | First | diff --git a/ts/components/CallScreen.stories.tsx b/ts/components/CallScreen.stories.tsx index 000526819d2..8d9b018cada 100644 --- a/ts/components/CallScreen.stories.tsx +++ b/ts/components/CallScreen.stories.tsx @@ -22,10 +22,8 @@ import { generateAci } from '../types/ServiceId'; import type { ConversationType } from '../state/ducks/conversations'; import { AvatarColors } from '../types/Colors'; import type { PropsType } from './CallScreen'; -import { - CALL_REACTION_EMOJI, - CallScreen as UnwrappedCallScreen, -} from './CallScreen'; +import { CallScreen as UnwrappedCallScreen } from './CallScreen'; +import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants'; import { setupI18n } from '../util/setupI18n'; import { missingCaseError } from '../util/missingCaseError'; import { @@ -612,7 +610,10 @@ export function GroupCallReactionsBurstInOrder(): JSX.Element { const remoteParticipants = allRemoteParticipants.slice(0, 5); const reactions = remoteParticipants.map((participant, i) => { const { demuxId } = participant; - const value = CALL_REACTION_EMOJI[i % CALL_REACTION_EMOJI.length]; + const value = + DEFAULT_PREFERRED_REACTION_EMOJI[ + i % DEFAULT_PREFERRED_REACTION_EMOJI.length + ]; return { timestamp, demuxId, value }; }); const [props] = React.useState( @@ -651,7 +652,7 @@ function useReactionsEmitter( { timestamp: timeNow, demuxId, - value: sample(CALL_REACTION_EMOJI) as string, + value: sample(DEFAULT_PREFERRED_REACTION_EMOJI) as string, }, ]; diff --git a/ts/components/CallScreen.tsx b/ts/components/CallScreen.tsx index 055125d2594..c70d1ff4cc6 100644 --- a/ts/components/CallScreen.tsx +++ b/ts/components/CallScreen.tsx @@ -117,15 +117,6 @@ export const isInSpeakerView = ( ); }; -export const CALL_REACTION_EMOJI = [ - '❤️', - '👍', - '👋', - '👏', - '🎉', - '😂', -] as const; - const REACTIONS_TOASTS_TRANSITION_FROM = { opacity: 0, }; @@ -534,7 +525,8 @@ export function CallScreen({ { 'module-ongoing-call__container--controls-faded-out': controlsFadedOut, - } + }, + 'dark-theme' )} onFocus={() => { setShowControls(true); @@ -643,8 +635,6 @@ export function CallScreen({ value: emoji, }); }, - isCustomizePreferredReactionsHidden: true, - preferredReactionEmoji: CALL_REACTION_EMOJI, renderEmojiPicker, })} @@ -678,7 +668,13 @@ export function CallScreen({ /> {isMoreOptionsButtonEnabled && (
-
+
{shouldShowLocalVideo ? (
diff --git a/ts/components/conversation/ReactionPicker.tsx b/ts/components/conversation/ReactionPicker.tsx index 99c475d97b7..006028c2bf7 100644 --- a/ts/components/conversation/ReactionPicker.tsx +++ b/ts/components/conversation/ReactionPicker.tsx @@ -27,7 +27,6 @@ export type OwnProps = { onClose?: () => unknown; onPick: (emoji: string) => unknown; onSetSkinTone: (tone: number) => unknown; - isCustomizePreferredReactionsHidden?: boolean; openCustomizePreferredReactionsModal?: () => unknown; preferredReactionEmoji: ReadonlyArray; renderEmojiPicker: (props: RenderEmojiPickerProps) => React.ReactElement; @@ -42,7 +41,6 @@ export const ReactionPicker = React.forwardRef( onClose, onPick, onSetSkinTone, - isCustomizePreferredReactionsHidden, openCustomizePreferredReactionsModal, preferredReactionEmoji, renderEmojiPicker, @@ -80,11 +78,8 @@ export const ReactionPicker = React.forwardRef( const [focusRef] = useDelayedRestoreFocus(); if (pickingOther) { - const onClickSettings = isCustomizePreferredReactionsHidden - ? undefined - : openCustomizePreferredReactionsModal; return renderEmojiPicker({ - onClickSettings, + onClickSettings: openCustomizePreferredReactionsModal, onClose, onPickEmoji, onSetSkinTone, diff --git a/ts/reactions/constants.ts b/ts/reactions/constants.ts index b33c9f3c0f6..d28382aa0de 100644 --- a/ts/reactions/constants.ts +++ b/ts/reactions/constants.ts @@ -9,3 +9,15 @@ export const DEFAULT_PREFERRED_REACTION_EMOJI_SHORT_NAMES = [ 'open_mouth', 'cry', ]; + +// This is used in storybook for simplicity. Normally we prefer to convert emoji short +// names to actual emoji using convertShortNameToData from components/emoji/lib +// because it takes skin tone into consideration. +export const DEFAULT_PREFERRED_REACTION_EMOJI = [ + '❤️', + '👍', + '👎', + '😂', + '😮', + '😢', +]; diff --git a/ts/state/smart/ReactionPicker.tsx b/ts/state/smart/ReactionPicker.tsx index ed9c43107d5..8c3d9b33ace 100644 --- a/ts/state/smart/ReactionPicker.tsx +++ b/ts/state/smart/ReactionPicker.tsx @@ -22,15 +22,12 @@ type ExternalProps = Omit< | 'preferredReactionEmoji' | 'selectionStyle' | 'skinTone' -> & { - preferredReactionEmoji?: ReadonlyArray; -}; +>; export const SmartReactionPicker = React.forwardRef< HTMLDivElement, ExternalProps >(function SmartReactionPickerInner(props, ref) { - const { preferredReactionEmoji } = props; const { openCustomizePreferredReactionsModal } = usePreferredReactionsActions(); @@ -38,10 +35,9 @@ export const SmartReactionPicker = React.forwardRef< const i18n = useSelector(getIntl); - const statePreferredReactionEmoji = useSelector< - StateType, - ReadonlyArray - >(getPreferredReactionEmoji); + const preferredReactionEmoji = useSelector>( + getPreferredReactionEmoji + ); return ( ); });