From 586ee81a5df58bd12382fcee473ecbbf77c8eeaa Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 19 Aug 2022 12:19:29 +0200 Subject: [PATCH] change(ui) - xray - feature tooltips --- .../Session_/OverviewPanel/OverviewPanel.tsx | 9 +++++---- .../components/EventRow/EventRow.tsx | 20 +++++++++++++++---- .../FeatureSelection/FeatureSelection.tsx | 8 ++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/frontend/app/components/Session_/OverviewPanel/OverviewPanel.tsx b/frontend/app/components/Session_/OverviewPanel/OverviewPanel.tsx index 5582a713f..e8abe30a2 100644 --- a/frontend/app/components/Session_/OverviewPanel/OverviewPanel.tsx +++ b/frontend/app/components/Session_/OverviewPanel/OverviewPanel.tsx @@ -6,7 +6,7 @@ import EventRow from './components/EventRow'; import { TYPES } from 'Types/session/event'; import { connect } from 'react-redux'; import TimelineScale from './components/TimelineScale'; -import FeatureSelection from './components/FeatureSelection/FeatureSelection'; +import FeatureSelection, { HELP_MESSAGE } from './components/FeatureSelection/FeatureSelection'; import TimelinePointer from './components/TimelinePointer'; import VerticalPointerLine from './components/VerticalPointerLine'; import cn from 'classnames'; @@ -52,7 +52,7 @@ function OverviewPanel(props: Props) { return ( dataLoaded && ( - + X-RAY
@@ -62,7 +62,7 @@ function OverviewPanel(props: Props) { -
+
@@ -70,7 +70,7 @@ function OverviewPanel(props: Props) {
}> {selectedFeatures.map((feature: any, index: number) => ( -
+
} endTime={props.endTime} + message={HELP_MESSAGE[feature]} />
))} diff --git a/frontend/app/components/Session_/OverviewPanel/components/EventRow/EventRow.tsx b/frontend/app/components/Session_/OverviewPanel/components/EventRow/EventRow.tsx index 385bfda08..838dbcb04 100644 --- a/frontend/app/components/Session_/OverviewPanel/components/EventRow/EventRow.tsx +++ b/frontend/app/components/Session_/OverviewPanel/components/EventRow/EventRow.tsx @@ -1,18 +1,19 @@ import React from 'react'; import cn from 'classnames'; import { getTimelinePosition } from 'App/utils'; -import { connectPlayer } from 'App/player'; +import { Icon, Popup } from 'UI'; import PerformanceGraph from '../PerformanceGraph'; interface Props { list?: any[]; title: string; + message?: string; className?: string; endTime?: number; renderElement?: (item: any) => React.ReactNode; isGraph?: boolean; } const EventRow = React.memo((props: Props) => { - const { title, className, list = [], endTime = 0, isGraph = false } = props; + const { title, className, list = [], endTime = 0, isGraph = false, message = '' } = props; const scale = 100 / endTime; const _list = !isGraph && @@ -27,7 +28,10 @@ const EventRow = React.memo((props: Props) => { return (
-
{title}
+
+
{title}
+ +
{isGraph ? ( @@ -39,7 +43,7 @@ const EventRow = React.memo((props: Props) => {
); }) : ( -
No records captured.
+
No records captured.
) )}
@@ -48,3 +52,11 @@ const EventRow = React.memo((props: Props) => { }); export default EventRow; + +function RowInfo({ message} : any) { + return ( + + + + ) +} diff --git a/frontend/app/components/Session_/OverviewPanel/components/FeatureSelection/FeatureSelection.tsx b/frontend/app/components/Session_/OverviewPanel/components/FeatureSelection/FeatureSelection.tsx index c9bea00fd..1f1c35912 100644 --- a/frontend/app/components/Session_/OverviewPanel/components/FeatureSelection/FeatureSelection.tsx +++ b/frontend/app/components/Session_/OverviewPanel/components/FeatureSelection/FeatureSelection.tsx @@ -7,6 +7,14 @@ const EVENTS = 'EVENTS'; const CLICKRAGE = 'CLICKRAGE'; const PERFORMANCE = 'PERFORMANCE'; +export const HELP_MESSAGE: any = { + NETWORK: 'Network requests made in this session', + EVENTS: 'Visualizes the events that takes place in the DOM', + ERRORS: 'Visualizes native JS errors like Type, URI, Syntax etc.', + CLICKRAGE: 'Indicates user frustration when repeated clicks are recorded', + PERFORMANCE: 'Summary of this session’s memory, and CPU consumption on the timeline', +} + interface Props { list: any[]; updateList: any;