@@ -4,6 +4,7 @@ import { useRouter } from 'next/router';
4
4
import cx from 'classnames' ;
5
5
import { add , format } from 'date-fns' ;
6
6
import Fuse from 'fuse.js' ;
7
+ import { useAtomValue } from 'jotai' ;
7
8
import get from 'lodash/get' ;
8
9
import isPlainObject from 'lodash/isPlainObject' ;
9
10
import pickBy from 'lodash/pickBy' ;
@@ -45,6 +46,7 @@ import {
45
46
useShowMoreRows ,
46
47
} from './LogSidePanelElements' ;
47
48
import SearchInput from './SearchInput' ;
49
+ import { playerExpandedAtom } from './SessionSubpanel' ;
48
50
import SessionSubpanel from './SessionSubpanel' ;
49
51
import TabBar from './TabBar' ;
50
52
import TimelineChart from './TimelineChart' ;
@@ -1978,6 +1980,8 @@ function SidePanelHeader({
1978
1980
parsedProperties ?. [ 'process.tag.rum.sessionId' ] ??
1979
1981
sessionId ;
1980
1982
1983
+ const playerExpanded = useAtomValue ( playerExpandedAtom ) ;
1984
+
1981
1985
return (
1982
1986
< div >
1983
1987
< div className = { styles . panelHeader } >
@@ -2054,58 +2058,60 @@ function SidePanelHeader({
2054
2058
</ Button >
2055
2059
</ div >
2056
2060
</ div >
2057
- < div className = { styles . panelDetails } >
2058
- < div >
2059
- < div
2060
- className = "bg-hdx-dark p-3 overflow-auto"
2061
- style = { { maxHeight : 300 } }
2062
- >
2063
- { stripAnsi ( logData . body ) }
2061
+ { ! playerExpanded && (
2062
+ < div className = { styles . panelDetails } >
2063
+ < div >
2064
+ < div
2065
+ className = "bg-hdx-dark p-3 overflow-auto"
2066
+ style = { { maxHeight : 300 } }
2067
+ >
2068
+ { stripAnsi ( logData . body ) }
2069
+ </ div >
2070
+ </ div >
2071
+ < div className = "d-flex flex-wrap" >
2072
+ { logData . _service ? (
2073
+ < EventTag
2074
+ onPropertyAddClick = { onPropertyAddClick }
2075
+ generateSearchUrl = { generateSearchUrl }
2076
+ name = "service"
2077
+ value = { logData . _service }
2078
+ />
2079
+ ) : null }
2080
+ { logData . _host ? (
2081
+ < EventTag
2082
+ onPropertyAddClick = { onPropertyAddClick }
2083
+ generateSearchUrl = { generateSearchUrl }
2084
+ name = "host"
2085
+ value = { logData . _host }
2086
+ />
2087
+ ) : null }
2088
+ { userEmail ? (
2089
+ < EventTag
2090
+ onPropertyAddClick = { onPropertyAddClick }
2091
+ generateSearchUrl = { generateSearchUrl }
2092
+ name = "userEmail"
2093
+ value = { userEmail }
2094
+ />
2095
+ ) : null }
2096
+ { userName ? (
2097
+ < EventTag
2098
+ onPropertyAddClick = { onPropertyAddClick }
2099
+ generateSearchUrl = { generateSearchUrl }
2100
+ name = "userName"
2101
+ value = { userName }
2102
+ />
2103
+ ) : null }
2104
+ { teamName ? (
2105
+ < EventTag
2106
+ onPropertyAddClick = { onPropertyAddClick }
2107
+ generateSearchUrl = { generateSearchUrl }
2108
+ name = "teamName"
2109
+ value = { teamName }
2110
+ />
2111
+ ) : null }
2064
2112
</ div >
2065
2113
</ div >
2066
- < div className = "d-flex flex-wrap" >
2067
- { logData . _service ? (
2068
- < EventTag
2069
- onPropertyAddClick = { onPropertyAddClick }
2070
- generateSearchUrl = { generateSearchUrl }
2071
- name = "service"
2072
- value = { logData . _service }
2073
- />
2074
- ) : null }
2075
- { logData . _host ? (
2076
- < EventTag
2077
- onPropertyAddClick = { onPropertyAddClick }
2078
- generateSearchUrl = { generateSearchUrl }
2079
- name = "host"
2080
- value = { logData . _host }
2081
- />
2082
- ) : null }
2083
- { userEmail ? (
2084
- < EventTag
2085
- onPropertyAddClick = { onPropertyAddClick }
2086
- generateSearchUrl = { generateSearchUrl }
2087
- name = "userEmail"
2088
- value = { userEmail }
2089
- />
2090
- ) : null }
2091
- { userName ? (
2092
- < EventTag
2093
- onPropertyAddClick = { onPropertyAddClick }
2094
- generateSearchUrl = { generateSearchUrl }
2095
- name = "userName"
2096
- value = { userName }
2097
- />
2098
- ) : null }
2099
- { teamName ? (
2100
- < EventTag
2101
- onPropertyAddClick = { onPropertyAddClick }
2102
- generateSearchUrl = { generateSearchUrl }
2103
- name = "teamName"
2104
- value = { teamName }
2105
- />
2106
- ) : null }
2107
- </ div >
2108
- </ div >
2114
+ ) }
2109
2115
</ div >
2110
2116
) ;
2111
2117
}
@@ -2406,6 +2412,8 @@ export default function LogSidePanel({
2406
2412
2407
2413
const drawerZIndex = contextZIndex + 1 ;
2408
2414
2415
+ const playerExpanded = useAtomValue ( playerExpandedAtom ) ;
2416
+
2409
2417
return (
2410
2418
< Drawer
2411
2419
enableOverlay
@@ -2434,45 +2442,47 @@ export default function LogSidePanel({
2434
2442
generateSearchUrl = { generateSearchUrl }
2435
2443
onClose = { _onClose }
2436
2444
/>
2437
- < TabBar
2438
- className = "fs-8 mt-2"
2439
- items = { [
2440
- {
2441
- text : 'Parsed Properties' ,
2442
- value : 'parsed' ,
2443
- } ,
2444
- ...( logData . trace_id != ''
2445
- ? ( [
2446
- {
2447
- text : 'Trace' ,
2448
- value : 'trace' ,
2449
- } ,
2450
- ] as const )
2451
- : [ ] ) ,
2452
- {
2453
- text : 'Original Line' ,
2454
- value : 'original' ,
2455
- } ,
2456
- // {
2457
- // text: 'Surrounding Context',
2458
- // value: 'context',
2459
- // },
2460
- // {
2461
- // text: 'Debug',
2462
- // value: 'debug',
2463
- // },
2464
- ...( rumSessionId != null
2465
- ? ( [
2466
- {
2467
- text : 'Session Replay' ,
2468
- value : 'replay' ,
2469
- } ,
2470
- ] as const )
2471
- : [ ] ) ,
2472
- ] }
2473
- activeItem = { displayedTab }
2474
- onClick = { ( v : any ) => setTab ( v ) }
2475
- />
2445
+ { displayedTab === 'replay' && playerExpanded ? null : (
2446
+ < TabBar
2447
+ className = "fs-8 mt-2"
2448
+ items = { [
2449
+ {
2450
+ text : 'Parsed Properties' ,
2451
+ value : 'parsed' ,
2452
+ } ,
2453
+ ...( logData . trace_id != ''
2454
+ ? ( [
2455
+ {
2456
+ text : 'Trace' ,
2457
+ value : 'trace' ,
2458
+ } ,
2459
+ ] as const )
2460
+ : [ ] ) ,
2461
+ {
2462
+ text : 'Original Line' ,
2463
+ value : 'original' ,
2464
+ } ,
2465
+ // {
2466
+ // text: 'Surrounding Context',
2467
+ // value: 'context',
2468
+ // },
2469
+ // {
2470
+ // text: 'Debug',
2471
+ // value: 'debug',
2472
+ // },
2473
+ ...( rumSessionId != null
2474
+ ? ( [
2475
+ {
2476
+ text : 'Session Replay' ,
2477
+ value : 'replay' ,
2478
+ } ,
2479
+ ] as const )
2480
+ : [ ] ) ,
2481
+ ] }
2482
+ activeItem = { displayedTab }
2483
+ onClick = { ( v : any ) => setTab ( v ) }
2484
+ />
2485
+ ) }
2476
2486
< ErrorBoundary
2477
2487
onError = { err => {
2478
2488
console . error ( err ) ;
0 commit comments