Skip to content

Commit

Permalink
feat: new icons for replay settings
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Dec 30, 2024
1 parent 65067f2 commit 94c79a8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import { IconClock, IconCollapse45, IconExpand45, IconPause, IconPlay, IconSearch } from '@posthog/icons'
import {
IconClock,
IconCollapse45,
IconExpand45,
IconHourglass,
IconMouse,
IconPause,
IconPlay,
IconRabbit,
IconSearch,
IconTortoise,
} from '@posthog/icons'
import clsx from 'clsx'
import { useActions, useValues } from 'kea'
import { useKeyboardHotkeys } from 'lib/hooks/useKeyboardHotkeys'
Expand Down Expand Up @@ -30,6 +41,13 @@ function SetPlaybackSpeed(): JSX.Element {
const { setSpeed } = useActions(sessionRecordingPlayerLogic)
return (
<SettingsMenu
icon={
speed === 0.5 ? (
<IconTortoise className="text-2xl" style={{ stroke: 'currentColor', strokeWidth: '0.5' }} />
) : (
<IconRabbit className="text-2xl" style={{ stroke: 'currentColor', strokeWidth: '0.5' }} />
)
}
data-attr="session-recording-speed-select"
items={PLAYBACK_SPEEDS.map((speedToggle) => ({
label: (
Expand Down Expand Up @@ -87,6 +105,7 @@ function ShowMouseTail(): JSX.Element {
active={showMouseTail}
data-attr="show-mouse-tail"
onClick={() => setShowMouseTail(!showMouseTail)}
icon={<IconMouse className="text-lg" />}
/>
)
}
Expand All @@ -102,6 +121,7 @@ function SkipInactivity(): JSX.Element {
active={skipInactivitySetting}
data-attr="skip-inactivity"
onClick={() => setSkipInactivitySetting(!skipInactivitySetting)}
icon={<IconHourglass />}
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
BaseIcon,
IconBug,
IconCheck,
IconDashboard,
IconGear,
IconInfo,
IconSearch,
IconStethoscope,
IconTerminal,
} from '@posthog/icons'
import { LemonButton, LemonInput, LemonMenuItem, Tooltip } from '@posthog/lemon-ui'
Expand All @@ -30,7 +30,7 @@ export const TabToIcon = {
[FilterableInspectorListItemTypes.EVENTS]: IconUnverifiedEvent,
[FilterableInspectorListItemTypes.CONSOLE]: IconTerminal,
[FilterableInspectorListItemTypes.NETWORK]: IconDashboard,
[FilterableInspectorListItemTypes.DOCTOR]: IconBug,
[FilterableInspectorListItemTypes.DOCTOR]: IconStethoscope,
}

export function PlayerInspectorControls(): JSX.Element {
Expand Down Expand Up @@ -129,7 +129,7 @@ export function PlayerInspectorControls(): JSX.Element {
mode !== SessionRecordingPlayerMode.Sharing && (
<SettingsToggle
title="Doctor events help diagnose the health of a recording, and are used by PostHog support"
icon={<IconBug />}
icon={<IconStethoscope />}
label="Doctor"
active={!!miniFiltersByKey['doctor']?.enabled}
onClick={() => setMiniFilter('doctor', !miniFiltersByKey['doctor']?.enabled)}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"@microsoft/fetch-event-source": "^2.0.1",
"@monaco-editor/react": "4.6.0",
"@posthog/hogvm": "^1.0.66",
"@posthog/icons": "0.9.2",
"@posthog/icons": "0.9.3",
"@posthog/plugin-scaffold": "^1.4.4",
"@react-hook/size": "^2.1.2",
"@rrweb/types": "2.0.0-alpha.13",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 94c79a8

Please sign in to comment.