Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added support for extended search in replays #18249

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
</>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ export const playerInspectorLogic = kea<playerInspectorLogicType>([
findAllMatches: true,
ignoreLocation: true,
shouldSort: false,
useExtendedSearch: true,
}),
],

Expand Down
Loading