change(ui) - tooltip replacement
This commit is contained in:
parent
55edc0b592
commit
5effb0d1a6
30 changed files with 216 additions and 232 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import stl from './notifications.module.css';
|
import stl from './notifications.module.css';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Icon, Popup, Tooltip } from 'UI';
|
import { Icon, Tooltip } from 'UI';
|
||||||
import { fetchList, setViewed, clearAll } from 'Duck/notifications';
|
import { fetchList, setViewed, clearAll } from 'Duck/notifications';
|
||||||
import { setLastRead } from 'Duck/announcements';
|
import { setLastRead } from 'Duck/announcements';
|
||||||
import { useModal } from 'App/components/Modal';
|
import { useModal } from 'App/components/Modal';
|
||||||
|
|
@ -29,7 +29,7 @@ function Notifications(props: Props) {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return useObserver(() => (
|
return useObserver(() => (
|
||||||
<Tooltip tooltip={`Alerts`}>
|
<Tooltip title={`Alerts`}>
|
||||||
<div
|
<div
|
||||||
className={stl.button}
|
className={stl.button}
|
||||||
onClick={() => showModal(<AlertTriggersModal />, { right: true })}
|
onClick={() => showModal(<AlertTriggersModal />, { right: true })}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Popup, Button } from 'UI';
|
import { Popup, Button, Tooltip } from 'UI';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { toggleChatWindow } from 'Duck/sessions';
|
import { toggleChatWindow } from 'Duck/sessions';
|
||||||
|
|
@ -19,7 +19,6 @@ import {
|
||||||
} from 'Player/MessageDistributor/managers/AssistManager';
|
} from 'Player/MessageDistributor/managers/AssistManager';
|
||||||
import RequestLocalStream from 'Player/MessageDistributor/managers/LocalStream';
|
import RequestLocalStream from 'Player/MessageDistributor/managers/LocalStream';
|
||||||
import type { LocalStream } from 'Player/MessageDistributor/managers/LocalStream';
|
import type { LocalStream } from 'Player/MessageDistributor/managers/LocalStream';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import { confirm } from 'UI';
|
import { confirm } from 'UI';
|
||||||
import stl from './AassistActions.module.css';
|
import stl from './AassistActions.module.css';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { useStore } from 'App/mstore';
|
import { useStore } from 'App/mstore';
|
||||||
import { Button, PageTitle, Loader } from 'UI';
|
import { Button, PageTitle, Loader, Tooltip, Popover } from 'UI';
|
||||||
import { withSiteId } from 'App/routes';
|
import { withSiteId } from 'App/routes';
|
||||||
import withModal from 'App/components/Modal/withModal';
|
import withModal from 'App/components/Modal/withModal';
|
||||||
import DashboardWidgetGrid from '../DashboardWidgetGrid';
|
import DashboardWidgetGrid from '../DashboardWidgetGrid';
|
||||||
|
|
@ -15,7 +15,6 @@ import withPageTitle from 'HOCs/withPageTitle';
|
||||||
import withReport from 'App/components/hocs/withReport';
|
import withReport from 'App/components/hocs/withReport';
|
||||||
import DashboardOptions from '../DashboardOptions';
|
import DashboardOptions from '../DashboardOptions';
|
||||||
import SelectDateRange from 'Shared/SelectDateRange';
|
import SelectDateRange from 'Shared/SelectDateRange';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
import Breadcrumb from 'Shared/Breadcrumb';
|
import Breadcrumb from 'Shared/Breadcrumb';
|
||||||
import AddMetricContainer from '../DashboardWidgetGrid/AddMetricContainer';
|
import AddMetricContainer from '../DashboardWidgetGrid/AddMetricContainer';
|
||||||
import OutsideClickDetectingDiv from 'Shared/OutsideClickDetectingDiv';
|
import OutsideClickDetectingDiv from 'Shared/OutsideClickDetectingDiv';
|
||||||
|
|
@ -126,24 +125,25 @@ function DashboardView(props: Props) {
|
||||||
<PageTitle
|
<PageTitle
|
||||||
title={
|
title={
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
<Tooltip delay={100} arrow title="Double click to rename">
|
<Tooltip title="Double click to rename">
|
||||||
{dashboard?.name}
|
{dashboard?.name}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
}
|
}
|
||||||
onDoubleClick={() => onEdit(true)}
|
onDoubleClick={() => onEdit(true)}
|
||||||
className="mr-3 select-none border-b border-b-borderColor-transparent hover:border-dotted hover:border-gray-medium cursor-pointer"
|
className="mr-3 select-none border-b border-b-borderColor-transparent hover:border-dotted hover:border-gray-medium cursor-pointer"
|
||||||
actionButton={
|
actionButton={
|
||||||
<OutsideClickDetectingDiv onClickOutside={() => setShowTooltip(false)}>
|
// <OutsideClickDetectingDiv onClickOutside={() => setShowTooltip(false)}>
|
||||||
<Tooltip
|
<Popover
|
||||||
open={showTooltip}
|
// open={showTooltip}
|
||||||
interactive
|
// interactive
|
||||||
useContext
|
// useContext
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
theme="nopadding"
|
// theme="nopadding"
|
||||||
hideDelay={0}
|
// hideDelay={0}
|
||||||
duration={0}
|
// duration={0}
|
||||||
distance={20}
|
// distance={20}
|
||||||
html={
|
placement="left"
|
||||||
|
render={() => showTooltip && (
|
||||||
<div style={{ padding: 0 }}>
|
<div style={{ padding: 0 }}>
|
||||||
<AddMetricContainer
|
<AddMetricContainer
|
||||||
onAction={() => setShowTooltip(false)}
|
onAction={() => setShowTooltip(false)}
|
||||||
|
|
@ -151,13 +151,13 @@ function DashboardView(props: Props) {
|
||||||
siteId={siteId}
|
siteId={siteId}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
>
|
>
|
||||||
<Button variant="primary" onClick={() => setShowTooltip(true)}>
|
<Button variant="primary" onClick={() => setShowTooltip(true)}>
|
||||||
Add Metric
|
Add Metric
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Popover>
|
||||||
</OutsideClickDetectingDiv>
|
// </OutsideClickDetectingDiv>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Icon, Link } from 'UI';
|
import { Icon, Tooltip } from 'UI';
|
||||||
import { checkForRecent } from 'App/date';
|
import { checkForRecent } from 'App/date';
|
||||||
import { Tooltip } from 'react-tippy'
|
|
||||||
import { withRouter, RouteComponentProps } from 'react-router-dom';
|
import { withRouter, RouteComponentProps } from 'react-router-dom';
|
||||||
import { withSiteId } from 'App/routes';
|
import { withSiteId } from 'App/routes';
|
||||||
|
|
||||||
|
|
@ -24,9 +23,7 @@ function MetricTypeIcon({ type }: any) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
html={<div className="capitalize">{type}</div>}
|
title={<div className="capitalize">{type}</div>}
|
||||||
position="top"
|
|
||||||
arrow
|
|
||||||
>
|
>
|
||||||
<div className="w-9 h-9 rounded-full bg-tealx-lightest flex items-center justify-center mr-2">
|
<div className="w-9 h-9 rounded-full bg-tealx-lightest flex items-center justify-center mr-2">
|
||||||
<Icon name={getIcon()} size="16" color="tealx" />
|
<Icon name={getIcon()} size="16" color="tealx" />
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React, { useState, useRef, useEffect } from 'react';
|
import React, { useState, useRef, useEffect } from 'react';
|
||||||
import { Icon } from 'UI';
|
import { Icon, Tooltip } from 'UI';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
@ -65,7 +64,7 @@ function WidgetName(props: Props) {
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
<Tooltip delay={100} arrow title="Double click to rename" disabled={!canEdit}>
|
<Tooltip title="Double click to rename" disabled={!canEdit}>
|
||||||
<div
|
<div
|
||||||
onDoubleClick={() => setEditing(true)}
|
onDoubleClick={() => setEditing(true)}
|
||||||
className={
|
className={
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import FunnelStepText from './FunnelStepText';
|
import FunnelStepText from './FunnelStepText';
|
||||||
import { Icon, Popup } from 'UI';
|
import { Icon, Tooltip } from 'UI';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
filter: any;
|
filter: any;
|
||||||
|
|
|
||||||
|
|
@ -1,77 +1,83 @@
|
||||||
import React, { useEffect } from 'react'
|
import React, { useEffect } from 'react';
|
||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux';
|
||||||
import { setAutoplayValues } from 'Duck/sessions'
|
import { setAutoplayValues } from 'Duck/sessions';
|
||||||
import { session as sessionRoute } from 'App/routes';
|
import { session as sessionRoute } from 'App/routes';
|
||||||
import { Link, Icon, Toggler } from 'UI';
|
import { Link, Icon, Toggler, Tooltip } from 'UI';
|
||||||
import { connectPlayer } from 'Player/store';
|
import { connectPlayer } from 'Player/store';
|
||||||
import { Controls as PlayerControls } from 'Player';
|
import { Controls as PlayerControls } from 'Player';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
|
|
||||||
function Autoplay(props) {
|
function Autoplay(props) {
|
||||||
const { previousId, nextId, autoplay, disabled } = props
|
const { previousId, nextId, autoplay, disabled } = props;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
props.setAutoplayValues()
|
props.setAutoplayValues();
|
||||||
}, [])
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<div onClick={props.toggleAutoplay} className="cursor-pointer flex items-center mr-2 hover:bg-gray-light-shade rounded-md p-2">
|
<div
|
||||||
<Toggler
|
onClick={props.toggleAutoplay}
|
||||||
name="sessionsLive"
|
className="cursor-pointer flex items-center mr-2 hover:bg-gray-light-shade rounded-md p-2"
|
||||||
onChange={ props.toggleAutoplay }
|
>
|
||||||
checked={ autoplay }
|
<Toggler name="sessionsLive" onChange={props.toggleAutoplay} checked={autoplay} />
|
||||||
/>
|
|
||||||
<span className="ml-2">Auto-Play</span>
|
<span className="ml-2">Auto-Play</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Tooltip
|
<Tooltip
|
||||||
delay={0}
|
placement="bottom"
|
||||||
arrow
|
title={<div className="whitespace-nowrap">Play Previous Session</div>}
|
||||||
animation="fade"
|
|
||||||
position="bottom center"
|
|
||||||
title="Play Previous Session"
|
|
||||||
disabled={!previousId}
|
disabled={!previousId}
|
||||||
className={cn(
|
|
||||||
"p-1 bg-gray-bg group rounded-full color-gray-darkest font-medium",
|
|
||||||
previousId && 'cursor-pointer',
|
|
||||||
!disabled && nextId&& 'hover:bg-bg-blue'
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<Link to={ sessionRoute(previousId) } disabled={!previousId}>
|
<Link to={sessionRoute(previousId)} disabled={!previousId}>
|
||||||
<Icon name="prev1" className="group-hover:fill-main" color="inherit" size="16" />
|
<div
|
||||||
|
className={cn(
|
||||||
|
'p-1 bg-gray-bg group rounded-full color-gray-darkest font-medium',
|
||||||
|
previousId && 'cursor-pointer',
|
||||||
|
!disabled && nextId && 'hover:bg-bg-blue'
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Icon name="prev1" className="group-hover:fill-main" color="inherit" size="16" />
|
||||||
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<Tooltip
|
<Tooltip
|
||||||
delay={0}
|
placement="bottom"
|
||||||
arrow
|
title={<div className="whitespace-nowrap">Play Next Session</div>}
|
||||||
animation="fade"
|
|
||||||
position="bottom center"
|
|
||||||
title="Play Next Session"
|
|
||||||
disabled={!nextId}
|
disabled={!nextId}
|
||||||
className={cn(
|
|
||||||
"p-1 bg-gray-bg group ml-1 rounded-full color-gray-darkest font-medium",
|
|
||||||
nextId && 'cursor-pointer',
|
|
||||||
!disabled && nextId && 'hover:bg-bg-blue',
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<Link to={ sessionRoute(nextId) } disabled={!nextId} >
|
<Link to={sessionRoute(nextId)} disabled={!nextId}>
|
||||||
<Icon name="next1" className="group-hover:fill-main" color="inherit" size="16" />
|
<div
|
||||||
|
className={cn(
|
||||||
|
'p-1 bg-gray-bg group ml-1 rounded-full color-gray-darkest font-medium',
|
||||||
|
nextId && 'cursor-pointer',
|
||||||
|
!disabled && nextId && 'hover:bg-bg-blue'
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Icon name="next1" className="group-hover:fill-main" color="inherit" size="16" />
|
||||||
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const connectAutoplay = connect(state => ({
|
const connectAutoplay = connect(
|
||||||
previousId: state.getIn([ 'sessions', 'previousId' ]),
|
(state) => ({
|
||||||
nextId: state.getIn([ 'sessions', 'nextId' ]),
|
previousId: state.getIn(['sessions', 'previousId']),
|
||||||
}), { setAutoplayValues })
|
nextId: state.getIn(['sessions', 'nextId']),
|
||||||
|
}),
|
||||||
|
{ setAutoplayValues }
|
||||||
|
);
|
||||||
|
|
||||||
export default connectAutoplay(connectPlayer(state => ({
|
export default connectAutoplay(
|
||||||
autoplay: state.autoplay,
|
connectPlayer(
|
||||||
}), {
|
(state) => ({
|
||||||
toggleAutoplay: PlayerControls.toggleAutoplay
|
autoplay: state.autoplay,
|
||||||
})(Autoplay))
|
}),
|
||||||
|
{
|
||||||
|
toggleAutoplay: PlayerControls.toggleAutoplay,
|
||||||
|
}
|
||||||
|
)(Autoplay)
|
||||||
|
);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||||
import { useStore } from 'App/mstore';
|
import { useStore } from 'App/mstore';
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { Tooltip } from 'react-tippy';
|
import { Tooltip } from 'UI';
|
||||||
|
|
||||||
function ReportTitle() {
|
function ReportTitle() {
|
||||||
const { bugReportStore } = useStore();
|
const { bugReportStore } = useStore();
|
||||||
|
|
@ -45,7 +45,7 @@ function ReportTitle() {
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
<Tooltip delay={100} arrow title="Double click to rename">
|
<Tooltip title="Double click to rename">
|
||||||
<div
|
<div
|
||||||
onDoubleClick={toggleEdit}
|
onDoubleClick={toggleEdit}
|
||||||
className={cn(
|
className={cn(
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import SectionTitle from './SectionTitle';
|
import SectionTitle from './SectionTitle';
|
||||||
import { Icon } from 'UI'
|
import { Icon, Tooltip } from 'UI'
|
||||||
import { Tooltip } from 'react-tippy'
|
|
||||||
|
|
||||||
export default function Session({ user, sessionUrl }: { user: string, sessionUrl: string }) {
|
export default function Session({ user, sessionUrl }: { user: string, sessionUrl: string }) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Icon, ItemMenu } from 'UI';
|
import { Icon, ItemMenu, Tooltip } from 'UI';
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { Step as IStep } from '../../types';
|
import { Step as IStep } from '../../types';
|
||||||
const STEP_NAMES = { CLICKRAGE: 'Multiple click', CLICK: 'Clicked', LOCATION: 'Visited' };
|
const STEP_NAMES = { CLICKRAGE: 'Multiple click', CLICK: 'Clicked', LOCATION: 'Visited' };
|
||||||
|
|
@ -7,7 +7,6 @@ import { useStore } from 'App/mstore';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { ErrorComp, NetworkComp, NoteComp } from './SubModalItems';
|
import { ErrorComp, NetworkComp, NoteComp } from './SubModalItems';
|
||||||
import { durationFromMs } from 'App/date';
|
import { durationFromMs } from 'App/date';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
|
|
||||||
const SUBSTEP = {
|
const SUBSTEP = {
|
||||||
network: NetworkComp,
|
network: NetworkComp,
|
||||||
|
|
@ -80,7 +79,7 @@ function Step({ step, ind, isDefault }: { step: IStep; ind: number; isDefault?:
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
<Tooltip title="Delete Step">
|
<Tooltip title="Delete Step" className="whitespace-nowrap">
|
||||||
<div onClick={() => bugReportStore.removeStep(step)}>
|
<div onClick={() => bugReportStore.removeStep(step)}>
|
||||||
<Icon name="trash" size={16} className="cursor-pointer hover:fill-gray-darkest" />
|
<Icon name="trash" size={16} className="cursor-pointer hover:fill-gray-darkest" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Tooltip } from 'react-tippy'
|
import { Tooltip } from 'UI'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
pickRadius: number;
|
pickRadius: number;
|
||||||
|
|
@ -11,7 +11,7 @@ function StepRadius({ pickRadius, setRadius }: Props) {
|
||||||
<div className="w-full flex items-center gap-4">
|
<div className="w-full flex items-center gap-4">
|
||||||
<div className="border-b border-dotted border-gray-medium cursor-help">
|
<div className="border-b border-dotted border-gray-medium cursor-help">
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
<Tooltip html={<span>Closest step to the selected timestamp ± {pickRadius}.</span>}>
|
<Tooltip title={<span>Closest step to the selected timestamp ± {pickRadius}.</span>}>
|
||||||
<span>± {pickRadius}</span>
|
<span>± {pickRadius}</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,10 @@ import { countries } from 'App/constants';
|
||||||
import { useStore } from 'App/mstore';
|
import { useStore } from 'App/mstore';
|
||||||
import { browserIcon, osIcon, deviceTypeIcon } from 'App/iconNames';
|
import { browserIcon, osIcon, deviceTypeIcon } from 'App/iconNames';
|
||||||
import { formatTimeOrDate } from 'App/date';
|
import { formatTimeOrDate } from 'App/date';
|
||||||
import { Avatar, TextEllipsis, CountryFlag, Icon } from 'UI';
|
import { Avatar, TextEllipsis, CountryFlag, Icon, Tooltip } from 'UI';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { withRequest } from 'HOCs';
|
import { withRequest } from 'HOCs';
|
||||||
import SessionInfoItem from '../../SessionInfoItem';
|
import SessionInfoItem from '../../SessionInfoItem';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
import { useModal } from 'App/components/Modal';
|
import { useModal } from 'App/components/Modal';
|
||||||
import UserSessionsModal from 'Shared/UserSessionsModal';
|
import UserSessionsModal from 'Shared/UserSessionsModal';
|
||||||
|
|
||||||
|
|
@ -77,12 +76,13 @@ function UserCard({ className, request, session, width, height, similarSessions,
|
||||||
</span>
|
</span>
|
||||||
<span className="mx-1 font-bold text-xl">·</span>
|
<span className="mx-1 font-bold text-xl">·</span>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
theme="light"
|
// theme="light"
|
||||||
delay={0}
|
delay={0}
|
||||||
hideOnClick="persistent"
|
// hideOnClick="persistent"
|
||||||
arrow
|
// arrow
|
||||||
interactive
|
// interactive
|
||||||
html={
|
className="!bg-white shadow border !color-gray-dark"
|
||||||
|
title={
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<SessionInfoItem
|
<SessionInfoItem
|
||||||
comp={<CountryFlag country={userCountry} />}
|
comp={<CountryFlag country={userCountry} />}
|
||||||
|
|
@ -100,9 +100,9 @@ function UserCard({ className, request, session, width, height, similarSessions,
|
||||||
{revId && <SessionInfoItem icon="info" label="Rev ID:" value={revId} isLast />}
|
{revId && <SessionInfoItem icon="info" label="Rev ID:" value={revId} isLast />}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
position="bottom center"
|
position="bottom"
|
||||||
hoverable
|
// hoverable
|
||||||
disabled={false}
|
// disabled={false}
|
||||||
on="hover"
|
on="hover"
|
||||||
>
|
>
|
||||||
<span className="color-teal cursor-pointer">More</span>
|
<span className="color-teal cursor-pointer">More</span>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Popup, Button, Icon } from 'UI';
|
import { Icon, Popover } from 'UI';
|
||||||
import OutsideClickDetectingDiv from 'Shared/OutsideClickDetectingDiv';
|
|
||||||
import IssuesModal from './IssuesModal';
|
import IssuesModal from './IssuesModal';
|
||||||
import { fetchProjects, fetchMeta } from 'Duck/assignments';
|
import { fetchProjects, fetchMeta } from 'Duck/assignments';
|
||||||
import stl from './issues.module.css';
|
import stl from './issues.module.css';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
|
|
||||||
@connect(
|
@connect(
|
||||||
(state) => ({
|
(state) => ({
|
||||||
|
|
@ -71,32 +69,25 @@ class Issues extends React.Component {
|
||||||
return (
|
return (
|
||||||
<div className="relative h-full w-full p-3">
|
<div className="relative h-full w-full p-3">
|
||||||
<div className={stl.buttonWrapper}>
|
<div className={stl.buttonWrapper}>
|
||||||
<OutsideClickDetectingDiv onClickOutside={this.closeModal}>
|
<Popover
|
||||||
<Tooltip
|
render={({ close }) => (
|
||||||
open={this.state.showModal}
|
<div>
|
||||||
position="bottom"
|
<IssuesModal
|
||||||
interactive
|
provider={provider}
|
||||||
trigger="click"
|
sessionId={sessionId}
|
||||||
unmountHTMLWhenHide
|
closeHandler={close}
|
||||||
useContext
|
/>
|
||||||
theme="light"
|
</div>
|
||||||
arrow
|
)}
|
||||||
html={
|
>
|
||||||
<div>
|
<div
|
||||||
<IssuesModal
|
className="flex items-center"
|
||||||
provider={provider}
|
disabled={!isModalDisplayed && (metaLoading || fetchIssuesLoading || projectsLoading)}
|
||||||
sessionId={sessionId}
|
|
||||||
closeHandler={this.closeModal}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<div className="flex items-center" onClick={this.handleOpen} disabled={!isModalDisplayed && (metaLoading || fetchIssuesLoading || projectsLoading)}>
|
<Icon name={`integrations/${provider === 'jira' ? 'jira' : 'github'}`} size="16" />
|
||||||
<Icon name={ `integrations/${ provider === 'jira' ? 'jira' : 'github'}` } size="16" />
|
<span className="ml-2">Create Issue</span>
|
||||||
<span className="ml-2">Create Issue</span>
|
</div>
|
||||||
</div>
|
</Popover>
|
||||||
</Tooltip>
|
|
||||||
</OutsideClickDetectingDiv>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import {
|
||||||
import LiveTag from 'Shared/LiveTag';
|
import LiveTag from 'Shared/LiveTag';
|
||||||
import { jumpToLive } from 'Player';
|
import { jumpToLive } from 'Player';
|
||||||
|
|
||||||
import { Icon } from 'UI';
|
import { Icon, Tooltip } from 'UI';
|
||||||
import { toggleInspectorMode } from 'Player';
|
import { toggleInspectorMode } from 'Player';
|
||||||
import {
|
import {
|
||||||
fullscreenOn,
|
fullscreenOn,
|
||||||
|
|
@ -33,7 +33,6 @@ import ControlButton from './ControlButton';
|
||||||
import PlayerControls from './components/PlayerControls';
|
import PlayerControls from './components/PlayerControls';
|
||||||
|
|
||||||
import styles from './controls.module.css';
|
import styles from './controls.module.css';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
import XRayButton from 'Shared/XRayButton';
|
import XRayButton from 'Shared/XRayButton';
|
||||||
|
|
||||||
const SKIP_INTERVALS = {
|
const SKIP_INTERVALS = {
|
||||||
|
|
@ -227,11 +226,7 @@ export default class Controls extends React.Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
delay={0}
|
|
||||||
position="top"
|
|
||||||
title={label}
|
title={label}
|
||||||
interactive
|
|
||||||
hideOnClick="persistent"
|
|
||||||
className="mr-4"
|
className="mr-4"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Tooltip } from 'react-tippy';
|
import { Icon, Tooltip, Popover } from 'UI';
|
||||||
import { Icon } from 'UI';
|
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import OutsideClickDetectingDiv from 'Shared/OutsideClickDetectingDiv';
|
import OutsideClickDetectingDiv from 'Shared/OutsideClickDetectingDiv';
|
||||||
import { ReduxTime } from '../Time';
|
import { ReduxTime } from '../Time';
|
||||||
|
|
@ -49,7 +48,7 @@ function PlayerControls(props: Props) {
|
||||||
const speedRef = React.useRef(null);
|
const speedRef = React.useRef(null);
|
||||||
const arrowBackRef = React.useRef(null);
|
const arrowBackRef = React.useRef(null);
|
||||||
const arrowForwardRef = React.useRef(null);
|
const arrowForwardRef = React.useRef(null);
|
||||||
const skipRef = React.useRef<HTMLDivElement>()
|
const skipRef = React.useRef<HTMLDivElement>();
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const handleKeyboard = (e: KeyboardEvent) => {
|
const handleKeyboard = (e: KeyboardEvent) => {
|
||||||
|
|
@ -77,11 +76,12 @@ function PlayerControls(props: Props) {
|
||||||
setShowTooltip(!showTooltip);
|
setShowTooltip(!showTooltip);
|
||||||
};
|
};
|
||||||
const handleClickOutside = () => {
|
const handleClickOutside = () => {
|
||||||
setShowTooltip(false)
|
setShowTooltip(false);
|
||||||
}
|
};
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{playButton}
|
{playButton}
|
||||||
|
<div className="mx-1" />
|
||||||
{!live && (
|
{!live && (
|
||||||
<div className="flex items-center font-semibold text-center" style={{ minWidth: 85 }}>
|
<div className="flex items-center font-semibold text-center" style={{ minWidth: 85 }}>
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
|
|
@ -94,7 +94,7 @@ function PlayerControls(props: Props) {
|
||||||
|
|
||||||
<div className="rounded ml-4 bg-active-blue border border-active-blue-border flex items-stretch">
|
<div className="rounded ml-4 bg-active-blue border border-active-blue-border flex items-stretch">
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
<Tooltip title="Rewind 10s" delay={0} position="top">
|
<Tooltip title="Rewind 10s" position="top">
|
||||||
<button
|
<button
|
||||||
ref={arrowBackRef}
|
ref={arrowBackRef}
|
||||||
className="h-full hover:border-active-blue-border focus:border focus:border-blue border-borderColor-transparent"
|
className="h-full hover:border-active-blue-border focus:border focus:border-blue border-borderColor-transparent"
|
||||||
|
|
@ -109,17 +109,17 @@ function PlayerControls(props: Props) {
|
||||||
</button>
|
</button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<div className="p-1 border-l border-r bg-active-blue-border border-active-blue-border">
|
<div className="p-1 border-l border-r bg-active-blue-border border-active-blue-border">
|
||||||
<OutsideClickDetectingDiv onClickOutside={handleClickOutside}>
|
<OutsideClickDetectingDiv onClickOutside={handleClickOutside}>
|
||||||
<Tooltip
|
<Popover
|
||||||
open={showTooltip}
|
// open={showTooltip}
|
||||||
interactive
|
// interactive
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
theme="nopadding"
|
theme="nopadding"
|
||||||
animation="none"
|
animation="none"
|
||||||
duration={0}
|
duration={0}
|
||||||
className="cursor-pointer select-none"
|
className="cursor-pointer select-none"
|
||||||
distance={20}
|
distance={20}
|
||||||
html={
|
render={() => (
|
||||||
<div className="flex flex-col bg-white border border-borderColor-gray-light-shade text-figmaColors-text-primary rounded">
|
<div className="flex flex-col bg-white border border-borderColor-gray-light-shade text-figmaColors-text-primary rounded">
|
||||||
<div className="font-semibold py-2 px-4 w-full text-left">
|
<div className="font-semibold py-2 px-4 w-full text-left">
|
||||||
Jump <span className="text-disabled-text">(Secs)</span>
|
Jump <span className="text-disabled-text">(Secs)</span>
|
||||||
|
|
@ -141,19 +141,19 @@ function PlayerControls(props: Props) {
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
>
|
>
|
||||||
<div onClick={toggleTooltip} ref={skipRef}>
|
<div onClick={toggleTooltip} ref={skipRef}>
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
<Tooltip disabled={showTooltip} title="Set default skip duration">
|
<Tooltip disabled={showTooltip} title="Set default skip duration">
|
||||||
{currentInterval}s
|
{currentInterval}s
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Popover>
|
||||||
</OutsideClickDetectingDiv>
|
</OutsideClickDetectingDiv>
|
||||||
</div>
|
</div>
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
<Tooltip title="Forward 10s" delay={0} position="top">
|
<Tooltip title="Forward 10s" position="top">
|
||||||
<button
|
<button
|
||||||
ref={arrowForwardRef}
|
ref={arrowForwardRef}
|
||||||
className="h-full hover:border-active-blue-border focus:border focus:border-blue border-borderColor-transparent"
|
className="h-full hover:border-active-blue-border focus:border focus:border-blue border-borderColor-transparent"
|
||||||
|
|
@ -173,7 +173,7 @@ function PlayerControls(props: Props) {
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<div className="mx-2" />
|
<div className="mx-2" />
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
<Tooltip title="Control play back speed (↑↓)" delay={0} position="top">
|
<Tooltip title="Control play back speed (↑↓)" placement="top">
|
||||||
<button
|
<button
|
||||||
ref={speedRef}
|
ref={speedRef}
|
||||||
className={cn(styles.speedButton, 'focus:border focus:border-blue')}
|
className={cn(styles.speedButton, 'focus:border focus:border-blue')}
|
||||||
|
|
@ -185,10 +185,10 @@ function PlayerControls(props: Props) {
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<div className="mx-2" />
|
<div className="mx-2" />
|
||||||
<button
|
<button
|
||||||
className={cn(
|
className={cn(styles.skipIntervalButton, {
|
||||||
styles.skipIntervalButton,
|
[styles.withCheckIcon]: skip,
|
||||||
{ [styles.withCheckIcon]: skip, [styles.active]: skip },
|
[styles.active]: skip,
|
||||||
)}
|
})}
|
||||||
onClick={toggleSkip}
|
onClick={toggleSkip}
|
||||||
data-disabled={disabled}
|
data-disabled={disabled}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
//@ts-nocheck
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import type { MarkedTarget } from 'Player/MessageDistributor/StatedScreen/StatedScreen';
|
import type { MarkedTarget } from 'Player/MessageDistributor/StatedScreen/StatedScreen';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import stl from './Marker.module.css';
|
import stl from './Marker.module.css';
|
||||||
import { activeTarget } from 'Player';
|
import { activeTarget } from 'Player';
|
||||||
import { Tooltip } from 'react-tippy';
|
import { Tooltip } from 'UI';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
target: MarkedTarget;
|
target: MarkedTarget;
|
||||||
|
|
@ -17,23 +16,17 @@ export default function Marker({ target, active }: Props) {
|
||||||
left: `${target.boundingRect.left}px`,
|
left: `${target.boundingRect.left}px`,
|
||||||
width: `${target.boundingRect.width}px`,
|
width: `${target.boundingRect.width}px`,
|
||||||
height: `${target.boundingRect.height}px`,
|
height: `${target.boundingRect.height}px`,
|
||||||
}
|
};
|
||||||
return (
|
return (
|
||||||
<div className={cn(stl.marker, { [stl.active]: active })} style={style} onClick={() => activeTarget(target.index)}>
|
<div
|
||||||
|
className={cn(stl.marker, { [stl.active]: active })}
|
||||||
|
style={style}
|
||||||
|
onClick={() => activeTarget(target.index)}
|
||||||
|
>
|
||||||
<div className={stl.index}>{target.index + 1}</div>
|
<div className={stl.index}>{target.index + 1}</div>
|
||||||
{/* @ts-expect-error Tooltip doesn't have children property */}
|
<Tooltip open={active} delay={0} title={<div>{target.count} Clicks</div>}>
|
||||||
<Tooltip
|
|
||||||
open={active}
|
|
||||||
arrow
|
|
||||||
sticky
|
|
||||||
distance={15}
|
|
||||||
html={(
|
|
||||||
<div>{target.count} Clicks</div>
|
|
||||||
)}
|
|
||||||
trigger="mouseenter"
|
|
||||||
>
|
|
||||||
<div className="absolute inset-0"></div>
|
<div className="absolute inset-0"></div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ interface Props {
|
||||||
export default function SessionInfoItem(props: Props) {
|
export default function SessionInfoItem(props: Props) {
|
||||||
const { label, icon, value, comp, isLast = false } = props
|
const { label, icon, value, comp, isLast = false } = props
|
||||||
return (
|
return (
|
||||||
<div className={cn("flex items-center w-full py-2", {'border-b' : !isLast})}>
|
<div className={cn("flex items-center w-full py-2 color-gray-dark", {'border-b' : !isLast})}>
|
||||||
<div className="px-2 capitalize" style={{ width: '30px' }}>
|
<div className="px-2 capitalize" style={{ width: '30px' }}>
|
||||||
{ icon && <Icon name={icon} size="16" /> }
|
{ icon && <Icon name={icon} size="16" /> }
|
||||||
{ comp && comp }
|
{ comp && comp }
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import {
|
||||||
selectStorageListNow,
|
selectStorageListNow,
|
||||||
selectStorageList,
|
selectStorageList,
|
||||||
} from 'Player/store';
|
} from 'Player/store';
|
||||||
import { JSONTree, NoContent } from 'UI';
|
import { JSONTree, NoContent, Tooltip } from 'UI';
|
||||||
import { formatMs } from 'App/date';
|
import { formatMs } from 'App/date';
|
||||||
import { diff } from 'deep-diff';
|
import { diff } from 'deep-diff';
|
||||||
import { jump } from 'Player';
|
import { jump } from 'Player';
|
||||||
|
|
@ -17,7 +17,6 @@ import BottomBlock from '../BottomBlock/index';
|
||||||
import DiffRow from './DiffRow';
|
import DiffRow from './DiffRow';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import stl from './storage.module.css';
|
import stl from './storage.module.css';
|
||||||
import { Tooltip } from 'react-tippy'
|
|
||||||
|
|
||||||
// const STATE = 'STATE';
|
// const STATE = 'STATE';
|
||||||
// const DIFF = 'DIFF';
|
// const DIFF = 'DIFF';
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Icon } from 'UI';
|
import { Icon, Tooltip } from 'UI';
|
||||||
import Autoplay from './Autoplay';
|
import Autoplay from './Autoplay';
|
||||||
import Bookmark from 'Shared/Bookmark';
|
import Bookmark from 'Shared/Bookmark';
|
||||||
import SharePopup from '../shared/SharePopup/SharePopup';
|
import SharePopup from '../shared/SharePopup/SharePopup';
|
||||||
import copy from 'copy-to-clipboard';
|
import copy from 'copy-to-clipboard';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
import Issues from './Issues/Issues';
|
import Issues from './Issues/Issues';
|
||||||
import NotePopup from './components/NotePopup';
|
import NotePopup from './components/NotePopup';
|
||||||
import { connectPlayer, pause } from 'Player';
|
import { connectPlayer, pause } from 'Player';
|
||||||
|
|
@ -46,14 +45,7 @@ function SubHeader(props) {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon size="20" name="event/link" className="mr-1" />
|
<Icon size="20" name="event/link" className="mr-1" />
|
||||||
<Tooltip
|
<Tooltip title={isCopied ? 'URL Copied to clipboard' : 'Click to copy'}>
|
||||||
delay={0}
|
|
||||||
arrow
|
|
||||||
animation="fade"
|
|
||||||
hideOnClick={false}
|
|
||||||
position="bottom center"
|
|
||||||
title={isCopied ? 'URL Copied to clipboard' : 'Click to copy'}
|
|
||||||
>
|
|
||||||
{location}
|
{location}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import copy from 'copy-to-clipboard';
|
import copy from 'copy-to-clipboard';
|
||||||
import { Tooltip } from 'react-tippy';
|
import { Tooltip } from 'UI';
|
||||||
|
|
||||||
const withCopy = (WrappedComponent: React.ComponentType) => {
|
const withCopy = (WrappedComponent: React.ComponentType) => {
|
||||||
const ComponentWithCopy = (props: any) => {
|
const ComponentWithCopy = (props: any) => {
|
||||||
|
|
@ -15,7 +15,7 @@ const withCopy = (WrappedComponent: React.ComponentType) => {
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div onClick={() => copyToClipboard(value)} className="w-fit">
|
<div onClick={() => copyToClipboard(value)} className="w-fit">
|
||||||
<Tooltip delay={0} arrow animation="fade" hideOnClick={false} title={copied ? tooltip : 'Click to copy'}>
|
<Tooltip title={copied ? tooltip : 'Click to copy'}>
|
||||||
<WrappedComponent {...props} copyToClipboard={copyToClipboard} />
|
<WrappedComponent {...props} copyToClipboard={copyToClipboard} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Tooltip } from 'react-tippy';
|
import { Tooltip } from 'UI';
|
||||||
import copy from 'copy-to-clipboard';
|
import copy from 'copy-to-clipboard';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|
@ -17,14 +17,7 @@ function CopyText(props: Props) {
|
||||||
setTimeout(() => setIsCopied(false), 5000);
|
setTimeout(() => setIsCopied(false), 5000);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
// @ts-ignore
|
<Tooltip delay={0} title={isCopied ? afterLabel : label}>
|
||||||
<Tooltip
|
|
||||||
delay={0}
|
|
||||||
arrow
|
|
||||||
animation="fade"
|
|
||||||
hideOnClick={false}
|
|
||||||
title={isCopied ? afterLabel : label}
|
|
||||||
>
|
|
||||||
<span onClick={onClick}>{children}</span>
|
<span onClick={onClick}>{children}</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Tooltip } from 'react-tippy';
|
import { Tooltip } from 'UI';
|
||||||
|
|
||||||
export const FEATURE_KEYS = {
|
export const FEATURE_KEYS = {
|
||||||
XRAY: 'featureViewed'
|
XRAY: 'featureViewed'
|
||||||
|
|
@ -16,7 +16,7 @@ export default function GuidePopup({ children, title, description }: IProps) {
|
||||||
return (
|
return (
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
<Tooltip
|
<Tooltip
|
||||||
html={
|
title={
|
||||||
<div>
|
<div>
|
||||||
<div className="font-bold">
|
<div className="font-bold">
|
||||||
{title}
|
{title}
|
||||||
|
|
@ -26,10 +26,10 @@ export default function GuidePopup({ children, title, description }: IProps) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
distance={30}
|
// distance={30}
|
||||||
theme={'light'}
|
// theme={'light'}
|
||||||
open={true}
|
open={true}
|
||||||
arrow={true}
|
// arrow={true}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { MouseEvent, useState } from 'react';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { Icon, Input } from 'UI';
|
import { Icon, Input } from 'UI';
|
||||||
import { List } from 'immutable';
|
import { List } from 'immutable';
|
||||||
import { confirm, Popup } from 'UI';
|
import { confirm, Tooltip } from 'UI';
|
||||||
import { applySavedSearch, remove, editSavedSearch } from 'Duck/search';
|
import { applySavedSearch, remove, editSavedSearch } from 'Duck/search';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { useModal } from 'App/components/Modal';
|
import { useModal } from 'App/components/Modal';
|
||||||
|
|
@ -18,9 +18,10 @@ interface ITooltipIcon {
|
||||||
function TooltipIcon(props: ITooltipIcon) {
|
function TooltipIcon(props: ITooltipIcon) {
|
||||||
return (
|
return (
|
||||||
<div onClick={(e) => props.onClick(e)}>
|
<div onClick={(e) => props.onClick(e)}>
|
||||||
<Popup content={props.title} hideOnClick={true}>
|
<Tooltip title={props.title}>
|
||||||
|
{/* @ts-ignore */}
|
||||||
<Icon size="16" name={props.name} color="main" />
|
<Icon size="16" name={props.name} color="main" />
|
||||||
</Popup>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { CountryFlag, Avatar, TextEllipsis, Label, Icon } from 'UI';
|
import { CountryFlag, Avatar, TextEllipsis, Label, Icon, Tooltip } from 'UI';
|
||||||
import { useStore } from 'App/mstore';
|
import { useStore } from 'App/mstore';
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { durationFormatted, formatTimeOrDate } from 'App/date';
|
import { durationFormatted, formatTimeOrDate } from 'App/date';
|
||||||
|
|
@ -12,7 +12,6 @@ import PlayLink from './PlayLink';
|
||||||
import ErrorBars from './ErrorBars';
|
import ErrorBars from './ErrorBars';
|
||||||
import { assist as assistRoute, liveSession, sessions as sessionsRoute, isRoute } from 'App/routes';
|
import { assist as assistRoute, liveSession, sessions as sessionsRoute, isRoute } from 'App/routes';
|
||||||
import { capitalize } from 'App/utils';
|
import { capitalize } from 'App/utils';
|
||||||
import { Tooltip } from 'react-tippy';
|
|
||||||
|
|
||||||
const ASSIST_ROUTE = assistRoute();
|
const ASSIST_ROUTE = assistRoute();
|
||||||
const ASSIST_LIVE_SESSION = liveSession();
|
const ASSIST_LIVE_SESSION = liveSession();
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import { useModal } from 'App/components/Modal';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import SessionSettings from 'Shared/SessionSettings';
|
import SessionSettings from 'Shared/SessionSettings';
|
||||||
import { Button, Tooltip } from 'UI';
|
import { Button, Tooltip } from 'UI';
|
||||||
// import { Tooltip } from 'react-tippy';
|
|
||||||
|
|
||||||
function SessionSettingButton(props: any) {
|
function SessionSettingButton(props: any) {
|
||||||
const { showModal } = useModal();
|
const { showModal } = useModal();
|
||||||
|
|
@ -13,8 +12,7 @@ function SessionSettingButton(props: any) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="cursor-pointer ml-4" onClick={handleClick}>
|
<div className="cursor-pointer ml-4" onClick={handleClick}>
|
||||||
{/* @ts-ignore */}
|
<Tooltip title="Session Settings">
|
||||||
<Tooltip tooltip="Session Settings">
|
|
||||||
<Button icon="sliders" variant="text" />
|
<Button icon="sliders" variant="text" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import stl from './xrayButton.module.css';
|
import stl from './xrayButton.module.css';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { Popup } from 'UI';
|
import { Tooltip } from 'UI';
|
||||||
import GuidePopup, { FEATURE_KEYS } from 'Shared/GuidePopup';
|
import GuidePopup, { FEATURE_KEYS } from 'Shared/GuidePopup';
|
||||||
import { Controls as Player } from 'Player';
|
import { Controls as Player } from 'Player';
|
||||||
import { INDEXES } from 'App/constants/zindex';
|
import { INDEXES } from 'App/constants/zindex';
|
||||||
|
|
@ -63,14 +63,14 @@ function XRayButton(props: Props) {
|
||||||
></div>
|
></div>
|
||||||
</GuidePopup>
|
</GuidePopup>
|
||||||
) : (
|
) : (
|
||||||
<Popup content="Get a quick overview on the issues in this session." disabled={isActive}>
|
<Tooltip title="Get a quick overview on the issues in this session." disabled={isActive}>
|
||||||
<button
|
<button
|
||||||
className={cn(stl.wrapper, { [stl.default]: !isActive, [stl.active]: isActive })}
|
className={cn(stl.wrapper, { [stl.default]: !isActive, [stl.active]: isActive })}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<span className="z-1">X-RAY</span>
|
<span className="z-1">X-RAY</span>
|
||||||
</button>
|
</button>
|
||||||
</Popup>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import {
|
||||||
FloatingFocusManager,
|
FloatingFocusManager,
|
||||||
} from '@floating-ui/react-dom-interactions';
|
} from '@floating-ui/react-dom-interactions';
|
||||||
import { mergeRefs } from 'react-merge-refs';
|
import { mergeRefs } from 'react-merge-refs';
|
||||||
|
import { INDEXES } from 'App/constants/zindex';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
render: (data: { close: () => void; labelId: string; descriptionId: string }) => React.ReactNode;
|
render: (data: { close: () => void; labelId: string; descriptionId: string }) => React.ReactNode;
|
||||||
|
|
@ -62,6 +63,7 @@ const Popover = ({ children, render, placement }: Props) => {
|
||||||
position: strategy,
|
position: strategy,
|
||||||
top: y ?? 0,
|
top: y ?? 0,
|
||||||
left: x ?? 0,
|
left: x ?? 0,
|
||||||
|
zIndex: INDEXES.TOOLTIP
|
||||||
}}
|
}}
|
||||||
aria-labelledby={labelId}
|
aria-labelledby={labelId}
|
||||||
aria-describedby={descriptionId}
|
aria-describedby={descriptionId}
|
||||||
|
|
|
||||||
|
|
@ -14,16 +14,27 @@ import {
|
||||||
FloatingPortal,
|
FloatingPortal,
|
||||||
} from '@floating-ui/react-dom-interactions';
|
} from '@floating-ui/react-dom-interactions';
|
||||||
import type { Placement } from '@floating-ui/react-dom-interactions';
|
import type { Placement } from '@floating-ui/react-dom-interactions';
|
||||||
|
import { INDEXES } from 'App/constants/zindex';
|
||||||
|
|
||||||
export function useTooltipState({
|
export function useTooltipState({
|
||||||
|
disabled = false,
|
||||||
initialOpen = false,
|
initialOpen = false,
|
||||||
placement = 'top',
|
placement = 'top',
|
||||||
|
delay,
|
||||||
}: {
|
}: {
|
||||||
|
disabled?: boolean;
|
||||||
initialOpen?: boolean;
|
initialOpen?: boolean;
|
||||||
placement?: Placement;
|
placement?: Placement;
|
||||||
|
delay?: number;
|
||||||
} = {}) {
|
} = {}) {
|
||||||
const [open, setOpen] = React.useState(initialOpen);
|
const [open, setOpen] = React.useState(initialOpen);
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (disabled) {
|
||||||
|
setOpen(false);
|
||||||
|
}
|
||||||
|
}, [disabled]);
|
||||||
|
|
||||||
const data = useFloating({
|
const data = useFloating({
|
||||||
placement,
|
placement,
|
||||||
open,
|
open,
|
||||||
|
|
@ -34,7 +45,7 @@ export function useTooltipState({
|
||||||
|
|
||||||
const context = data.context;
|
const context = data.context;
|
||||||
|
|
||||||
const hover = useHover(context, { move: false, restMs: 500 });
|
const hover = useHover(context, { move: false, restMs: delay, enabled: !disabled });
|
||||||
const focus = useFocus(context);
|
const focus = useFocus(context);
|
||||||
const dismiss = useDismiss(context);
|
const dismiss = useDismiss(context);
|
||||||
const role = useRole(context, { role: 'tooltip' });
|
const role = useRole(context, { role: 'tooltip' });
|
||||||
|
|
@ -99,6 +110,7 @@ export const FloatingTooltip = React.forwardRef<
|
||||||
left: state.x ?? 0,
|
left: state.x ?? 0,
|
||||||
visibility: state.x == null ? 'hidden' : 'visible',
|
visibility: state.x == null ? 'hidden' : 'visible',
|
||||||
transition: 'opacity 1s',
|
transition: 'opacity 1s',
|
||||||
|
zIndex: INDEXES.TOOLTIP,
|
||||||
...props.style,
|
...props.style,
|
||||||
}}
|
}}
|
||||||
{...state.getFloatingProps(props)}
|
{...state.getFloatingProps(props)}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,28 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTooltipState, TooltipAnchor, FloatingTooltip } from './FloatingTooltip';
|
import { useTooltipState, TooltipAnchor, FloatingTooltip } from './FloatingTooltip';
|
||||||
|
import type { Placement } from '@floating-ui/react-dom-interactions';
|
||||||
|
import cn from 'classnames';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
// position: string;
|
title?: any;
|
||||||
tooltip: string;
|
|
||||||
children: any;
|
children: any;
|
||||||
|
disabled?: boolean;
|
||||||
|
open?: boolean;
|
||||||
|
placement?: Placement;
|
||||||
|
className?: string;
|
||||||
|
delay?: number;
|
||||||
}
|
}
|
||||||
function Tooltip(props: Props) {
|
function Tooltip(props: Props) {
|
||||||
const state = useTooltipState();
|
const { title, disabled = false, open = false, placement, className = '', delay = 500 } = props;
|
||||||
|
const state = useTooltipState({ disabled: disabled, placement, delay });
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TooltipAnchor state={state}>{props.children}</TooltipAnchor>
|
<TooltipAnchor state={state}>{props.children}</TooltipAnchor>
|
||||||
<FloatingTooltip state={state} className="bg-gray-darkest color-white rounded py-1 px-2 animate-fade">
|
<FloatingTooltip
|
||||||
{props.tooltip}
|
state={state}
|
||||||
|
className={cn('bg-gray-darkest color-white rounded py-1 px-2 animate-fade', className)}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
</FloatingTooltip>
|
</FloatingTooltip>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,12 @@ export const INDEXES = {
|
||||||
PLAYER_REQUEST_WINDOW: 10,
|
PLAYER_REQUEST_WINDOW: 10,
|
||||||
BUG_REPORT_PICKER: 19,
|
BUG_REPORT_PICKER: 19,
|
||||||
BUG_REPORT: 20,
|
BUG_REPORT: 20,
|
||||||
POPUP_GUIDE_BG: 99998,
|
POPUP_GUIDE_BG: 99997,
|
||||||
POPUP_GUIDE_BTN: 99999,
|
POPUP_GUIDE_BTN: 99998,
|
||||||
}
|
TOOLTIP: 99999,
|
||||||
|
};
|
||||||
|
|
||||||
export const getHighest = () => {
|
export const getHighest = () => {
|
||||||
const allIndexes = Object.values(INDEXES)
|
const allIndexes = Object.values(INDEXES);
|
||||||
return allIndexes[allIndexes.length - 1] + 1
|
return allIndexes[allIndexes.length - 1] + 1;
|
||||||
}
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue