Skip to content

Commit

Permalink
Added search info
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Oct 27, 2023
1 parent 05ddaf4 commit 153c75d
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { LemonButton, LemonInput, LemonSelect, LemonCheckbox } from '@posthog/lemon-ui'
import { Tooltip } from 'antd'
import { LemonButton, LemonInput, LemonSelect, LemonCheckbox, Tooltip } from '@posthog/lemon-ui'
import { useValues, useActions } from 'kea'
import {
IconInfo,
Expand All @@ -17,6 +16,7 @@ import { IconWindow } from 'scenes/session-recordings/player/icons'
import { playerSettingsLogic } from '../playerSettingsLogic'
import { SessionRecordingPlayerMode, sessionRecordingPlayerLogic } from '../sessionRecordingPlayerLogic'
import { playerInspectorLogic } from './playerInspectorLogic'
import { InspectorSearchInfo } from './components/InspectorSearchInfo'

const TabToIcon = {
[SessionRecordingPlayerTab.ALL]: undefined,
Expand Down Expand Up @@ -88,6 +88,11 @@ export function PlayerInspectorControls(): JSX.Element {
type="search"
value={searchQuery}
fullWidth
suffix={
<Tooltip title={<InspectorSearchInfo />}>
<IconInfo />
</Tooltip>
}
/>
</div>
{windowIds.length > 1 ? (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
export function InspectorSearchInfo(): JSX.Element {
return (
<>
Searching is "fuzzy" by default meaning that it will try and match many properties that are <i>close</i> to
the search query.
<br />
<table>
<thead>
<tr>
<th>Token</th>
<th>Match type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>jscript</code>
</td>
<td>fuzzy-match</td>
<td>
Items that fuzzy match <code>jscript</code>
</td>
</tr>
<tr>
<td>
<code>=scheme</code>
</td>
<td>exact-match</td>
<td>
Items that are <code>scheme</code>
</td>
</tr>
<tr>
<td>
<code>'python</code>
</td>
<td>include-match</td>
<td>
Items that include <code>python</code>
</td>
</tr>
<tr>
<td>
<code>!ruby</code>
</td>
<td>inverse-exact-match</td>
<td>
Items that do not include <code>ruby</code>
</td>
</tr>
<tr>
<td>
<code>^java</code>
</td>
<td>prefix-exact-match</td>
<td>
Items that start with <code>java</code>
</td>
</tr>
<tr>
<td>
<code>!^earlang</code>
</td>
<td>inverse-prefix-exact-match</td>
<td>
Items that do not start with <code>earlang</code>
</td>
</tr>
<tr>
<td>
<code>.js$</code>
</td>
<td>suffix-exact-match</td>
<td>
Items that end with <code>.js</code>
</td>
</tr>
<tr>
<td>
<code>!.go$</code>
</td>
<td>inverse-suffix-exact-match</td>
<td>
Items that do not end with <code>.go</code>
</td>
</tr>
</tbody>
</table>
</>
)
}

0 comments on commit 153c75d

Please sign in to comment.