2021-10-19 10:26:56 +00:00
|
|
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
2021-05-20 12:03:08 +00:00
|
|
|
import styled from "styled-components";
|
|
|
|
|
import { useDispatch, useSelector } from "react-redux";
|
|
|
|
|
import TooltipComponent from "components/ads/Tooltip";
|
|
|
|
|
import TourTooltipWrapper from "components/ads/tour/TourTooltipWrapper";
|
2021-10-04 15:34:37 +00:00
|
|
|
import Pen from "remixicon-react/PencilFillIcon";
|
|
|
|
|
import Eye from "remixicon-react/EyeLineIcon";
|
2021-05-20 12:03:08 +00:00
|
|
|
import { ReactComponent as CommentModeUnread } from "assets/icons/comments/comment-mode-unread-indicator.svg";
|
|
|
|
|
import { ReactComponent as CommentMode } from "assets/icons/comments/chat.svg";
|
2021-06-11 15:01:32 +00:00
|
|
|
import { Indices } from "constants/Layers";
|
2021-05-20 12:03:08 +00:00
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
setCommentMode as setCommentModeAction,
|
|
|
|
|
fetchApplicationCommentsRequest,
|
|
|
|
|
showCommentsIntroCarousel,
|
|
|
|
|
} from "actions/commentActions";
|
|
|
|
|
import {
|
|
|
|
|
commentModeSelector,
|
2021-10-19 10:26:56 +00:00
|
|
|
getAppCommentThreads,
|
|
|
|
|
getCommentsState,
|
|
|
|
|
} from "selectors/commentsSelectors";
|
2021-05-20 12:03:08 +00:00
|
|
|
import { getCurrentUser } from "selectors/usersSelectors";
|
|
|
|
|
import { useLocation } from "react-router";
|
|
|
|
|
import history from "utils/history";
|
|
|
|
|
import { Position } from "@blueprintjs/core/lib/esm/common/position";
|
|
|
|
|
import { TourType } from "entities/Tour";
|
2021-07-16 08:31:26 +00:00
|
|
|
import useProceedToNextTourStep, {
|
|
|
|
|
useIsTourStepActive,
|
|
|
|
|
} from "utils/hooks/useProceedToNextTourStep";
|
|
|
|
|
import { ANONYMOUS_USERNAME, User } from "constants/userConstants";
|
2021-06-17 07:37:27 +00:00
|
|
|
import { AppState } from "reducers";
|
2021-08-06 09:17:56 +00:00
|
|
|
import { APP_MODE } from "entities/App";
|
2021-06-17 07:37:27 +00:00
|
|
|
|
2021-07-16 08:31:26 +00:00
|
|
|
import {
|
|
|
|
|
AUTH_LOGIN_URL,
|
|
|
|
|
matchBuilderPath,
|
|
|
|
|
matchViewerPath,
|
|
|
|
|
} from "constants/routes";
|
2021-05-20 12:03:08 +00:00
|
|
|
|
2021-07-16 08:31:26 +00:00
|
|
|
import {
|
|
|
|
|
commentsTourStepsEditModeTypes,
|
|
|
|
|
commentsTourStepsPublishedModeTypes,
|
|
|
|
|
} from "comments/tour/commentsTourSteps";
|
2021-08-23 09:25:16 +00:00
|
|
|
import AnalyticsUtil from "utils/AnalyticsUtil";
|
2021-10-19 10:26:56 +00:00
|
|
|
import { getCurrentApplicationId } from "../../selectors/editorSelectors";
|
|
|
|
|
import { getAppMode } from "../../selectors/applicationSelectors";
|
2021-07-02 06:04:36 +00:00
|
|
|
|
2021-07-15 10:56:18 +00:00
|
|
|
const ModeButton = styled.div<{
|
|
|
|
|
active: boolean;
|
|
|
|
|
showSelectedMode: boolean;
|
|
|
|
|
type: string;
|
|
|
|
|
}>`
|
2021-05-20 12:03:08 +00:00
|
|
|
position: relative;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
height: ${(props) => props.theme.smallHeaderHeight};
|
|
|
|
|
width: ${(props) => props.theme.smallHeaderHeight};
|
|
|
|
|
background: ${(props) =>
|
2021-07-15 10:56:18 +00:00
|
|
|
props.active && props.showSelectedMode
|
2021-05-20 12:03:08 +00:00
|
|
|
? props.theme.colors.comments.activeModeBackground
|
|
|
|
|
: "transparent"};
|
|
|
|
|
|
|
|
|
|
svg path {
|
2021-07-05 07:12:02 +00:00
|
|
|
fill: ${(props) =>
|
|
|
|
|
props.type !== "fill"
|
|
|
|
|
? "transparent"
|
|
|
|
|
: props.active
|
|
|
|
|
? props.theme.colors.comments.activeModeIcon
|
|
|
|
|
: props.theme.colors.comments.modeIcon};
|
|
|
|
|
stroke: ${(props) =>
|
|
|
|
|
props.type !== "stroke"
|
|
|
|
|
? "transparent"
|
|
|
|
|
: props.active
|
|
|
|
|
? props.theme.colors.comments.activeModeIcon
|
|
|
|
|
: props.theme.colors.comments.modeIcon};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
svg rect:not(:first-child) {
|
2021-05-20 12:03:08 +00:00
|
|
|
fill: ${(props) =>
|
|
|
|
|
props.active
|
|
|
|
|
? props.theme.colors.comments.activeModeIcon
|
|
|
|
|
: props.theme.colors.comments.modeIcon};
|
|
|
|
|
}
|
2021-07-05 07:12:02 +00:00
|
|
|
|
2021-05-20 12:03:08 +00:00
|
|
|
svg circle {
|
2021-07-05 07:12:02 +00:00
|
|
|
stroke: ${(props) =>
|
|
|
|
|
props.active
|
|
|
|
|
? props.theme.colors.comments.activeModeIconCircleStroke
|
|
|
|
|
: props.theme.colors.comments.modeIconCircleStroke};
|
2021-05-20 12:03:08 +00:00
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const Container = styled.div`
|
|
|
|
|
display: flex;
|
|
|
|
|
flex: 1;
|
2021-06-11 15:01:32 +00:00
|
|
|
z-index: ${Indices.Layer1};
|
2021-10-04 15:34:37 +00:00
|
|
|
margin-left: ${(props) => props.theme.spaces[5]}px;
|
2021-05-20 12:03:08 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sync comment mode in store with comment mode in URL
|
|
|
|
|
* Fetch app comments when comment mode is selected
|
|
|
|
|
*/
|
|
|
|
|
// eslint-disable-next-line
|
|
|
|
|
const useUpdateCommentMode = async (currentUser?: User) => {
|
|
|
|
|
const location = useLocation();
|
|
|
|
|
const dispatch = useDispatch();
|
|
|
|
|
const isCommentMode = useSelector(commentModeSelector);
|
|
|
|
|
const setCommentModeInStore = useCallback(
|
|
|
|
|
(updatedIsCommentMode) =>
|
|
|
|
|
dispatch(setCommentModeAction(updatedIsCommentMode)),
|
|
|
|
|
[],
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const handleLocationUpdate = async () => {
|
2021-07-16 08:31:26 +00:00
|
|
|
if (!currentUser) return;
|
|
|
|
|
|
2021-05-20 12:03:08 +00:00
|
|
|
const searchParams = new URL(window.location.href).searchParams;
|
|
|
|
|
const isCommentMode = searchParams.get("isCommentMode");
|
2021-07-26 16:44:10 +00:00
|
|
|
const updatedIsCommentMode = isCommentMode === "true";
|
2021-05-20 12:03:08 +00:00
|
|
|
|
2021-07-16 08:31:26 +00:00
|
|
|
const notLoggedId = currentUser?.username === ANONYMOUS_USERNAME;
|
|
|
|
|
|
|
|
|
|
if (notLoggedId && updatedIsCommentMode) {
|
|
|
|
|
const currentUrl = window.location.href;
|
|
|
|
|
const path = `${AUTH_LOGIN_URL}?redirectUrl=${encodeURIComponent(
|
|
|
|
|
currentUrl,
|
|
|
|
|
)}`;
|
|
|
|
|
history.push(path);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-01 16:25:55 +00:00
|
|
|
if (updatedIsCommentMode && !currentUser?.commentOnboardingState) {
|
2021-08-23 09:25:16 +00:00
|
|
|
AnalyticsUtil.logEvent("COMMENTS_ONBOARDING_MODAL_TRIGGERED");
|
2021-05-20 12:03:08 +00:00
|
|
|
dispatch(showCommentsIntroCarousel());
|
2021-08-02 07:27:20 +00:00
|
|
|
setCommentModeInUrl(false);
|
2021-05-20 12:03:08 +00:00
|
|
|
} else {
|
|
|
|
|
setCommentModeInStore(updatedIsCommentMode);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// sync comment mode in store with comment mode in URL
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (window.location.href) {
|
|
|
|
|
handleLocationUpdate();
|
|
|
|
|
}
|
2021-07-16 08:31:26 +00:00
|
|
|
}, [location, !!currentUser]);
|
2021-05-20 12:03:08 +00:00
|
|
|
|
|
|
|
|
// fetch applications comments when comment mode is turned on
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (isCommentMode) {
|
|
|
|
|
dispatch(fetchApplicationCommentsRequest());
|
|
|
|
|
}
|
|
|
|
|
}, [isCommentMode]);
|
2021-10-19 10:26:56 +00:00
|
|
|
|
|
|
|
|
// Need to fetch the comments on app edit for the first time.
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
dispatch(fetchApplicationCommentsRequest());
|
|
|
|
|
}, []);
|
2021-05-20 12:03:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const setCommentModeInUrl = (isCommentMode: boolean) => {
|
|
|
|
|
const currentURL = new URL(window.location.href);
|
|
|
|
|
const searchParams = currentURL.searchParams;
|
|
|
|
|
searchParams.set("isCommentMode", `${isCommentMode}`);
|
|
|
|
|
// remove comment link params so that they don't get retriggered
|
|
|
|
|
// on toggling comment mode
|
|
|
|
|
searchParams.delete("commentId");
|
|
|
|
|
searchParams.delete("commentThreadId");
|
|
|
|
|
history.replace({
|
|
|
|
|
pathname: currentURL.pathname,
|
|
|
|
|
search: searchParams.toString(),
|
|
|
|
|
hash: currentURL.hash,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2021-06-17 07:37:27 +00:00
|
|
|
function EditModeReset() {
|
|
|
|
|
return (
|
|
|
|
|
<TooltipComponent
|
|
|
|
|
content={
|
|
|
|
|
<>
|
|
|
|
|
Edit Mode
|
|
|
|
|
<span style={{ color: "#fff", marginLeft: 20 }}>V</span>
|
|
|
|
|
</>
|
|
|
|
|
}
|
|
|
|
|
hoverOpenDelay={1000}
|
|
|
|
|
position={Position.BOTTOM}
|
|
|
|
|
>
|
2021-10-04 15:34:37 +00:00
|
|
|
<Pen size={20} />
|
2021-06-17 07:37:27 +00:00
|
|
|
</TooltipComponent>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ViewModeReset() {
|
|
|
|
|
return (
|
|
|
|
|
<TooltipComponent
|
|
|
|
|
content={
|
|
|
|
|
<>
|
|
|
|
|
View Mode
|
|
|
|
|
<span style={{ color: "#fff", marginLeft: 20 }}>V</span>
|
|
|
|
|
</>
|
|
|
|
|
}
|
|
|
|
|
hoverOpenDelay={1000}
|
|
|
|
|
position={Position.BOTTOM}
|
|
|
|
|
>
|
2021-10-04 15:34:37 +00:00
|
|
|
<Eye size={20} />
|
2021-06-17 07:37:27 +00:00
|
|
|
</TooltipComponent>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-02 06:04:36 +00:00
|
|
|
const tourToolTipProps = {
|
|
|
|
|
hasOverlay: true,
|
|
|
|
|
modifiers: {
|
|
|
|
|
offset: { enabled: true, offset: "3, 20" },
|
|
|
|
|
arrow: {
|
|
|
|
|
enabled: true,
|
|
|
|
|
fn: (data: any) => ({
|
|
|
|
|
...data,
|
|
|
|
|
offsets: {
|
|
|
|
|
...data.offsets,
|
|
|
|
|
arrow: {
|
|
|
|
|
top: -8,
|
|
|
|
|
left: 80,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
pulseStyles: {
|
|
|
|
|
top: 20,
|
|
|
|
|
left: 28,
|
|
|
|
|
height: 30,
|
|
|
|
|
width: 30,
|
|
|
|
|
},
|
|
|
|
|
showPulse: true,
|
2021-07-16 08:31:26 +00:00
|
|
|
activeStepConfig: {
|
|
|
|
|
[TourType.COMMENTS_TOUR_EDIT_MODE]:
|
|
|
|
|
commentsTourStepsEditModeTypes.ENTER_COMMENTS_MODE,
|
|
|
|
|
[TourType.COMMENTS_TOUR_PUBLISHED_MODE]:
|
|
|
|
|
commentsTourStepsPublishedModeTypes.ENTER_COMMENTS_MODE,
|
|
|
|
|
},
|
2021-07-02 06:04:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function ViewOrEditMode({ mode }: { mode?: APP_MODE }) {
|
|
|
|
|
return mode === APP_MODE.EDIT ? <EditModeReset /> : <ViewModeReset />;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function CommentModeBtn({
|
|
|
|
|
handleSetCommentModeButton,
|
|
|
|
|
isCommentMode,
|
2021-07-15 10:56:18 +00:00
|
|
|
showSelectedMode,
|
2021-07-02 06:04:36 +00:00
|
|
|
showUnreadIndicator,
|
|
|
|
|
}: {
|
|
|
|
|
handleSetCommentModeButton: () => void;
|
|
|
|
|
isCommentMode: boolean;
|
|
|
|
|
showUnreadIndicator: boolean;
|
2021-07-15 10:56:18 +00:00
|
|
|
showSelectedMode: boolean;
|
2021-07-02 06:04:36 +00:00
|
|
|
}) {
|
|
|
|
|
const CommentModeIcon = showUnreadIndicator ? CommentModeUnread : CommentMode;
|
2021-08-06 09:17:02 +00:00
|
|
|
const commentModeClassName = showUnreadIndicator
|
|
|
|
|
? `t--toggle-comment-mode-on--unread`
|
|
|
|
|
: `t--toggle-comment-mode-on`;
|
2021-07-02 06:04:36 +00:00
|
|
|
|
|
|
|
|
return (
|
2021-07-05 07:12:02 +00:00
|
|
|
<ModeButton
|
|
|
|
|
active={isCommentMode}
|
2021-08-06 09:17:02 +00:00
|
|
|
className={`t--switch-comment-mode-on ${commentModeClassName}`}
|
2021-07-05 07:12:02 +00:00
|
|
|
onClick={handleSetCommentModeButton}
|
2021-07-15 10:56:18 +00:00
|
|
|
showSelectedMode={showSelectedMode}
|
2021-07-05 07:12:02 +00:00
|
|
|
type="stroke"
|
|
|
|
|
>
|
2021-07-02 06:04:36 +00:00
|
|
|
<TooltipComponent
|
|
|
|
|
content={
|
|
|
|
|
<>
|
|
|
|
|
Comment Mode
|
|
|
|
|
<span style={{ color: "#fff", marginLeft: 20 }}>C</span>
|
|
|
|
|
</>
|
|
|
|
|
}
|
|
|
|
|
hoverOpenDelay={1000}
|
|
|
|
|
position={Position.BOTTOM}
|
|
|
|
|
>
|
|
|
|
|
<CommentModeIcon />
|
|
|
|
|
</TooltipComponent>
|
|
|
|
|
</ModeButton>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-04 10:53:04 +00:00
|
|
|
export const useHideComments = () => {
|
2021-07-16 08:31:26 +00:00
|
|
|
const [shouldHide, setShouldHide] = useState(false);
|
|
|
|
|
const location = useLocation();
|
2021-09-28 09:07:12 +00:00
|
|
|
const currentUser = useSelector(getCurrentUser);
|
2021-07-16 08:31:26 +00:00
|
|
|
useEffect(() => {
|
|
|
|
|
const pathName = window.location.pathname;
|
|
|
|
|
const shouldShow = matchBuilderPath(pathName) || matchViewerPath(pathName);
|
2021-09-28 09:07:12 +00:00
|
|
|
// Disable comment mode toggle for anonymous users
|
|
|
|
|
setShouldHide(
|
|
|
|
|
!shouldShow ||
|
|
|
|
|
!currentUser ||
|
|
|
|
|
currentUser.username === ANONYMOUS_USERNAME,
|
|
|
|
|
);
|
|
|
|
|
}, [location, currentUser]);
|
2021-07-16 08:31:26 +00:00
|
|
|
|
2021-09-06 12:34:40 +00:00
|
|
|
return shouldHide;
|
2021-07-16 08:31:26 +00:00
|
|
|
};
|
|
|
|
|
|
2021-07-15 10:56:18 +00:00
|
|
|
type ToggleCommentModeButtonProps = {
|
|
|
|
|
showSelectedMode?: boolean;
|
|
|
|
|
};
|
|
|
|
|
|
2021-10-19 10:26:56 +00:00
|
|
|
export const useHasUnreadCommentThread = (applicationId: string) => {
|
|
|
|
|
const commentsState = useSelector(getCommentsState);
|
|
|
|
|
return useMemo(() => {
|
|
|
|
|
return !!getAppCommentThreads(
|
|
|
|
|
commentsState.applicationCommentThreadsByRef[applicationId],
|
|
|
|
|
).find((tId: string) => !commentsState.commentThreadsMap[tId]?.isViewed);
|
|
|
|
|
}, [commentsState]);
|
|
|
|
|
};
|
|
|
|
|
|
2021-07-15 10:56:18 +00:00
|
|
|
function ToggleCommentModeButton({
|
|
|
|
|
showSelectedMode = true,
|
|
|
|
|
}: ToggleCommentModeButtonProps) {
|
2021-05-20 12:03:08 +00:00
|
|
|
const isCommentMode = useSelector(commentModeSelector);
|
|
|
|
|
const currentUser = useSelector(getCurrentUser);
|
2021-10-19 10:26:56 +00:00
|
|
|
const appId = useSelector(getCurrentApplicationId) || "";
|
|
|
|
|
const appMode = useSelector(getAppMode);
|
|
|
|
|
const hasUnreadCommentThread = useHasUnreadCommentThread(appId);
|
2021-07-16 08:31:26 +00:00
|
|
|
|
2021-10-19 10:26:56 +00:00
|
|
|
// show comments indicator only if -
|
|
|
|
|
// 1. user hasn't completed their comments onboarding and they are in published mode or
|
|
|
|
|
// 2. There is at least one unread comment thread
|
2021-07-07 15:13:44 +00:00
|
|
|
const showUnreadIndicator =
|
2021-10-19 10:26:56 +00:00
|
|
|
hasUnreadCommentThread ||
|
|
|
|
|
(!currentUser?.commentOnboardingState &&
|
|
|
|
|
appMode === APP_MODE.PUBLISHED &&
|
|
|
|
|
currentUser?.username !== ANONYMOUS_USERNAME);
|
2021-07-07 15:13:44 +00:00
|
|
|
|
2021-05-20 12:03:08 +00:00
|
|
|
useUpdateCommentMode(currentUser);
|
2021-07-16 08:31:26 +00:00
|
|
|
|
|
|
|
|
const activeStepConfig = {
|
|
|
|
|
[TourType.COMMENTS_TOUR_EDIT_MODE]:
|
|
|
|
|
commentsTourStepsEditModeTypes.ENTER_COMMENTS_MODE,
|
|
|
|
|
[TourType.COMMENTS_TOUR_PUBLISHED_MODE]:
|
|
|
|
|
commentsTourStepsPublishedModeTypes.ENTER_COMMENTS_MODE,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const proceedToNextTourStep = useProceedToNextTourStep(activeStepConfig);
|
|
|
|
|
|
|
|
|
|
const isTourStepActive = useIsTourStepActive(activeStepConfig);
|
2021-05-20 12:03:08 +00:00
|
|
|
|
2021-06-17 07:37:27 +00:00
|
|
|
const mode = useSelector((state: AppState) => state.entities.app.mode);
|
|
|
|
|
|
2021-07-02 06:04:36 +00:00
|
|
|
const handleSetCommentModeButton = useCallback(() => {
|
2021-08-23 09:25:16 +00:00
|
|
|
AnalyticsUtil.logEvent("COMMENTS_TOGGLE_MODE", {
|
|
|
|
|
mode: "COMMENT",
|
|
|
|
|
source: "CLICK",
|
|
|
|
|
});
|
2021-07-02 06:04:36 +00:00
|
|
|
setCommentModeInUrl(true);
|
|
|
|
|
proceedToNextTourStep();
|
2021-10-19 10:26:56 +00:00
|
|
|
}, [proceedToNextTourStep]);
|
2021-07-02 06:04:36 +00:00
|
|
|
|
2021-06-17 07:37:27 +00:00
|
|
|
// Show comment mode button only on the canvas editor and viewer
|
2021-08-04 10:53:04 +00:00
|
|
|
const isHideComments = useHideComments();
|
2021-06-17 07:37:27 +00:00
|
|
|
|
2021-08-04 10:53:04 +00:00
|
|
|
if (isHideComments) return null;
|
2021-05-20 12:03:08 +00:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Container>
|
2021-07-02 06:04:36 +00:00
|
|
|
<TourTooltipWrapper {...tourToolTipProps}>
|
2021-06-11 15:01:32 +00:00
|
|
|
<div style={{ display: "flex" }}>
|
|
|
|
|
<ModeButton
|
|
|
|
|
active={!isCommentMode}
|
2021-08-06 09:17:02 +00:00
|
|
|
className="t--switch-comment-mode-off"
|
2021-08-23 09:25:16 +00:00
|
|
|
onClick={() => {
|
|
|
|
|
AnalyticsUtil.logEvent("COMMENTS_TOGGLE_MODE", {
|
|
|
|
|
mode,
|
|
|
|
|
source: "CLICK",
|
|
|
|
|
});
|
|
|
|
|
setCommentModeInUrl(false);
|
|
|
|
|
}}
|
2021-07-15 10:56:18 +00:00
|
|
|
showSelectedMode={showSelectedMode}
|
2021-07-05 07:12:02 +00:00
|
|
|
type="fill"
|
2021-06-11 15:01:32 +00:00
|
|
|
>
|
2021-07-02 06:04:36 +00:00
|
|
|
<ViewOrEditMode mode={mode} />
|
2021-06-11 15:01:32 +00:00
|
|
|
</ModeButton>
|
2021-08-13 07:29:14 +00:00
|
|
|
<CommentModeBtn
|
|
|
|
|
handleSetCommentModeButton={handleSetCommentModeButton}
|
|
|
|
|
isCommentMode={isCommentMode || isTourStepActive} // Highlight the button during the tour
|
|
|
|
|
showSelectedMode={showSelectedMode}
|
|
|
|
|
showUnreadIndicator={showUnreadIndicator}
|
|
|
|
|
/>
|
2021-06-11 15:01:32 +00:00
|
|
|
</div>
|
2021-05-20 12:03:08 +00:00
|
|
|
</TourTooltipWrapper>
|
|
|
|
|
</Container>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default ToggleCommentModeButton;
|