* feat(tracker): add support for multi tab sessions
* feat(backend): added support of multitabs
* fix(backend): added support of deprecated batch meta message to pre-decoder
* fix(backend): fixed nil meta issue for TabData messages in sink
* feat(player): add tabmanager
* feat(player): basic tabchange event support
* feat(player): pick tabstate for console panel and timeline
* fix(player): only display tabs that are created
* feat(player): connect performance, xray and events to tab state
* feat(player): merge all tabs data for overview
* feat(backend/tracker): extract tabdata into separate message from batchmeta
* fix(tracker): fix new session check
* fix(backend): remove batchmetadeprecated
* fix(backend): fix switch case
* fix(player): fix for tab message size
* feat(tracker): check for active tabs with broadcast channel
* feat(tracker): prevent multiple messages
* fix(tracker): ignore beacons from same tab, only ask if token isnt present yet, add small delay before start to wait for answer
* feat(player): support new msg struct in assist player
* fix(player): fix some livepl components for multi tab states
* feat(tracker): add option to disable multitab
* feat(tracker): add multitab to assist plugin
* feat(player): back compat for tab id
* fix(ui): fix missing list in controls
* fix(ui): optional list update
* feat(ui): fix visuals for multitab; use window focus event for tabs
* fix(tracker): fix for dying tests (added tabid to writer, refactored other tests)
* feat(ui): update LivePlayerSubHeader.tsx to support tabs
* feat(backend): added tabs support to devtools mob files
* feat(ui): connect state to current tab properly
* feat(backend): added multitab support to assits
* feat(backend): removed data check in agent message
* feat(backend): debug on
* fix(backend): fixed typo in message broadcast
* feat(backend): fixed issue in connect method
* fix(assist): fixed typo
* feat(assist): added more debug logs
* feat(assist): removed one log
* feat(assist): more logs
* feat(assist): use query.peerId
* feat(assist): more logs
* feat(assist): fixed session update
* fix(assist): fixed getSessions
* fix(assist): fixed request_control broadcast
* fix(assist): fixed typo
* fix(assist): added missed line
* fix(assist): fix typo
* feat(tracker): multitab support for assist sessions
* fix(tracker): fix dead tests (tabid prop)
* fix(tracker): fix yaml
* fix(tracker): timers issue
* fix(ui): fix ui E2E tests with magic?
* feat(assist): multitabs support for ee version
* fix(assist): added missed method import
* fix(tracker): fix fix events in assist
* feat(assist): added back compatibility for sessions without tabId
* fix(assist): apply message's top layer structure before broadcast call
* fix(assist): added random tabID for prev version
* fix(assist): added random tabID for prev version (ee)
* feat(assist): added debug logs
* fix(assist): fix typo in sessions_agents_count method
* fix(assist): fixed more typos in copy-pastes
* fix(tracker): fix restart timings
* feat(backend): added tabIDs for some events
* feat(ui): add tab change event to the user steps bar
* Revert "feat(backend): added tabIDs for some events"
This reverts commit 1467ad7f9f.
* feat(ui): revert timeline and xray to grab events from all tabs
* fix(ui): fix typo
---------
Co-authored-by: Alexander Zavorotynskiy <zavorotynskiy@pm.me>
147 lines
4.3 KiB
JavaScript
147 lines
4.3 KiB
JavaScript
import React from 'react';
|
|
import cn from 'classnames';
|
|
import { connect } from 'react-redux';
|
|
import { TextEllipsis, Icon } from 'UI';
|
|
import withToggle from 'HOCs/withToggle';
|
|
import { TYPES } from 'Types/session/event';
|
|
import Event from './Event';
|
|
import stl from './eventGroupWrapper.module.css';
|
|
import NoteEvent from './NoteEvent';
|
|
import { setEditNoteTooltip } from 'Duck/sessions';
|
|
|
|
// TODO: incapsulate toggler in LocationEvent
|
|
@withToggle('showLoadInfo', 'toggleLoadInfo')
|
|
@connect(
|
|
(state) => ({
|
|
members: state.getIn(['members', 'list']),
|
|
currentUserId: state.getIn(['user', 'account', 'id'])
|
|
}),
|
|
{ setEditNoteTooltip }
|
|
)
|
|
class EventGroupWrapper extends React.Component {
|
|
toggleLoadInfo = (e) => {
|
|
e.stopPropagation();
|
|
this.props.toggleLoadInfo();
|
|
};
|
|
|
|
componentDidUpdate(prevProps) {
|
|
if (
|
|
prevProps.showLoadInfo !== this.props.showLoadInfo ||
|
|
prevProps.query !== this.props.query ||
|
|
prevProps.event.timestamp !== this.props.event.timestamp ||
|
|
prevProps.isNote !== this.props.isNote
|
|
) {
|
|
this.props.mesureHeight();
|
|
}
|
|
}
|
|
|
|
componentDidMount() {
|
|
this.props.toggleLoadInfo(this.props.isFirst);
|
|
this.props.mesureHeight();
|
|
}
|
|
|
|
onEventClick = (e) => this.props.onEventClick(e, this.props.event);
|
|
|
|
onCheckboxClick = (e) => this.props.onCheckboxClick(e, this.props.event);
|
|
|
|
render() {
|
|
const {
|
|
event,
|
|
isLastEvent,
|
|
isLastInGroup,
|
|
isSelected,
|
|
isCurrent,
|
|
isEditing,
|
|
showSelection,
|
|
showLoadInfo,
|
|
isFirst,
|
|
presentInSearch,
|
|
isNote,
|
|
isTabChange,
|
|
filterOutNote
|
|
} = this.props;
|
|
const isLocation = event.type === TYPES.LOCATION;
|
|
|
|
const whiteBg =
|
|
(isLastInGroup && event.type !== TYPES.LOCATION) ||
|
|
(!isLastEvent && event.type !== TYPES.LOCATION);
|
|
const safeRef = String(event.referrer || '');
|
|
|
|
return (
|
|
<>
|
|
<div
|
|
className={cn(
|
|
{
|
|
[stl.last]: isLastInGroup,
|
|
[stl.first]: event.type === TYPES.LOCATION,
|
|
[stl.dashAfter]: isLastInGroup && !isLastEvent
|
|
},
|
|
isLastInGroup && '!pb-2',
|
|
event.type === TYPES.LOCATION && '!pb-2'
|
|
)}
|
|
>
|
|
{isFirst && isLocation && event.referrer && (
|
|
<TextEllipsis>
|
|
<div className={stl.referrer}>
|
|
Referrer: <span className={stl.url}>{safeRef}</span>
|
|
</div>
|
|
</TextEllipsis>
|
|
)}
|
|
{isNote ? (
|
|
<NoteEvent
|
|
note={event}
|
|
filterOutNote={filterOutNote}
|
|
onEdit={this.props.setEditNoteTooltip}
|
|
noEdit={this.props.currentUserId !== event.userId}
|
|
/>
|
|
) : isLocation ? (
|
|
<Event
|
|
extended={isFirst}
|
|
key={event.key}
|
|
event={event}
|
|
onClick={this.onEventClick}
|
|
selected={isSelected}
|
|
showLoadInfo={showLoadInfo}
|
|
toggleLoadInfo={this.toggleLoadInfo}
|
|
isCurrent={isCurrent}
|
|
presentInSearch={presentInSearch}
|
|
isLastInGroup={isLastInGroup}
|
|
whiteBg={true}
|
|
/>
|
|
) : isTabChange ? (<TabChange from={event.fromTab} to={event.toTab} />) : (
|
|
<Event
|
|
key={event.key}
|
|
event={event}
|
|
onClick={this.onEventClick}
|
|
onCheckboxClick={this.onCheckboxClick}
|
|
selected={isSelected}
|
|
isCurrent={isCurrent}
|
|
showSelection={showSelection}
|
|
overlayed={isEditing}
|
|
presentInSearch={presentInSearch}
|
|
isLastInGroup={isLastInGroup}
|
|
whiteBg={whiteBg}
|
|
/>
|
|
)}
|
|
</div>
|
|
{(isLastInGroup && !isTabChange) && <div className='border-t border-color-gray-light-shade' />}
|
|
</>
|
|
);
|
|
}
|
|
}
|
|
|
|
function TabChange({ from, to }) { return (
|
|
<div className={'text-center p-2 bg-gray-lightest w-full my-2 flex items-center gap-2 justify-center'}>
|
|
<span>Tab change:</span>
|
|
<span className={'font-semibold'}>
|
|
{from}
|
|
</span>
|
|
<Icon name={"arrow-right-short"} size={18} color={"gray-dark"}/>
|
|
<span className={'font-semibold'}>
|
|
{to}
|
|
</span>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default EventGroupWrapper;
|