-
+
+ {toggleLayoutStacking && (
+ : }
+ onClick={toggleLayoutStacking}
+ />
+ )}
} onClick={onClose} />
diff --git a/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorPreview.tsx b/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorPreview.tsx
deleted file mode 100644
index 0af3441533745..0000000000000
--- a/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorPreview.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import { IconDashboard, IconSearch, IconTerminal } from '@posthog/icons'
-import clsx from 'clsx'
-import { useValues } from 'kea'
-import { IconUnverifiedEvent } from 'lib/lemon-ui/icons'
-
-import { SessionRecordingPlayerTab } from '~/types'
-
-import { sessionRecordingPlayerLogic } from '../sessionRecordingPlayerLogic'
-import { playerInspectorLogic } from './playerInspectorLogic'
-
-const TabToIcon = {
- [SessionRecordingPlayerTab.ALL]: IconSearch,
- [SessionRecordingPlayerTab.EVENTS]: IconUnverifiedEvent,
- [SessionRecordingPlayerTab.CONSOLE]: IconTerminal,
- [SessionRecordingPlayerTab.NETWORK]: IconDashboard,
-}
-
-export function PlayerInspectorPreview(props: { onClick: () => void }): JSX.Element {
- const { logicProps } = useValues(sessionRecordingPlayerLogic)
- const inspectorLogic = playerInspectorLogic(logicProps)
-
- const { tab } = useValues(inspectorLogic)
-
- const tabs = [
- SessionRecordingPlayerTab.ALL,
- SessionRecordingPlayerTab.EVENTS,
- SessionRecordingPlayerTab.CONSOLE,
- SessionRecordingPlayerTab.NETWORK,
- ]
-
- return (
-
- {tabs.map((tabId) => {
- const TabIcon = TabToIcon[tabId]
- return (
-
-
-
- )
- })}
-
- )
-}
diff --git a/frontend/src/scenes/session-recordings/player/playlist-popover/PlaylistPopover.tsx b/frontend/src/scenes/session-recordings/player/playlist-popover/PlaylistPopover.tsx
index fe58d622bbf0d..bc504ee0dde4c 100644
--- a/frontend/src/scenes/session-recordings/player/playlist-popover/PlaylistPopover.tsx
+++ b/frontend/src/scenes/session-recordings/player/playlist-popover/PlaylistPopover.tsx
@@ -1,4 +1,4 @@
-import { IconPlus } from '@posthog/icons'
+import { IconPin, IconPlus } from '@posthog/icons'
import { LemonCheckbox, LemonDivider } from '@posthog/lemon-ui'
import { useActions, useValues } from 'kea'
import { Form } from 'kea-forms'
@@ -119,7 +119,7 @@ export function PlaylistPopoverButton(props: LemonButtonProps): JSX.Element {
}
>
}
+ icon={
}
active={showPlaylistPopover}
onClick={() => setShowPlaylistPopover(!showPlaylistPopover)}
sideIcon={null}
diff --git a/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.scss b/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.scss
index ea0f5d0d4fc07..ed2f90dc11186 100644
--- a/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.scss
+++ b/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.scss
@@ -12,15 +12,19 @@
border-radius: var(--radius);
.SessionRecordingsPlaylist__list {
+ position: relative;
display: flex;
flex-direction: column;
flex-shrink: 0;
- width: 25%;
- min-width: 300px;
- max-width: 350px;
height: 100%;
overflow: hidden;
+ &:not(.SessionRecordingsPlaylist__list--collapsed) {
+ width: 25%;
+ min-width: 305px;
+ max-width: 350px;
+ }
+
.text-link {
color: var(--default);
}
diff --git a/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx b/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx
index 8b8e1c151d630..025a50b38c45d 100644
--- a/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx
+++ b/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx
@@ -1,15 +1,16 @@
import './SessionRecordingsPlaylist.scss'
-import { IconFilter, IconGear } from '@posthog/icons'
+import { IconCollapse, IconFilter, IconGear } from '@posthog/icons'
import { LemonButton, Link } from '@posthog/lemon-ui'
import clsx from 'clsx'
import { range } from 'd3'
import { BindLogic, useActions, useValues } from 'kea'
import { EmptyMessage } from 'lib/components/EmptyMessage/EmptyMessage'
import { PropertyKeyInfo } from 'lib/components/PropertyKeyInfo'
+import { Resizer } from 'lib/components/Resizer/Resizer'
import { FEATURE_FLAGS } from 'lib/constants'
import { useResizeBreakpoints } from 'lib/hooks/useResizeObserver'
-import { IconWithCount } from 'lib/lemon-ui/icons'
+import { IconChevronRight, IconWithCount } from 'lib/lemon-ui/icons'
import { LemonBanner } from 'lib/lemon-ui/LemonBanner'
import { LemonTableLoader } from 'lib/lemon-ui/LemonTable/LemonTableLoader'
import { Spinner } from 'lib/lemon-ui/Spinner'
@@ -115,6 +116,7 @@ function RecordingsLists(): JSX.Element {
logicProps,
showOtherRecordings,
recordingsCount,
+ isRecordingsListCollapsed,
} = useValues(sessionRecordingsPlaylistLogic)
const {
setSelectedRecordingId,
@@ -125,6 +127,7 @@ function RecordingsLists(): JSX.Element {
setShowSettings,
resetFilters,
toggleShowOtherRecordings,
+ toggleRecordingsListCollapsed,
} = useActions(sessionRecordingsPlaylistLogic)
const onRecordingClick = (recording: SessionRecordingType): void => {
@@ -161,11 +164,20 @@ function RecordingsLists(): JSX.Element {
const notebookNode = useNotebookNode()
- return (
-
+ return isRecordingsListCollapsed ? (
+
+ } onClick={() => toggleRecordingsListCollapsed()} />
+
+ ) : (
+
-
+ }
+ onClick={() => toggleRecordingsListCollapsed()}
+ />
+
{!notebookNode ? (
Recordings
@@ -324,9 +336,16 @@ export function SessionRecordingsPlaylist(props: SessionRecordingPlaylistLogicPr
...props,
autoPlay: props.autoPlay ?? true,
}
+ const playlistRecordingsListRef = useRef(null)
const logic = sessionRecordingsPlaylistLogic(logicProps)
- const { activeSessionRecording, activeSessionRecordingId, matchingEventsMatchType, pinnedRecordings } =
- useValues(logic)
+ const {
+ activeSessionRecording,
+ activeSessionRecordingId,
+ matchingEventsMatchType,
+ pinnedRecordings,
+ isRecordingsListCollapsed,
+ } = useValues(logic)
+ const { toggleRecordingsListCollapsed } = useActions(logic)
const { ref: playlistRef, size } = useResizeBreakpoints({
0: 'small',
@@ -346,8 +365,22 @@ export function SessionRecordingsPlaylist(props: SessionRecordingPlaylistLogicPr
'SessionRecordingsPlaylist--embedded': notebookNode,
})}
>
-
+
+ toggleRecordingsListCollapsed(shouldBeClosed)}
+ onDoubleClick={() => toggleRecordingsListCollapsed()}
+ />
{activeSessionRecordingId ? (
diff --git a/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.ts b/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.ts
index 5a12f9018eba7..b54aa53aa311b 100644
--- a/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.ts
+++ b/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.ts
@@ -161,6 +161,7 @@ export const sessionRecordingsPlaylistLogic = kea ({ show }),
+ toggleRecordingsListCollapsed: (override?: boolean) => ({ override }),
}),
propsChanged(({ actions, props }, oldProps) => {
if (!objectsEqual(props.advancedFilters, oldProps.advancedFilters)) {
@@ -426,6 +427,13 @@ export const sessionRecordingsPlaylistLogic = kea false,
},
],
+ isRecordingsListCollapsed: [
+ false,
+ { persist: true },
+ {
+ toggleRecordingsListCollapsed: (state, { override }) => override ?? !state,
+ },
+ ],
})),
listeners(({ props, actions, values }) => ({
loadAllRecordings: () => {