Open source video conferencing app powered by LiveKit. Built with Django and React.
🚚(frontend) move participant list code into a feature folder
lebaudantoined1dde71bea94
diff --git a/src/frontend/src/features/notifications/components/WaitingParticipantNotification.tsx b/src/frontend/src/features/notifications/components/WaitingParticipantNotification.tsxindex 80ad8fb2..bead7e36 100644--- a/src/frontend/src/features/notifications/components/WaitingParticipantNotification.tsx+++ b/src/frontend/src/features/notifications/components/WaitingParticipantNotification.tsx@@ -7,8 +7,8 @@ import { RiInfinityLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'import { useEffect, useRef, useState } from 'react'import { usePrevious } from '@/hooks/usePrevious'-import { WaitingParticipant } from '@/features/rooms/api/listWaitingParticipants'-import { useWaitingParticipants } from '@/features/rooms/hooks/useWaitingParticipants'+import type { WaitingParticipant } from '@/features/participants/api/listWaitingParticipants'+import { useWaitingParticipants } from '@/features/participants/hooks/useWaitingParticipants'import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'import { useNotificationSound } from '../hooks/useSoundNotification'import { NotificationType } from '@/features/notifications'diff --git a/src/frontend/src/features/rooms/api/enterRoom.ts b/src/frontend/src/features/participants/api/enterRoom.tssimilarity index 100%rename from src/frontend/src/features/rooms/api/enterRoom.tsrename to src/frontend/src/features/participants/api/enterRoom.tsdiff --git a/src/frontend/src/features/rooms/api/listWaitingParticipants.ts b/src/frontend/src/features/participants/api/listWaitingParticipants.tssimilarity index 100%rename from src/frontend/src/features/rooms/api/listWaitingParticipants.tsrename to src/frontend/src/features/participants/api/listWaitingParticipants.tsdiff --git a/src/frontend/src/features/rooms/api/lowerHandParticipant.ts b/src/frontend/src/features/participants/api/lowerHandParticipant.tssimilarity index 100%rename from src/frontend/src/features/rooms/api/lowerHandParticipant.tsrename to src/frontend/src/features/participants/api/lowerHandParticipant.tsdiff --git a/src/frontend/src/features/rooms/api/lowerHandParticipants.ts b/src/frontend/src/features/participants/api/lowerHandParticipants.tssimilarity index 100%rename from src/frontend/src/features/rooms/api/lowerHandParticipants.tsrename to src/frontend/src/features/participants/api/lowerHandParticipants.tsdiff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/HandRaisedListItem.tsx b/src/frontend/src/features/participants/components/HandRaisedListItem.tsxsimilarity index 96%rename from src/frontend/src/features/rooms/livekit/components/controls/Participants/HandRaisedListItem.tsxrename to src/frontend/src/features/participants/components/HandRaisedListItem.tsxindex 11689f99..b3987ca8 100644--- a/src/frontend/src/features/rooms/livekit/components/controls/Participants/HandRaisedListItem.tsx+++ b/src/frontend/src/features/participants/components/HandRaisedListItem.tsx@@ -4,7 +4,7 @@ import { HStack } from '@/styled-system/jsx'import { Text } from '@/primitives/Text'import { useTranslation } from 'react-i18next'import { Avatar } from '@/components/Avatar'-import { useLowerHandParticipant } from '@/features/rooms/api/lowerHandParticipant'+import { useLowerHandParticipant } from '../api/lowerHandParticipant'import { getParticipantColor } from '@/features/rooms/utils/getParticipantColor'import { useIsAdminOrOwner } from '@/features/rooms/livekit/hooks/useIsAdminOrOwner'import type { Participant } from 'livekit-client'diff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/LowerAllHandsButton.tsx b/src/frontend/src/features/participants/components/LowerAllHandsButton.tsxsimilarity index 92%rename from src/frontend/src/features/rooms/livekit/components/controls/Participants/LowerAllHandsButton.tsxrename to src/frontend/src/features/participants/components/LowerAllHandsButton.tsxindex ea8aa949..af9da045 100644--- a/src/frontend/src/features/rooms/livekit/components/controls/Participants/LowerAllHandsButton.tsx+++ b/src/frontend/src/features/participants/components/LowerAllHandsButton.tsx@@ -1,7 +1,7 @@import { Button } from '@/primitives'import { useTranslation } from 'react-i18next'import type { Participant } from 'livekit-client'-import { useLowerHandParticipants } from '@/features/rooms/api/lowerHandParticipants'+import { useLowerHandParticipants } from '../api/lowerHandParticipants'import { useIsAdminOrOwner } from '@/features/rooms/livekit/hooks/useIsAdminOrOwner'import { css } from '@/styled-system/css'import { RiHand } from '@remixicon/react'diff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/MuteEveryoneButton.tsx b/src/frontend/src/features/participants/components/MuteEveryoneButton.tsxsimilarity index 100%rename from src/frontend/src/features/rooms/livekit/components/controls/Participants/MuteEveryoneButton.tsxrename to src/frontend/src/features/participants/components/MuteEveryoneButton.tsxdiff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantListItem.tsx b/src/frontend/src/features/participants/components/ParticipantListItem.tsxsimilarity index 96%rename from src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantListItem.tsxrename to src/frontend/src/features/participants/components/ParticipantListItem.tsxindex 3fd8333d..bf4a8256 100644--- a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantListItem.tsx+++ b/src/frontend/src/features/participants/components/ParticipantListItem.tsx@@ -16,11 +16,11 @@ import Source = Track.Sourceimport { RiMicFill, RiMicOffFill } from '@remixicon/react'import { Button } from '@/primitives'import { useState } from 'react'-import { MuteAlertDialog } from '../../MuteAlertDialog'import { useMuteParticipant } from '@/features/rooms/api/muteParticipant'import { useCanMute } from '@/features/rooms/livekit/hooks/useCanMute'-import { ParticipantMenuButton } from '../../ParticipantMenu/ParticipantMenuButton'+import { ParticipantMenuButton } from './menu/ParticipantMenuButton'import { PinBadge } from './PinBadge'+import { MuteAlertDialog } from '@/features/rooms/livekit/components/MuteAlertDialog'type MicIndicatorProps = {participant: Participantdiff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsCollapsableList.tsx b/src/frontend/src/features/participants/components/ParticipantsCollapsableList.tsxsimilarity index 100%rename from src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsCollapsableList.tsxrename to src/frontend/src/features/participants/components/ParticipantsCollapsableList.tsxdiff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsList.tsx b/src/frontend/src/features/participants/components/ParticipantsList.tsxsimilarity index 87%rename from src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsList.tsxrename to src/frontend/src/features/participants/components/ParticipantsList.tsxindex 0fc82a3a..ebeefa37 100644--- a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsList.tsx+++ b/src/frontend/src/features/participants/components/ParticipantsList.tsx@@ -3,14 +3,14 @@ import { useParticipants } from '@livekit/components-react'import { Div, H } from '@/primitives'import { useTranslation } from 'react-i18next'-import { ParticipantListItem } from '../../controls/Participants/ParticipantListItem'-import { ParticipantsCollapsableList } from '../../controls/Participants/ParticipantsCollapsableList'-import { HandRaisedListItem } from '../../controls/Participants/HandRaisedListItem'-import { LowerAllHandsButton } from '../../controls/Participants/LowerAllHandsButton'+import { ParticipantListItem } from './ParticipantListItem'+import { ParticipantsCollapsableList } from './ParticipantsCollapsableList'+import { HandRaisedListItem } from './HandRaisedListItem'+import { LowerAllHandsButton } from './LowerAllHandsButton'import { WaitingParticipantListItem } from './WaitingParticipantListItem'-import { useWaitingParticipants } from '@/features/rooms/hooks/useWaitingParticipants'+import { useWaitingParticipants } from '@/features/participants/hooks/useWaitingParticipants'import type { Participant } from 'livekit-client'-import { WaitingParticipant } from '@/features/rooms/api/listWaitingParticipants'+import { WaitingParticipant } from '@/features/participants/api/listWaitingParticipants'import { MuteEveryoneButton } from './MuteEveryoneButton'// TODO: Optimize rendering performance, especially for longer participant lists, even though they are generally short.diff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/PinBadge.tsx b/src/frontend/src/features/participants/components/PinBadge.tsxsimilarity index 100%rename from src/frontend/src/features/rooms/livekit/components/controls/Participants/PinBadge.tsxrename to src/frontend/src/features/participants/components/PinBadge.tsxdiff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/WaitingParticipantListItem.tsx b/src/frontend/src/features/participants/components/WaitingParticipantListItem.tsxsimilarity index 96%rename from src/frontend/src/features/rooms/livekit/components/controls/Participants/WaitingParticipantListItem.tsxrename to src/frontend/src/features/participants/components/WaitingParticipantListItem.tsxindex 3e32c3e0..6da75eab 100644--- a/src/frontend/src/features/rooms/livekit/components/controls/Participants/WaitingParticipantListItem.tsx+++ b/src/frontend/src/features/participants/components/WaitingParticipantListItem.tsx@@ -3,7 +3,7 @@ import { HStack } from '@/styled-system/jsx'import { css } from '@/styled-system/css'import { Avatar } from '@/components/Avatar'import { useTranslation } from 'react-i18next'-import { WaitingParticipant } from '@/features/rooms/api/listWaitingParticipants'+import { WaitingParticipant } from '../api/listWaitingParticipants'import { RiCloseLine } from '@remixicon/react'export const WaitingParticipantListItem = ({diff --git a/src/frontend/src/features/rooms/livekit/components/ParticipantMenu/ParticipantMenu.tsx b/src/frontend/src/features/participants/components/menu/ParticipantMenu.tsxsimilarity index 85%rename from src/frontend/src/features/rooms/livekit/components/ParticipantMenu/ParticipantMenu.tsxrename to src/frontend/src/features/participants/components/menu/ParticipantMenu.tsxindex 1ada58c8..2cc6397e 100644--- a/src/frontend/src/features/rooms/livekit/components/ParticipantMenu/ParticipantMenu.tsx+++ b/src/frontend/src/features/participants/components/menu/ParticipantMenu.tsx@@ -1,8 +1,8 @@import { Menu as RACMenu } from 'react-aria-components'import type { Participant } from 'livekit-client'import { useIsAdminOrOwner } from '@/features/rooms/livekit/hooks/useIsAdminOrOwner'-import { PinMenuItem } from './PinMenuItem'-import { RemoveMenuItem } from './RemoveMenuItem'+import { PinMenuItem } from './items/PinMenuItem'+import { RemoveMenuItem } from './items/RemoveMenuItem'export const ParticipantMenu = ({participant,diff --git a/src/frontend/src/features/rooms/livekit/components/ParticipantMenu/ParticipantMenuButton.tsx b/src/frontend/src/features/participants/components/menu/ParticipantMenuButton.tsxsimilarity index 100%rename from src/frontend/src/features/rooms/livekit/components/ParticipantMenu/ParticipantMenuButton.tsxrename to src/frontend/src/features/participants/components/menu/ParticipantMenuButton.tsxdiff --git a/src/frontend/src/features/rooms/livekit/components/ParticipantMenu/PinMenuItem.tsx b/src/frontend/src/features/participants/components/menu/items/PinMenuItem.tsxsimilarity index 100%rename from src/frontend/src/features/rooms/livekit/components/ParticipantMenu/PinMenuItem.tsxrename to src/frontend/src/features/participants/components/menu/items/PinMenuItem.tsxdiff --git a/src/frontend/src/features/rooms/livekit/components/ParticipantMenu/RemoveMenuItem.tsx b/src/frontend/src/features/participants/components/menu/items/RemoveMenuItem.tsxsimilarity index 100%rename from src/frontend/src/features/rooms/livekit/components/ParticipantMenu/RemoveMenuItem.tsxrename to src/frontend/src/features/participants/components/menu/items/RemoveMenuItem.tsxdiff --git a/src/frontend/src/features/rooms/hooks/useWaitingParticipants.ts b/src/frontend/src/features/participants/hooks/useWaitingParticipants.tssimilarity index 97%rename from src/frontend/src/features/rooms/hooks/useWaitingParticipants.tsrename to src/frontend/src/features/participants/hooks/useWaitingParticipants.tsindex 9b8459ff..825ff7e4 100644--- a/src/frontend/src/features/rooms/hooks/useWaitingParticipants.ts+++ b/src/frontend/src/features/participants/hooks/useWaitingParticipants.ts@@ -7,7 +7,7 @@ import { useEnterRoom } from '../api/enterRoom'import {useListWaitingParticipants,type WaitingParticipant,-} from '../api/listWaitingParticipants'+} from '../../participants/api/listWaitingParticipants'import { decodeNotificationDataReceived } from '@/features/notifications/utils'import { NotificationType } from '@/features/notifications/NotificationType'diff --git a/src/frontend/src/features/rooms/livekit/components/SidePanel.tsx b/src/frontend/src/features/rooms/livekit/components/SidePanel.tsxindex e5940c17..67297a5e 100644--- a/src/frontend/src/features/rooms/livekit/components/SidePanel.tsx+++ b/src/frontend/src/features/rooms/livekit/components/SidePanel.tsx@@ -5,7 +5,7 @@ import { text } from '@/primitives/Text'import { Button, Div } from '@/primitives'import { RiArrowLeftLine, RiCloseLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'-import { ParticipantsList } from './controls/Participants/ParticipantsList'+import { ParticipantsList } from '@/features/participants/components/ParticipantsList'import { PanelId, useSidePanel } from '../hooks/useSidePanel'import React, { ReactNode, useCallback, useRef } from 'react'import { Chat } from '@/features/chat/components/Chat'diff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsToggle.tsx b/src/frontend/src/features/rooms/livekit/components/controls/ParticipantsToggle.tsxsimilarity index 97%rename from src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsToggle.tsxrename to src/frontend/src/features/rooms/livekit/components/controls/ParticipantsToggle.tsxindex 8e205f90..5f809198 100644--- a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsToggle.tsx+++ b/src/frontend/src/features/rooms/livekit/components/controls/ParticipantsToggle.tsx@@ -4,10 +4,10 @@ import { ToggleButton } from '@/primitives'import { VisualOnlyTooltip } from '@/primitives/VisualOnlyTooltip'import { css } from '@/styled-system/css'import { useRemoteParticipants } from '@livekit/components-react'-import { useSidePanel } from '../../../hooks/useSidePanel'import { ToggleButtonProps } from '@/primitives/ToggleButton'import { useRegisterKeyboardShortcut } from '@/features/shortcuts/useRegisterKeyboardShortcut'import { RoomEvent } from 'livekit-client'+import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'export const ParticipantsToggle = ({onPress,diff --git a/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/MobileControlBar.tsx b/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/MobileControlBar.tsxindex 663a2039..a9221124 100644--- a/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/MobileControlBar.tsx+++ b/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/MobileControlBar.tsx@@ -15,7 +15,7 @@ import {} from '@remixicon/react'import { ScreenShareToggle } from '../../components/controls/ScreenShareToggle'import { ChatToggle } from '../../components/controls/ChatToggle'-import { ParticipantsToggle } from '../../components/controls/Participants/ParticipantsToggle'+import { ParticipantsToggle } from '../../components/controls/ParticipantsToggle'import { useSidePanel } from '../../hooks/useSidePanel'import { LinkButton } from '@/primitives'import { ResponsiveMenu } from './ResponsiveMenu'diff --git a/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/MoreOptions.tsx b/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/MoreOptions.tsxindex 482c8474..e571d655 100644--- a/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/MoreOptions.tsx+++ b/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/MoreOptions.tsx@@ -1,6 +1,6 @@import { css } from '@/styled-system/css'import { ChatToggle } from '../../components/controls/ChatToggle'-import { ParticipantsToggle } from '../../components/controls/Participants/ParticipantsToggle'+import { ParticipantsToggle } from '../../components/controls/ParticipantsToggle'import { ToolsToggle } from '../../components/controls/ToolsToggle'import { InfoToggle } from '../../components/controls/InfoToggle'import { AdminToggle } from '../../components/AdminToggle'