Skip to content

Commit

Permalink
feat: remove show ticks setting (#25426)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Oct 7, 2024
1 parent 391065c commit d691a1a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
18 changes: 2 additions & 16 deletions frontend/src/scenes/session-recordings/player/PlayerSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import { useActions, useValues } from 'kea'
import { playerSettingsLogic } from './playerSettingsLogic'

export const PlayerSettings = (): JSX.Element => {
const { autoplayDirection, skipInactivitySetting, showMouseTail, showSeekbarTicks } = useValues(playerSettingsLogic)
const { setAutoplayDirection, setSkipInactivitySetting, setShowMouseTail, setShowSeekbarTicks } =
useActions(playerSettingsLogic)
const { autoplayDirection, skipInactivitySetting, showMouseTail } = useValues(playerSettingsLogic)
const { setAutoplayDirection, setSkipInactivitySetting, setShowMouseTail } = useActions(playerSettingsLogic)

return (
<LemonMenu
Expand Down Expand Up @@ -54,19 +53,6 @@ export const PlayerSettings = (): JSX.Element => {
/>
),
},
{
custom: true,
label: () => (
<LemonSwitch
className="px-2 py-1"
checked={showSeekbarTicks}
onChange={setShowSeekbarTicks}
label="Seekbar ticks"
tooltip="Show $pageview and $screen events on the seekbar"
fullWidth
/>
),
},
{
custom: true,
label: () => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export const playerInspectorLogic = kea<playerInspectorLogicType>([
],
values: [
playerSettingsLogic,
['showOnlyMatching', 'showSeekbarTicks', 'tab', 'miniFiltersByKey', 'searchQuery'],
['showOnlyMatching', 'tab', 'miniFiltersByKey', 'searchQuery'],
sessionRecordingDataLogic(props),
[
'sessionPlayerData',
Expand Down Expand Up @@ -652,20 +652,15 @@ export const playerInspectorLogic = kea<playerInspectorLogicType>([
],

seekbarItems: [
(s) => [s.filteredItems, s.showOnlyMatching, s.showSeekbarTicks, s.showMatchingEventsFilter],
(s) => [s.filteredItems, s.showOnlyMatching, s.showMatchingEventsFilter],
(
filteredItems,
showOnlyMatching,
showSeekbarTicks,
showMatchingEventsFilter
): (InspectorListItemEvent | InspectorListItemComment)[] => {
let items: (InspectorListItemEvent | InspectorListItemComment)[] = filteredItems.filter(
(item): item is InspectorListItemEvent | InspectorListItemComment => {
if (item.type === SessionRecordingPlayerTab.EVENTS) {
if (!showSeekbarTicks && ['$pageview', '$screen'].includes(item.data.event)) {
return false
}

return !(showMatchingEventsFilter && showOnlyMatching && item.highlightColor !== 'primary')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export const playerSettingsLogic = kea<playerSettingsLogicType>([
setPlaybackMode: (mode: PlaybackMode) => ({ mode }),
setSidebarOpen: (open: boolean) => ({ open }),
setShowMouseTail: (showMouseTail: boolean) => ({ showMouseTail }),
setShowSeekbarTicks: (show: boolean) => ({ show }),
}),
connect({
values: [teamLogic, ['currentTeam']],
Expand Down Expand Up @@ -278,13 +277,6 @@ export const playerSettingsLogic = kea<playerSettingsLogicType>([
setShowMouseTail: (_, { showMouseTail }) => showMouseTail,
},
],
showSeekbarTicks: [
true,
{ persist: true },
{
setShowSeekbarTicks: (_, { show }) => show,
},
],

// Inspector
tab: [
Expand Down

0 comments on commit d691a1a

Please sign in to comment.