Skip to content

Commit

Permalink
chore: make skip inactivity more subtle (#21660)
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin authored Apr 19, 2024
1 parent b7add1d commit 479cd88
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 50 deletions.
Binary file modified frontend/__snapshots__/lemon-ui-icons--shelf-p--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/lemon-ui-icons--shelf-p--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/lemon-ui-icons--shelf-s--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/lemon-ui-icons--shelf-s--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions frontend/src/lib/lemon-ui/icons/categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const OBJECTS = {
'IconMap',
'IconTie',
'IconCoffee',
'IconCake',
'IconFlag',
'IconCreditCard',
'IconCrown',
Expand All @@ -47,8 +48,8 @@ export const OBJECTS = {
'IconGearFilled',
'IconStack',
],
People: ['IconPeople', 'IconPeopleFilled', 'IconPerson', 'IconProfile', 'IconUser'],
'Business & Finance': ['IconStore', 'IconCart', 'IconReceipt', 'IconPiggyBank'],
People: ['IconPeople', 'IconPeopleFilled', 'IconPerson', 'IconProfile', 'IconUser', 'IconGroups'],
'Business & Finance': ['IconStore', 'IconCart', 'IconReceipt', 'IconPiggyBank', 'IconHandMoney'],
Time: ['IconHourglass', 'IconCalendar', 'IconClock'],
Nature: ['IconDay', 'IconNight', 'IconGlobe', 'IconCloud', 'IconBug'],
Text: ['IconDocument', 'IconBrackets', 'IconTextWidth', 'IconQuote', 'IconLetter', 'IconNewspaper'],
Expand All @@ -65,6 +66,7 @@ export const TECHNOLOGY = {
'IconServer',
'IconDatabase',
'IconHardDrive',
'IconMouse',
],
Software: ['IconBrowser', 'IconCode', 'IconCodeInsert', 'IconTerminal', 'IconApp'],
UI: [
Expand All @@ -81,6 +83,9 @@ export const TECHNOLOGY = {
'IconCheckbox',
'IconList',
'IconColumns',
'IconBottomPanel',
'IconSidePanel',
'IconMouseScrollDown',
],
}

Expand Down Expand Up @@ -117,6 +122,7 @@ export const ELEMENTS = {
'IconCheck',
'IconX',
'IconEllipsis',
'IconHide',
],
'Arrows & Shapes': [
'IconArrowLeft',
Expand All @@ -125,6 +131,7 @@ export const ELEMENTS = {
'IconArrowCircleRight',
'IconArrowRightDown',
'IconArrowUpRight',
'IconArrowUpLeftDiagonal',
'IconCollapse',
'IconExpand',
'IconCollapse45',
Expand Down Expand Up @@ -176,6 +183,7 @@ export const TEAMS_AND_COMPANIES = {
'IconPlayFilled',
'IconPlaylist',
'IconPause',
'IconFastForward',
'IconPauseFilled',
'IconRewind',
'IconRecord',
Expand Down
25 changes: 0 additions & 25 deletions frontend/src/lib/lemon-ui/icons/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1229,23 +1229,6 @@ export function IconFullScreen(props: LemonIconProps): JSX.Element {
)
}

export function IconSkipInactivity({ enabled, ...props }: LemonIconProps & { enabled?: boolean }): JSX.Element {
return (
<LemonIconBase {...props}>
<path
d="M10.025 17.5L5.75 13.225L4.5 17L1.5 7L11.5 10L7.725 11.25L12 15.525L10.025 17.5Z"
fill="currentColor"
/>
<path
d="M14 12.375L22.25 12.375M14 15.625L17.5 15.625M14 8.875L17.5 8.875"
stroke="currentColor"
strokeOpacity={enabled ? '1' : '0.3'}
strokeWidth="1.25"
/>
</LemonIconBase>
)
}

export function IconPlayCircle(props: LemonIconProps): JSX.Element {
return (
<LemonIconBase {...props}>
Expand All @@ -1257,14 +1240,6 @@ export function IconPlayCircle(props: LemonIconProps): JSX.Element {
)
}

export function IconPause(props: LemonIconProps): JSX.Element {
return (
<LemonIconBase {...props}>
<path d="M6 19H10V5H6V19ZM14 5V19H18V5H14Z" fill="currentColor" />
</LemonIconBase>
)
}

export function IconSkipBackward(props: LemonIconProps): JSX.Element {
return (
<LemonIconBase {...props}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IconPlay } from '@posthog/icons'
import { LemonMenu } from '@posthog/lemon-ui'
import { IconFastForward, IconPause, IconPlay } from '@posthog/icons'
import { LemonMenu, LemonSwitch } from '@posthog/lemon-ui'
import clsx from 'clsx'
import { useActions, useValues } from 'kea'
import { IconFullScreen, IconPause, IconSkipInactivity } from 'lib/lemon-ui/icons'
import { IconFullScreen } from 'lib/lemon-ui/icons'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
import {
Expand Down Expand Up @@ -60,26 +60,20 @@ export function PlayerController(): JSX.Element {
</LemonMenu>
</div>
<div className="flex pl-2">
<LemonButton
<LemonSwitch
data-attr="skip-inactivity"
size="small"
onClick={() => {
setSkipInactivitySetting(!skipInactivitySetting)
}}
icon={
<IconSkipInactivity
checked={skipInactivitySetting}
onChange={setSkipInactivitySetting}
tooltip={skipInactivitySetting ? 'Skipping inactivity' : 'Skip inactivity'}
handleContent={
<IconFastForward
className={clsx(
'text-2xl',
skipInactivitySetting ? 'text-primary-3000' : 'text-primary-alt'
'p-0.5',
skipInactivitySetting ? 'text-primary-3000' : 'text-border-bold'
)}
enabled={skipInactivitySetting}
/>
}
>
<span className={skipInactivitySetting ? 'text-primary-3000' : 'text-primary-alt'}>
{skipInactivitySetting ? 'Skipping inactivity' : 'Skip inactivity'}
</span>
</LemonButton>
/>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@medv/finder": "^3.1.0",
"@microlink/react-json-view": "^1.21.3",
"@monaco-editor/react": "4.4.6",
"@posthog/icons": "0.6.7",
"@posthog/icons": "0.7.0",
"@posthog/plugin-scaffold": "^1.4.4",
"@react-hook/size": "^2.1.2",
"@rrweb/types": "2.0.0-alpha.12",
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 479cd88

Please sign in to comment.