1+ import { parseAsString , useQueryState } from 'nuqs' ;
2+
3+ import { Flex , Grid } from '@sentry/scraps/layout' ;
4+ import { Text } from '@sentry/scraps/text' ;
5+
6+ import { Alert } from 'sentry/components/core/alert' ;
17import ReplayTable from 'sentry/components/replays/table/replayTable' ;
28import {
39 ReplayBrowserColumn ,
@@ -6,6 +12,8 @@ import {
612 ReplayOSColumn ,
713 ReplaySessionColumn ,
814} from 'sentry/components/replays/table/replayTableColumns' ;
15+ import { ProvidedFormattedQuery } from 'sentry/components/searchQueryBuilder/formattedQuery' ;
16+ import { t } from 'sentry/locale' ;
917import { useReplayPlaylist } from 'sentry/utils/replays/playback/providers/replayPlaylistProvider' ;
1018import { useLocation } from 'sentry/utils/useLocation' ;
1119import useAllMobileProj from 'sentry/views/replays/detail/useAllMobileProj' ;
@@ -28,20 +36,37 @@ const MOBILE_COLUMNS = [
2836export default function Playlist ( ) {
2937 const { replays, currentReplayIndex, isLoading} = useReplayPlaylist ( ) ;
3038 const location = useLocation ( ) ;
39+ const [ query ] = useQueryState ( 'query' , parseAsString . withDefault ( '' ) ) ;
3140
3241 const { allMobileProj} = useAllMobileProj ( { } ) ;
3342 const columns = allMobileProj ? MOBILE_COLUMNS : VISIBLE_COLUMNS ;
43+ const rows = query ? 'max-content auto' : 'auto' ;
44+
3445 return (
35- < ReplayTable
36- columns = { columns }
37- error = { null }
38- highlightedRowIndex = { currentReplayIndex }
39- // we prefer isLoading since isPending is true even if not enabled
40- isPending = { isLoading }
41- query = { location . query }
42- replays = { replays }
43- showDropdownFilters = { false }
44- stickyHeader
45- />
46+ < Flex height = "100%" overflow = "auto" >
47+ < Grid gap = "md" rows = { rows } height = "100%" width = "100%" >
48+ { query ? (
49+ < Alert
50+ variant = "info"
51+ showIcon
52+ defaultExpanded
53+ expand = { < ProvidedFormattedQuery query = { query } /> }
54+ >
55+ < Text > { t ( 'This playlist is filtered by:' ) } </ Text >
56+ </ Alert >
57+ ) : null }
58+ < ReplayTable
59+ columns = { columns }
60+ error = { null }
61+ highlightedRowIndex = { currentReplayIndex }
62+ // we prefer isLoading since isPending is true even if not enabled
63+ isPending = { isLoading }
64+ query = { location . query }
65+ replays = { replays }
66+ showDropdownFilters = { false }
67+ stickyHeader
68+ />
69+ </ Grid >
70+ </ Flex >
4671 ) ;
4772}
0 commit comments