A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
refactor(app): mirror arrow and caret icons in RTL layouts
Hampus33fdc744b3cc
diff --git a/fluxer_app/src/features/channel/components/ChannelFollowAddMessage.tsx b/fluxer_app/src/features/channel/components/ChannelFollowAddMessage.tsxindex f7c6cb094..0fff589a8 100644--- a/fluxer_app/src/features/channel/components/ChannelFollowAddMessage.tsx+++ b/fluxer_app/src/features/channel/components/ChannelFollowAddMessage.tsx@@ -8,8 +8,8 @@ import {useSystemMessageData} from '@app/features/messaging/hooks/useSystemMessaimport type {Message} from '@app/features/messaging/models/MessagingMessage';import styles from '@app/features/theme/styles/Message.module.css';import FocusRing from '@app/features/ui/focus_ring/FocusRing';+import {ArrowRightIcon} from '@app/features/ui/icons/DirectionalIcons';import {Trans} from '@lingui/react/macro';-import {ArrowRightIcon} from '@phosphor-icons/react';import {observer} from 'mobx-react-lite';interface ChannelFollowAddMessageProps {diff --git a/fluxer_app/src/features/channel/components/ChannelSourcePreview.tsx b/fluxer_app/src/features/channel/components/ChannelSourcePreview.tsxindex 8f2056eb8..65b25fbbc 100644--- a/fluxer_app/src/features/channel/components/ChannelSourcePreview.tsx+++ b/fluxer_app/src/features/channel/components/ChannelSourcePreview.tsx@@ -12,13 +12,14 @@ import {DIRECT_MESSAGE_DESCRIPTOR, PERSONAL_NOTES_DESCRIPTOR} from '@app/featureimport {remFromPx} from '@app/features/theme/layout/RemFromPx';import {MentionBadge} from '@app/features/ui/components/MentionBadge';import FocusRing from '@app/features/ui/focus_ring/FocusRing';+import {CaretRightIcon} from '@app/features/ui/icons/DirectionalIcons';import Users from '@app/features/user/state/Users';import * as AvatarUtils from '@app/features/user/utils/AvatarUtils';import {MEDIA_PROXY_ICON_SIZE_DEFAULT} from '@fluxer/constants/src/MediaProxyAssetSizes';import type {MediaProxyImageSize} from '@fluxer/constants/src/MediaProxyImageSizes';import {msg, plural} from '@lingui/core/macro';import {useLingui} from '@lingui/react/macro';-import {CaretRightIcon, HashIcon, NotePencilIcon, UserIcon, UsersIcon} from '@phosphor-icons/react';+import {HashIcon, NotePencilIcon, UserIcon, UsersIcon} from '@phosphor-icons/react';import {clsx} from 'clsx';import {observer} from 'mobx-react-lite';import type React from 'react';diff --git a/fluxer_app/src/features/channel/components/GuildJoinMessage.tsx b/fluxer_app/src/features/channel/components/GuildJoinMessage.tsxindex 3b24570d4..4e5581883 100644--- a/fluxer_app/src/features/channel/components/GuildJoinMessage.tsx+++ b/fluxer_app/src/features/channel/components/GuildJoinMessage.tsx@@ -6,8 +6,8 @@ import {SystemMessageUsername} from '@app/features/channel/components/SystemMessimport {useSystemMessageData} from '@app/features/messaging/hooks/useSystemMessageData';import type {Message} from '@app/features/messaging/models/MessagingMessage';import {SystemMessageUtils} from '@app/features/messaging/utils/SystemMessageUtils';+import {ArrowRightIcon} from '@app/features/ui/icons/DirectionalIcons';import {useLingui} from '@lingui/react/macro';-import {ArrowRightIcon} from '@phosphor-icons/react';import {observer} from 'mobx-react-lite';interface GuildJoinMessageProps {diff --git a/fluxer_app/src/features/channel/components/MessageAttachments.tsx b/fluxer_app/src/features/channel/components/MessageAttachments.tsxindex 4d4af14f0..2e409fba6 100644--- a/fluxer_app/src/features/channel/components/MessageAttachments.tsx+++ b/fluxer_app/src/features/channel/components/MessageAttachments.tsx@@ -47,6 +47,7 @@ import {MessageContextMenu} from '@app/features/ui/action_menu/MessageContextMenimport * as ContextMenuCommands from '@app/features/ui/commands/ContextMenuCommands';import {Avatar} from '@app/features/ui/components/Avatar';import FocusRing from '@app/features/ui/focus_ring/FocusRing';+import {ArrowBendUpRightIcon, CaretRightIcon} from '@app/features/ui/icons/DirectionalIcons';import MobileLayout from '@app/features/ui/state/MobileLayout';import UserSettings from '@app/features/user/state/UserSettings';import * as AvatarUtils from '@app/features/user/utils/AvatarUtils';@@ -58,7 +59,7 @@ import type {MessageStickerItem,} from '@fluxer/schema/src/domains/message/MessageResponseSchemas';import {Trans, useLingui} from '@lingui/react/macro';-import {ArrowBendUpRightIcon, CaretRightIcon, NotePencilIcon} from '@phosphor-icons/react';+import {NotePencilIcon} from '@phosphor-icons/react';import {clsx} from 'clsx';import {observer} from 'mobx-react-lite';import type React from 'react';diff --git a/fluxer_app/src/features/channel/components/pickers/gif/GifPickerHeader.tsx b/fluxer_app/src/features/channel/components/pickers/gif/GifPickerHeader.tsxindex 864ca180d..4de17b6e9 100644--- a/fluxer_app/src/features/channel/components/pickers/gif/GifPickerHeader.tsx+++ b/fluxer_app/src/features/channel/components/pickers/gif/GifPickerHeader.tsx@@ -8,10 +8,11 @@ import {GIFS_DESCRIPTOR} from '@app/features/i18n/utils/CommonMessageDescriptorsimport {isIMEComposing} from '@app/features/messaging/utils/IMECompositionUtils';import {remFromPx} from '@app/features/theme/layout/RemFromPx';import FocusRing from '@app/features/ui/focus_ring/FocusRing';+import {ArrowLeftIcon} from '@app/features/ui/icons/DirectionalIcons';import {Tooltip} from '@app/features/ui/tooltip/Tooltip';import {msg} from '@lingui/core/macro';import {useLingui} from '@lingui/react/macro';-import {ArrowLeftIcon, DownloadSimpleIcon, UploadSimpleIcon} from '@phosphor-icons/react';+import {DownloadSimpleIcon, UploadSimpleIcon} from '@phosphor-icons/react';import {observer} from 'mobx-react-lite';import type React from 'react';diff --git a/fluxer_app/src/features/channel/components/shared/PickerSearchInput.tsx b/fluxer_app/src/features/channel/components/shared/PickerSearchInput.tsxindex 4b265bf41..220014665 100644--- a/fluxer_app/src/features/channel/components/shared/PickerSearchInput.tsx+++ b/fluxer_app/src/features/channel/components/shared/PickerSearchInput.tsx@@ -9,13 +9,14 @@ import QuickSwitcher from '@app/features/search/state/QuickSwitcher';import {remFromPx} from '@app/features/theme/layout/RemFromPx';import {Input} from '@app/features/ui/components/form/FormInput';import FocusRing from '@app/features/ui/focus_ring/FocusRing';+import {ArrowLeftIcon} from '@app/features/ui/icons/DirectionalIcons';import ContextMenu from '@app/features/ui/state/ContextMenu';import KeyboardMode from '@app/features/ui/state/KeyboardMode';import MobileLayout from '@app/features/ui/state/MobileLayout';import Modal from '@app/features/ui/state/Modal';import {msg} from '@lingui/core/macro';import {useLingui} from '@lingui/react/macro';-import {ArrowLeftIcon, MagnifyingGlassIcon, XIcon} from '@phosphor-icons/react';+import {MagnifyingGlassIcon, XIcon} from '@phosphor-icons/react';import React, {useCallback, useEffect, useRef} from 'react';const SEARCH_DESCRIPTOR = msg({diff --git a/fluxer_app/src/features/guild/components/modals/guild_tabs/UserListItem.tsx b/fluxer_app/src/features/guild/components/modals/guild_tabs/UserListItem.tsxindex 9423b6ff3..f37943348 100644--- a/fluxer_app/src/features/guild/components/modals/guild_tabs/UserListItem.tsx+++ b/fluxer_app/src/features/guild/components/modals/guild_tabs/UserListItem.tsx@@ -4,10 +4,11 @@ import {usePressable} from '@app/features/app/hooks/usePressable';import styles from '@app/features/guild/components/modals/guild_tabs/MemberListStyles.module.css';import {MORE_OPTIONS_DESCRIPTOR} from '@app/features/i18n/utils/CommonMessageDescriptors';import {remFromPx} from '@app/features/theme/layout/RemFromPx';+import {CaretRightIcon} from '@app/features/ui/icons/DirectionalIcons';import {Tooltip} from '@app/features/ui/tooltip/Tooltip';import * as NicknameUtils from '@app/features/user/utils/NicknameUtils';import {useLingui} from '@lingui/react/macro';-import {CaretRightIcon, DotsThreeVerticalIcon} from '@phosphor-icons/react';+import {DotsThreeVerticalIcon} from '@phosphor-icons/react';import {clsx} from 'clsx';import {observer} from 'mobx-react-lite';import type React from 'react';diff --git a/fluxer_app/src/features/guild/components/modals/guild_tabs/guild_roles_tab/MobileRoleList.tsx b/fluxer_app/src/features/guild/components/modals/guild_tabs/guild_roles_tab/MobileRoleList.tsxindex bcd473373..09d834404 100644--- a/fluxer_app/src/features/guild/components/modals/guild_tabs/guild_roles_tab/MobileRoleList.tsx+++ b/fluxer_app/src/features/guild/components/modals/guild_tabs/guild_roles_tab/MobileRoleList.tsx@@ -11,8 +11,9 @@ import {ROLES_DESCRIPTOR} from '@app/features/i18n/utils/CommonMessageDescriptorimport {remFromPx} from '@app/features/theme/layout/RemFromPx';import {openRoleContextMenu} from '@app/features/ui/action_menu/RoleContextMenu';import {Button} from '@app/features/ui/button/Button';+import {CaretRightIcon} from '@app/features/ui/icons/DirectionalIcons';import {Trans, useLingui} from '@lingui/react/macro';-import {CaretRightIcon, LockIcon, PlusIcon} from '@phosphor-icons/react';+import {LockIcon, PlusIcon} from '@phosphor-icons/react';import {observer} from 'mobx-react-lite';import type React from 'react';diff --git a/fluxer_app/src/features/messaging/components/message_context_prefix/MessageContextPrefix.tsx b/fluxer_app/src/features/messaging/components/message_context_prefix/MessageContextPrefix.tsxindex eed63afcf..29bb4cd9e 100644--- a/fluxer_app/src/features/messaging/components/message_context_prefix/MessageContextPrefix.tsx+++ b/fluxer_app/src/features/messaging/components/message_context_prefix/MessageContextPrefix.tsx@@ -9,9 +9,9 @@ import styles from '@app/features/messaging/components/message_context_prefix/Meimport {remFromPx} from '@app/features/theme/layout/RemFromPx';import {Avatar} from '@app/features/ui/components/Avatar';import FocusRing from '@app/features/ui/focus_ring/FocusRing';+import {CaretRightIcon} from '@app/features/ui/icons/DirectionalIcons';import Users from '@app/features/user/state/Users';import {useLingui} from '@lingui/react';-import {CaretRightIcon} from '@phosphor-icons/react';import {observer} from 'mobx-react-lite';import type React from 'react';diff --git a/fluxer_app/src/features/messaging/components/modals/ExternalLinkWarningModal.tsx b/fluxer_app/src/features/messaging/components/modals/ExternalLinkWarningModal.tsxindex e8f271c1a..180988bed 100644--- a/fluxer_app/src/features/messaging/components/modals/ExternalLinkWarningModal.tsx+++ b/fluxer_app/src/features/messaging/components/modals/ExternalLinkWarningModal.tsx@@ -8,10 +8,11 @@ import TrustedDomain from '@app/features/trusted_domain/state/TrustedDomain';import {Button} from '@app/features/ui/button/Button';import {Checkbox} from '@app/features/ui/checkbox/Checkbox';import * as ModalCommands from '@app/features/ui/commands/ModalCommands';+import {ArrowRightIcon} from '@app/features/ui/icons/DirectionalIcons';import {openExternalUrl} from '@app/features/ui/utils/NativeUtils';import {msg} from '@lingui/core/macro';import {Trans, useLingui} from '@lingui/react/macro';-import {ArrowRightIcon, WarningIcon} from '@phosphor-icons/react';+import {WarningIcon} from '@phosphor-icons/react';import {observer} from 'mobx-react-lite';import {useCallback, useMemo, useRef, useState} from 'react';diff --git a/fluxer_app/src/features/messaging/components/modals/media_modal/MediaControls.tsx b/fluxer_app/src/features/messaging/components/modals/media_modal/MediaControls.tsxindex bdfa5d081..450c0808a 100644--- a/fluxer_app/src/features/messaging/components/modals/media_modal/MediaControls.tsx+++ b/fluxer_app/src/features/messaging/components/modals/media_modal/MediaControls.tsx@@ -22,11 +22,10 @@ import {ROTATE_CLOCKWISE_DESCRIPTOR,} from '@app/features/messaging/components/modals/media_modal/shared';import FocusRing from '@app/features/ui/focus_ring/FocusRing';+import {ArrowBendUpLeftIcon, ArrowBendUpRightIcon} from '@app/features/ui/icons/DirectionalIcons';import {Tooltip} from '@app/features/ui/tooltip/Tooltip';import {useLingui} from '@lingui/react/macro';import {- ArrowBendUpLeftIcon,- ArrowBendUpRightIcon,ArrowClockwiseIcon,ArrowCounterClockwiseIcon,ArrowSquareOutIcon,diff --git a/fluxer_app/src/features/messaging/components/modals/media_modal/MobileMediaActions.tsx b/fluxer_app/src/features/messaging/components/modals/media_modal/MobileMediaActions.tsxindex 5cb919f1d..42b7f572a 100644--- a/fluxer_app/src/features/messaging/components/modals/media_modal/MobileMediaActions.tsx+++ b/fluxer_app/src/features/messaging/components/modals/media_modal/MobileMediaActions.tsx@@ -23,6 +23,7 @@ import {ROTATE_CLOCKWISE_DESCRIPTOR,} from '@app/features/messaging/components/modals/media_modal/shared';import {remFromPx} from '@app/features/theme/layout/RemFromPx';+import {ArrowBendUpLeftIcon, ArrowBendUpRightIcon} from '@app/features/ui/icons/DirectionalIcons';import {MenuBottomSheet,type MenuGroupType,@@ -30,8 +31,6 @@ import {} from '@app/features/ui/menu_bottom_sheet/MenuBottomSheet';import {useLingui} from '@lingui/react/macro';import {- ArrowBendUpLeftIcon,- ArrowBendUpRightIcon,ArrowClockwiseIcon,ArrowCounterClockwiseIcon,ArrowSquareOutIcon,@@ -48,30 +47,6 @@ import {import {observer} from 'mobx-react-lite';import {type FC, type ReactNode, type Ref, useCallback, useMemo, useState} from 'react';-interface MobileMediaActionsProps {- isFavorited?: boolean;- onFavorite?: () => void;- onDownload?: () => void;- onOpenInBrowser?: () => void;- onCopyLink?: () => void;- onCopyMedia?: () => void;- onReset?: () => void;- onZoomIn?: () => void;- onZoomOut?: () => void;- onRotateCW?: () => void;- onRotateCCW?: () => void;- onReply?: () => void;- onForward?: () => void;- onClose: () => void;- canReset?: boolean;- canZoomIn?: boolean;- canZoomOut?: boolean;- enableZoomControls?: boolean;- onPointerEnter?: () => void;- onPointerLeave?: () => void;- rootRef?: Ref<HTMLDivElement>;-}-const iconSize = remFromPx(20);function compactGroups(groups: Array<MenuGroupType>): Array<MenuGroupType> {diff --git a/fluxer_app/src/features/relationship/utils/FriendsListUtils.tsx b/fluxer_app/src/features/relationship/utils/FriendsListUtils.tsxindex 130b5da5f..3af24164d 100644--- a/fluxer_app/src/features/relationship/utils/FriendsListUtils.tsx+++ b/fluxer_app/src/features/relationship/utils/FriendsListUtils.tsx@@ -12,6 +12,7 @@ import * as LayoutCommands from '@app/features/ui/commands/LayoutCommands';import {Scroller} from '@app/features/ui/components/Scroller';import {StatusAwareAvatar} from '@app/features/ui/components/StatusAwareAvatar';import FocusRing from '@app/features/ui/focus_ring/FocusRing';+import {CaretRightIcon} from '@app/features/ui/icons/DirectionalIcons';import MobileLayout from '@app/features/ui/state/MobileLayout';import * as UserProfileCommands from '@app/features/user/commands/UserProfileCommands';import Users from '@app/features/user/state/Users';@@ -19,7 +20,6 @@ import * as NicknameUtils from '@app/features/user/utils/NicknameUtils';import {RelationshipTypes} from '@fluxer/constants/src/UserConstants';import {msg} from '@lingui/core/macro';import {useLingui} from '@lingui/react/macro';-import {CaretRightIcon} from '@phosphor-icons/react';import {clsx} from 'clsx';import {observer} from 'mobx-react-lite';import type React from 'react';diff --git a/fluxer_app/src/features/threads/components/ThreadParentCrumb.tsx b/fluxer_app/src/features/threads/components/ThreadParentCrumb.tsxindex 77a24fac2..3eb68e128 100644--- a/fluxer_app/src/features/threads/components/ThreadParentCrumb.tsx+++ b/fluxer_app/src/features/threads/components/ThreadParentCrumb.tsx@@ -6,7 +6,7 @@ import * as ChannelUtils from '@app/features/channel/utils/ChannelUtils';import * as NavigationCommands from '@app/features/navigation/commands/NavigationCommands';import styles from '@app/features/threads/components/ThreadParentCrumb.module.css';import FocusRing from '@app/features/ui/focus_ring/FocusRing';-import {CaretRightIcon} from '@phosphor-icons/react';+import {CaretRightIcon} from '@app/features/ui/icons/DirectionalIcons';import {observer} from 'mobx-react-lite';export const ThreadParentCrumb = observer(({thread, iconClassName}: {thread: Channel; iconClassName?: string}) => {diff --git a/fluxer_app/src/features/threads/components/ThreadSidePanel.tsx b/fluxer_app/src/features/threads/components/ThreadSidePanel.tsxindex 89a8c99f4..5d0b207ad 100644--- a/fluxer_app/src/features/threads/components/ThreadSidePanel.tsx+++ b/fluxer_app/src/features/threads/components/ThreadSidePanel.tsx@@ -27,10 +27,11 @@ import * as D from '@app/features/threads/utils/ThreadMessageDescriptors';import * as ContextMenuCommands from '@app/features/ui/commands/ContextMenuCommands';import FocusRing from '@app/features/ui/focus_ring/FocusRing';import {usePopout} from '@app/features/ui/hooks/usePopout';+import {ArrowLeftIcon} from '@app/features/ui/icons/DirectionalIcons';import {Popout} from '@app/features/ui/popover/PopoverPopout';import MobileLayout from '@app/features/ui/state/MobileLayout';import {useLingui} from '@lingui/react/macro';-import {ArrowLeftIcon, ArrowsOutSimpleIcon, ChatsIcon, DotsThreeIcon, UsersIcon, XIcon} from '@phosphor-icons/react';+import {ArrowsOutSimpleIcon, ChatsIcon, DotsThreeIcon, UsersIcon, XIcon} from '@phosphor-icons/react';import {observer} from 'mobx-react-lite';import type React from 'react';import {useCallback, useRef} from 'react';@@ -166,7 +167,7 @@ const PanelHeader = observer(({thread, title}: {thread?: Channel; title: string});});-export const ThreadChat = observer(({thread}: {thread: Channel}) => (+const ThreadChat = observer(({thread}: {thread: Channel}) => (<ChannelChatLayoutmessages={<Messages key={thread.id} channel={thread} data-flx="threads.thread-chat.messages" />}textarea={<ThreadComposerArea thread={thread} data-flx="threads.thread-chat.thread-composer-area" />}@@ -186,7 +187,7 @@ export function useThreadPanelState(parent: Channel | undefined): {return {thread: undefined, createMessageId: target ? target.messageId : undefined};}-export const ThreadSidePanel = observer(({parent}: {parent: Channel}) => {+const ThreadSidePanel = observer(({parent}: {parent: Channel}) => {const {i18n} = useLingui();const {thread, createMessageId} = useThreadPanelState(parent);const handleResizeStart = usePanelResize();diff --git a/fluxer_app/src/features/ui/menu_bottom_sheet/MenuBottomSheet.tsx b/fluxer_app/src/features/ui/menu_bottom_sheet/MenuBottomSheet.tsxindex 5f537d4fa..1cfbc6438 100644--- a/fluxer_app/src/features/ui/menu_bottom_sheet/MenuBottomSheet.tsx+++ b/fluxer_app/src/features/ui/menu_bottom_sheet/MenuBottomSheet.tsx@@ -5,9 +5,9 @@ import {GO_BACK_DESCRIPTOR} from '@app/features/i18n/utils/CommonMessageDescriptimport {remFromPx} from '@app/features/theme/layout/RemFromPx';import {BottomSheet} from '@app/features/ui/bottom_sheet/BottomSheet';import {Slider} from '@app/features/ui/components/Slider';+import {CaretLeftIcon, CaretRightIcon} from '@app/features/ui/icons/DirectionalIcons';import styles from '@app/features/ui/menu_bottom_sheet/MenuBottomSheet.module.css';import {useLingui} from '@lingui/react/macro';-import {CaretLeftIcon, CaretRightIcon} from '@phosphor-icons/react';import {clsx} from 'clsx';import {observer} from 'mobx-react-lite';import type React from 'react';diff --git a/fluxer_app/src/features/voice/components/AudioWaveform.module.css b/fluxer_app/src/features/voice/components/AudioWaveform.module.cssindex fecf1fe1b..14ce9297f 100644--- a/fluxer_app/src/features/voice/components/AudioWaveform.module.css+++ b/fluxer_app/src/features/voice/components/AudioWaveform.module.css@@ -61,14 +61,6 @@border-radius: 0.0625rem;}-.handleStart {- --audio-waveform-handle-edge: start;-}--.handleEnd {- --audio-waveform-handle-edge: end;-}-.playhead {position: absolute;top: 0;diff --git a/fluxer_app/src/features/voice/components/AudioWaveform.tsx b/fluxer_app/src/features/voice/components/AudioWaveform.tsxindex 424eac218..ef5b1b13e 100644--- a/fluxer_app/src/features/voice/components/AudioWaveform.tsx+++ b/fluxer_app/src/features/voice/components/AudioWaveform.tsx@@ -258,7 +258,7 @@ export const AudioWaveform: React.FC<AudioWaveformProps> = ({data-flx="voice.audio-waveform.selection.region-pointer-down"/><div- className={clsx(styles.handle, styles.handleStart)}+ className={styles.handle}style={{left: `${startPct}%`}}onPointerDown={handleStartPointerDown}role="slider"@@ -270,7 +270,7 @@ export const AudioWaveform: React.FC<AudioWaveformProps> = ({data-flx="voice.audio-waveform.handle.start-pointer-down"/><div- className={clsx(styles.handle, styles.handleEnd)}+ className={styles.handle}style={{left: `${endPct}%`}}onPointerDown={handleEndPointerDown}role="slider"diff --git a/fluxer_app/src/features/voice/components/pip_overlay/PiPHeader.tsx b/fluxer_app/src/features/voice/components/pip_overlay/PiPHeader.tsxindex 8ba7521f3..a929377bf 100644--- a/fluxer_app/src/features/voice/components/pip_overlay/PiPHeader.tsx+++ b/fluxer_app/src/features/voice/components/pip_overlay/PiPHeader.tsx@@ -1,10 +1,10 @@// SPDX-License-Identifier: AGPL-3.0-or-laterimport FocusRing from '@app/features/ui/focus_ring/FocusRing';+import {ArrowLeftIcon} from '@app/features/ui/icons/DirectionalIcons';import styles from '@app/features/voice/components/PiPOverlay.module.css';import {msg} from '@lingui/core/macro';import {useLingui} from '@lingui/react/macro';-import {ArrowLeftIcon} from '@phosphor-icons/react';import type React from 'react';const BACK_TO_CALL_DESCRIPTOR = msg({