-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2367408
commit 9b673ed
Showing
51 changed files
with
1,100 additions
and
1,026 deletions.
There are no files selected for viewing
Binary file modified
BIN
-1.88 KB
(82%)
...tend/__snapshots__/components-networkrequest-navigationitem--all-slow--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
BIN
-1.87 KB
(83%)
...end/__snapshots__/components-networkrequest-navigationitem--all-slow--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
BIN
-27.4 KB
(56%)
frontend/__snapshots__/components-networkrequest-navigationitem--default--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
BIN
-27.1 KB
(56%)
...tend/__snapshots__/components-networkrequest-navigationitem--default--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
BIN
-27.4 KB
(56%)
...tend/__snapshots__/components-networkrequest-navigationitem--expanded--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
BIN
-27.1 KB
(56%)
...end/__snapshots__/components-networkrequest-navigationitem--expanded--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
BIN
-1.87 KB
(82%)
...components-networkrequest-navigationitem--really-slow-dom-interactive--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
BIN
-1.87 KB
(83%)
...omponents-networkrequest-navigationitem--really-slow-dom-interactive--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
BIN
-1.88 KB
(82%)
...snapshots__/components-networkrequest-navigationitem--really-slow-fcp--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
BIN
-1.87 KB
(83%)
...napshots__/components-networkrequest-navigationitem--really-slow-fcp--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
BIN
-1.87 KB
(82%)
...ts__/components-networkrequest-navigationitem--really-slow-load-event--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
BIN
-1.87 KB
(83%)
...s__/components-networkrequest-navigationitem--really-slow-load-event--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
BIN
-1.88 KB
(83%)
...hots__/components-networkrequest-navigationitem--slow-dom-interactive--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
BIN
-1.87 KB
(83%)
...ots__/components-networkrequest-navigationitem--slow-dom-interactive--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
BIN
-1.88 KB
(83%)
...tend/__snapshots__/components-networkrequest-navigationitem--slow-fcp--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
BIN
-1.87 KB
(83%)
...end/__snapshots__/components-networkrequest-navigationitem--slow-fcp--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
BIN
-1.88 KB
(82%)
...snapshots__/components-networkrequest-navigationitem--slow-load-event--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
BIN
-1.87 KB
(83%)
...napshots__/components-networkrequest-navigationitem--slow-load-event--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
BIN
-3.07 KB
(72%)
...shots__/components-networkrequest-navigationitem--web-vitals-all-fast--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
BIN
-3.02 KB
(73%)
...hots__/components-networkrequest-navigationitem--web-vitals-all-fast--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
BIN
-3.01 KB
(74%)
...ots__/components-networkrequest-navigationitem--web-vitals-all-medium--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
BIN
-3.06 KB
(74%)
...ts__/components-networkrequest-navigationitem--web-vitals-all-medium--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
BIN
-3.05 KB
(72%)
...shots__/components-networkrequest-navigationitem--web-vitals-all-slow--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
BIN
-3.04 KB
(73%)
...hots__/components-networkrequest-navigationitem--web-vitals-all-slow--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
BIN
-17.1 KB
(59%)
frontend/__snapshots__/components-playerinspector--default--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
BIN
-17.7 KB
(58%)
frontend/__snapshots__/components-playerinspector--default--light.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
frontend/src/scenes/session-recordings/components/PanelSettings.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { LemonButton, LemonButtonProps } from 'lib/lemon-ui/LemonButton' | ||
import { LemonMenu, LemonMenuItem, LemonMenuProps } from 'lib/lemon-ui/LemonMenu/LemonMenu' | ||
import { Tooltip } from 'lib/lemon-ui/Tooltip' | ||
|
||
/** | ||
* TODO the lemon button font only has 700 and 800 weights available. | ||
* Ideally these buttons would use more like 400 and 500 weights. | ||
* or even 300 and 400 weights. | ||
* when inactive / active respectively. | ||
*/ | ||
|
||
interface SettingsMenuProps extends Omit<LemonMenuProps, 'items' | 'children'> { | ||
label: string | ||
items: LemonMenuItem[] | ||
icon: JSX.Element | ||
isAvailable?: boolean | ||
whenUnavailable?: LemonMenuItem | ||
} | ||
|
||
export function SettingsMenu({ | ||
label, | ||
items, | ||
icon, | ||
isAvailable = true, | ||
whenUnavailable, | ||
...props | ||
}: SettingsMenuProps): JSX.Element { | ||
const active = items.some((cf) => !!cf.active) | ||
return ( | ||
<LemonMenu | ||
buttonSize="xsmall" | ||
closeOnClickInside={false} | ||
items={isAvailable ? items : whenUnavailable ? [whenUnavailable] : []} | ||
{...props} | ||
> | ||
<LemonButton status={active ? 'danger' : 'default'} size="xsmall" icon={icon}> | ||
{label} | ||
</LemonButton> | ||
</LemonMenu> | ||
) | ||
} | ||
|
||
export function SettingsToggle({ | ||
title, | ||
icon, | ||
label, | ||
active, | ||
...props | ||
}: Omit<LemonButtonProps, 'status' | 'sideAction'> & { | ||
active: boolean | ||
title: string | ||
icon?: JSX.Element | null | ||
label: JSX.Element | string | ||
}): JSX.Element { | ||
const button = ( | ||
<LemonButton icon={icon} size="xsmall" status={active ? 'danger' : 'default'} {...props}> | ||
{label} | ||
</LemonButton> | ||
) | ||
|
||
// otherwise the tooltip shows instead of the disabled reason | ||
return props.disabledReason ? button : <Tooltip title={title}>{button}</Tooltip> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.