From 1443ef12eb39846ad6462c6b93113303908bd389 Mon Sep 17 00:00:00 2001 From: Cyril Date: Mon, 20 Jul 2026 11:21:40 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(frontend)=20extract=20getTra?= =?UTF-8?q?ckKey=20to=20shared=20layout=20utils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move track key helper out of pip so layouts can reuse it. --- .../pipTrackSelection.ts => layout/utils/trackSelection.ts} | 0 .../src/features/pip/components/layout/PipFocusLayout.tsx | 2 +- .../src/features/pip/components/layout/PipGridLayout.tsx | 2 +- .../src/features/pip/components/layout/PipScreenShareLayout.tsx | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/frontend/src/features/{pip/utils/pipTrackSelection.ts => layout/utils/trackSelection.ts} (100%) diff --git a/src/frontend/src/features/pip/utils/pipTrackSelection.ts b/src/frontend/src/features/layout/utils/trackSelection.ts similarity index 100% rename from src/frontend/src/features/pip/utils/pipTrackSelection.ts rename to src/frontend/src/features/layout/utils/trackSelection.ts diff --git a/src/frontend/src/features/pip/components/layout/PipFocusLayout.tsx b/src/frontend/src/features/pip/components/layout/PipFocusLayout.tsx index bbaab017..dccb5ae4 100644 --- a/src/frontend/src/features/pip/components/layout/PipFocusLayout.tsx +++ b/src/frontend/src/features/pip/components/layout/PipFocusLayout.tsx @@ -2,7 +2,7 @@ import { memo } from 'react' import type { TrackReferenceOrPlaceholder } from '@livekit/components-core' import { styled } from '@/styled-system/jsx' import { ParticipantTile } from '@/features/participantTile/components/ParticipantTile' -import { getTrackKey } from '../../utils/pipTrackSelection' +import { getTrackKey } from '@/features/layout/utils/trackSelection' type PipFocusLayoutProps = { mainTrack?: TrackReferenceOrPlaceholder diff --git a/src/frontend/src/features/pip/components/layout/PipGridLayout.tsx b/src/frontend/src/features/pip/components/layout/PipGridLayout.tsx index 20a9ef42..3f0cfc36 100644 --- a/src/frontend/src/features/pip/components/layout/PipGridLayout.tsx +++ b/src/frontend/src/features/pip/components/layout/PipGridLayout.tsx @@ -4,7 +4,7 @@ import { styled } from '@/styled-system/jsx' import { ParticipantTile } from '@/features/participantTile/components/ParticipantTile' import { usePipElementSize } from '../../hooks/usePipElementSize' import { computePipGridLayout } from '../../utils/pipGrid' -import { getTrackKey } from '../../utils/pipTrackSelection' +import { getTrackKey } from '@/features/layout/utils/trackSelection' type PipGridLayoutProps = { tracks: TrackReferenceOrPlaceholder[] diff --git a/src/frontend/src/features/pip/components/layout/PipScreenShareLayout.tsx b/src/frontend/src/features/pip/components/layout/PipScreenShareLayout.tsx index 8ba5c7c6..9eeb1a69 100644 --- a/src/frontend/src/features/pip/components/layout/PipScreenShareLayout.tsx +++ b/src/frontend/src/features/pip/components/layout/PipScreenShareLayout.tsx @@ -2,7 +2,7 @@ import { memo } from 'react' import type { TrackReferenceOrPlaceholder } from '@livekit/components-core' import { styled } from '@/styled-system/jsx' import { ParticipantTile } from '@/features/participantTile/components/ParticipantTile' -import { getTrackKey } from '../../utils/pipTrackSelection' +import { getTrackKey } from '@/features/layout/utils/trackSelection' type PipScreenShareLayoutProps = { screenShareTrack: TrackReferenceOrPlaceholder