PromucFlow_constructor/app/client/src/pages/Editor/index.tsx

272 lines
9.5 KiB
TypeScript
Raw Normal View History

2019-10-18 08:16:26 +00:00
import React, { Component } from "react";
2019-12-03 09:21:06 +00:00
import { Helmet } from "react-helmet";
import { connect } from "react-redux";
import { RouteComponentProps, withRouter } from "react-router-dom";
2021-03-08 08:24:12 +00:00
import { Spinner } from "@blueprintjs/core";
2020-12-30 07:31:20 +00:00
import { BuilderRouteParams } from "constants/routes";
2019-11-25 05:07:27 +00:00
import { AppState } from "reducers";
import MainContainer from "./MainContainer";
import { DndProvider } from "react-dnd";
import TouchBackend from "react-dnd-touch-backend";
2019-10-24 09:23:50 +00:00
import {
getCurrentApplicationId,
2020-01-24 09:54:40 +00:00
getIsEditorInitialized,
getIsEditorLoading,
2020-08-07 06:56:47 +00:00
getIsPublishingApplication,
getPublishingError,
} from "selectors/editorSelectors";
2021-03-08 08:24:12 +00:00
import { initEditor, resetEditorRequest } from "actions/initActions";
import { editorInitializer } from "utils/EditorUtils";
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";
import { getCurrentUser } from "selectors/usersSelectors";
import { User } from "constants/userConstants";
import RequestConfirmationModal from "pages/Editor/RequestConfirmationModal";
import * as Sentry from "@sentry/react";
import { getTheme, ThemeMode } from "selectors/themeSelectors";
import { ThemeProvider } from "styled-components";
import { Theme } from "constants/DefaultTheme";
2021-03-08 08:24:12 +00:00
import GlobalHotKeys from "./GlobalHotKeys";
import { handlePathUpdated } from "actions/recentEntityActions";
import AddCommentTourComponent from "comments/tour/AddCommentTourComponent";
import CommentShowCaseCarousel from "comments/CommentsShowcaseCarousel";
2021-08-18 09:40:31 +00:00
import GitSyncModal from "pages/Editor/gitSync/GitSyncModal";
import DisconnectGitModal from "pages/Editor/gitSync/DisconnectGitModal";
2021-03-08 08:24:12 +00:00
import history from "utils/history";
import { fetchPage, updateCurrentPage } from "actions/pageActions";
import { getCurrentPageId } from "selectors/editorSelectors";
import { getSearchQuery } from "utils/helpers";
import ConcurrentPageEditorToast from "comments/ConcurrentPageEditorToast";
import { getIsPageLevelSocketConnected } from "selectors/websocketSelectors";
import {
collabStartSharingPointerEvent,
collabStopSharingPointerEvent,
} from "actions/appCollabActions";
2022-01-25 13:56:52 +00:00
import { loading } from "selectors/onboardingSelectors";
import GuidedTourModal from "./GuidedTour/DeviationModal";
import { getPageLevelSocketRoomId } from "sagas/WebsocketSagas/utils";
import RepoLimitExceededErrorModal from "./gitSync/RepoLimitExceededErrorModal";
2019-08-29 11:22:09 +00:00
type EditorProps = {
2019-10-24 09:23:50 +00:00
currentApplicationId?: string;
currentApplicationName?: string;
initEditor: (applicationId: string, pageId: string, branch?: string) => void;
isPublishing: boolean;
isEditorLoading: boolean;
2020-01-24 09:54:40 +00:00
isEditorInitialized: boolean;
isEditorInitializeError: boolean;
errorPublishing: boolean;
2022-01-25 13:56:52 +00:00
loadingGuidedTour: boolean;
user?: User;
lightTheme: Theme;
2021-03-08 08:24:12 +00:00
resetEditorRequest: () => void;
Initialise comments (#3328) * Initial scaffolding for comments CRUD APIs * add actions * add assets * state management for existing comments and creating new * add ui components * add overlay comments wrapper to baseWidget * add toggle comment mode button at editor header * trigger tests * Disallow commenting as someone else * Add applicationId for comments * lint * Add overlay blacklist to prevent component interaction while adding comments * Comment thread style updates * Placeholder comment context menu * Controlled comment thread visibility for making new comments visible by default * Update comment type description * Reset input on save * Resolve comment thread button ui * fix close on esc key, dont create new comment on outside click * Submit on enter * add emoji picker * Attempt at adding a websocket server in Java * CRUD APIs for comment threads * Add API for getting all threads in application * Move types to a separate file * Initial commit for real time server (RTS) * Add script to start RTS * Fix position property * Use create comment thread API * Use add comment to thread API * Add custom cursor * Dispatch logout init on 401 errors * Allow CORS for real time connection * Add more logs to RTS * Fix construction of MongoClient * WIP: Real time comments * Enable comments * Minor updates * Read backend API base URL from environment * Escape to reset comments mode * Set popover position as auto and boundary as scroll parent * Disable warning * Added permissions for comment threads * Add resolved API for comment threads * Migration to set commenting permission on existing apps * Fix updates bringing the RTS down * Show view latest button, scroll to bottom on creating a new comment * Cleanup comment reducer * Move to typescript for RTS * Add missing server.ts and tsconfig files * Resolve / unresolve comment * Scaffold app comments * Minor fixes: comment on top of all widgets, add toggle button at viewer header * Reconnect socket on creating a new app, set connected status in store * Retry socket connection flow * Integration tests for comments with api mocks using msw * Fix circular depependency * rm file * Minor cleanup and comments * Minor refactors: move isScrolledToBottom to common hooks, decouple prevent interactions overlay from comments wrapper * Use policies when pushing updates in RTS * ENV var to set if comments are enabled * Fix: check if editor/viewer is initialised before waiting for init action * Add tests for comments reducer * Revert "ENV var to set if comments are enabled" This reverts commit 988efeaa69d378d943a387e1e73510334958adc5. * Enable comments for users with appsmith email * lint * fix * Try running a socket.io server inside backend * Update comment reducer tests * Init mentions within comments * Fix comment thread updates with email rooms * Minor fixes * Refactors / review suggestions * lint * increase cache limit for builds * Comment out tests for feature that's under development * Add Dockerfile for RTS * Fix policies missing for first comment in threads * Use draftJS for comments input with mentions support * fix fixtures * Use thread's policies when querying for threads * Update socket.io to v4 * Add support for richer body with mentions * Update comment body type to RawDraftContentState * fix stale method * Fix mentions search * Minor cleanups * Comment context menu and thread UI updates * revert: Scaffold app comments * Yarn dependencies * Delete comment using id api added * Init app comments * Add test for creating thread * Api for delete comment with id * Test comment creation response and policies * Copy comment links * Fix reset editor state * Delete valid comment testcase added * Delete comment TC : code refactor * Don't allow creating comments with an empty body * Pin comments WIP[] * Ignore dependency-reduced-pom.xml files from VCS * Cleanup of some dev-only files, for review * Delete comment * Update socket.io to v4 in RTS * Pin and resolve comment thread object added in commentThread * Pin and resolve comment thread object added in commentThread * Update comment thread API * Added creationTime and updationTime in comment thread response * Added creationTime and updationTime in comment thread response * Added human readable id to comment threads, fallback to username for null name in user document * Refactor * lint * fix test, rm duplicate selector * comment out saga used for dev * CommentThread viewed status, username fallback for getName=null, username field added in pin & resolve status * lint * trigger tests Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Abhijeet <abhi.nagarnaik@gmail.com>
2021-04-29 10:33:51 +00:00
handlePathUpdated: (location: typeof window.location) => void;
fetchPage: (pageId: string) => void;
updateCurrentPage: (pageId: string) => void;
handleBranchChange: (branch: string) => void;
currentPageId?: string;
isPageLevelSocketConnected: boolean;
collabStartSharingPointerEvent: (pageId: string) => void;
collabStopSharingPointerEvent: (pageId?: string) => void;
pageLevelSocketRoomId: string;
2020-08-07 06:56:47 +00:00
};
type Props = EditorProps & RouteComponentProps<BuilderRouteParams>;
2020-08-07 06:56:47 +00:00
class Editor extends Component<Props> {
2021-03-08 08:24:12 +00:00
unlisten: any;
public state = {
registered: false,
};
componentDidMount() {
editorInitializer().then(() => {
this.setState({ registered: true });
});
const {
location: { search },
} = this.props;
const branch = getSearchQuery(search, "branch");
2020-03-24 14:05:19 +00:00
const { applicationId, pageId } = this.props.match.params;
if (applicationId) {
this.props.initEditor(applicationId, pageId, branch);
}
Initialise comments (#3328) * Initial scaffolding for comments CRUD APIs * add actions * add assets * state management for existing comments and creating new * add ui components * add overlay comments wrapper to baseWidget * add toggle comment mode button at editor header * trigger tests * Disallow commenting as someone else * Add applicationId for comments * lint * Add overlay blacklist to prevent component interaction while adding comments * Comment thread style updates * Placeholder comment context menu * Controlled comment thread visibility for making new comments visible by default * Update comment type description * Reset input on save * Resolve comment thread button ui * fix close on esc key, dont create new comment on outside click * Submit on enter * add emoji picker * Attempt at adding a websocket server in Java * CRUD APIs for comment threads * Add API for getting all threads in application * Move types to a separate file * Initial commit for real time server (RTS) * Add script to start RTS * Fix position property * Use create comment thread API * Use add comment to thread API * Add custom cursor * Dispatch logout init on 401 errors * Allow CORS for real time connection * Add more logs to RTS * Fix construction of MongoClient * WIP: Real time comments * Enable comments * Minor updates * Read backend API base URL from environment * Escape to reset comments mode * Set popover position as auto and boundary as scroll parent * Disable warning * Added permissions for comment threads * Add resolved API for comment threads * Migration to set commenting permission on existing apps * Fix updates bringing the RTS down * Show view latest button, scroll to bottom on creating a new comment * Cleanup comment reducer * Move to typescript for RTS * Add missing server.ts and tsconfig files * Resolve / unresolve comment * Scaffold app comments * Minor fixes: comment on top of all widgets, add toggle button at viewer header * Reconnect socket on creating a new app, set connected status in store * Retry socket connection flow * Integration tests for comments with api mocks using msw * Fix circular depependency * rm file * Minor cleanup and comments * Minor refactors: move isScrolledToBottom to common hooks, decouple prevent interactions overlay from comments wrapper * Use policies when pushing updates in RTS * ENV var to set if comments are enabled * Fix: check if editor/viewer is initialised before waiting for init action * Add tests for comments reducer * Revert "ENV var to set if comments are enabled" This reverts commit 988efeaa69d378d943a387e1e73510334958adc5. * Enable comments for users with appsmith email * lint * fix * Try running a socket.io server inside backend * Update comment reducer tests * Init mentions within comments * Fix comment thread updates with email rooms * Minor fixes * Refactors / review suggestions * lint * increase cache limit for builds * Comment out tests for feature that's under development * Add Dockerfile for RTS * Fix policies missing for first comment in threads * Use draftJS for comments input with mentions support * fix fixtures * Use thread's policies when querying for threads * Update socket.io to v4 * Add support for richer body with mentions * Update comment body type to RawDraftContentState * fix stale method * Fix mentions search * Minor cleanups * Comment context menu and thread UI updates * revert: Scaffold app comments * Yarn dependencies * Delete comment using id api added * Init app comments * Add test for creating thread * Api for delete comment with id * Test comment creation response and policies * Copy comment links * Fix reset editor state * Delete valid comment testcase added * Delete comment TC : code refactor * Don't allow creating comments with an empty body * Pin comments WIP[] * Ignore dependency-reduced-pom.xml files from VCS * Cleanup of some dev-only files, for review * Delete comment * Update socket.io to v4 in RTS * Pin and resolve comment thread object added in commentThread * Pin and resolve comment thread object added in commentThread * Update comment thread API * Added creationTime and updationTime in comment thread response * Added creationTime and updationTime in comment thread response * Added human readable id to comment threads, fallback to username for null name in user document * Refactor * lint * fix test, rm duplicate selector * comment out saga used for dev * CommentThread viewed status, username fallback for getName=null, username field added in pin & resolve status * lint * trigger tests Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Abhijeet <abhi.nagarnaik@gmail.com>
2021-04-29 10:33:51 +00:00
this.props.handlePathUpdated(window.location);
2021-03-08 08:24:12 +00:00
this.unlisten = history.listen(this.handleHistoryChange);
if (this.props.isPageLevelSocketConnected && pageId) {
this.props.collabStartSharingPointerEvent(
getPageLevelSocketRoomId(pageId, branch),
);
}
}
getIsBranchUpdated(props1: Props, props2: Props) {
const {
location: { search: search1 },
} = props1;
const {
location: { search: search2 },
} = props2;
const branch1 = getSearchQuery(search1, "branch");
const branch2 = getSearchQuery(search2, "branch");
return branch1 !== branch2;
}
2020-12-30 07:31:20 +00:00
shouldComponentUpdate(nextProps: Props, nextState: { registered: boolean }) {
const isBranchUpdated = this.getIsBranchUpdated(this.props, nextProps);
return (
isBranchUpdated ||
nextProps.currentApplicationName !== this.props.currentApplicationName ||
nextProps.match?.params?.pageId !== this.props.match?.params?.pageId ||
nextProps.currentApplicationId !== this.props.currentApplicationId ||
nextProps.isEditorInitialized !== this.props.isEditorInitialized ||
nextProps.isPublishing !== this.props.isPublishing ||
nextProps.isEditorLoading !== this.props.isEditorLoading ||
nextProps.errorPublishing !== this.props.errorPublishing ||
nextProps.isEditorInitializeError !==
this.props.isEditorInitializeError ||
2022-01-25 13:56:52 +00:00
nextProps.loadingGuidedTour !== this.props.loadingGuidedTour ||
nextState.registered !== this.state.registered ||
(nextProps.isPageLevelSocketConnected &&
!this.props.isPageLevelSocketConnected)
);
}
componentDidUpdate(prevProps: Props) {
const { applicationId, pageId } = this.props.match.params || {};
const { pageId: prevPageId } = prevProps.match.params || {};
const isBranchUpdated = this.getIsBranchUpdated(this.props, prevProps);
const branch = getSearchQuery(this.props.location.search, "branch");
const prevBranch = getSearchQuery(prevProps.location.search, "branch");
const isPageIdUpdated = pageId !== prevPageId;
// to prevent re-init during connect
if (prevBranch && isBranchUpdated && applicationId) {
this.props.initEditor(applicationId, pageId, branch);
} else {
/**
* First time load is handled by init sagas
* If we don't check for `prevPageId`: fetch page is retriggered
* when redirected to the default page
*/
if (prevPageId && pageId && isPageIdUpdated) {
this.props.updateCurrentPage(pageId);
this.props.fetchPage(pageId);
}
}
if (this.props.isPageLevelSocketConnected && isPageIdUpdated) {
this.props.collabStartSharingPointerEvent(
getPageLevelSocketRoomId(pageId, branch),
);
}
}
2021-03-08 08:24:12 +00:00
componentWillUnmount() {
const { pageId } = this.props.match.params || {};
const {
location: { search },
} = this.props;
const branch = getSearchQuery(search, "branch");
2021-03-08 08:24:12 +00:00
this.props.resetEditorRequest();
if (typeof this.unlisten === "function") this.unlisten();
this.props.collabStopSharingPointerEvent(
getPageLevelSocketRoomId(pageId, branch),
);
2021-03-08 08:24:12 +00:00
}
handleHistoryChange = (location: any) => {
Initialise comments (#3328) * Initial scaffolding for comments CRUD APIs * add actions * add assets * state management for existing comments and creating new * add ui components * add overlay comments wrapper to baseWidget * add toggle comment mode button at editor header * trigger tests * Disallow commenting as someone else * Add applicationId for comments * lint * Add overlay blacklist to prevent component interaction while adding comments * Comment thread style updates * Placeholder comment context menu * Controlled comment thread visibility for making new comments visible by default * Update comment type description * Reset input on save * Resolve comment thread button ui * fix close on esc key, dont create new comment on outside click * Submit on enter * add emoji picker * Attempt at adding a websocket server in Java * CRUD APIs for comment threads * Add API for getting all threads in application * Move types to a separate file * Initial commit for real time server (RTS) * Add script to start RTS * Fix position property * Use create comment thread API * Use add comment to thread API * Add custom cursor * Dispatch logout init on 401 errors * Allow CORS for real time connection * Add more logs to RTS * Fix construction of MongoClient * WIP: Real time comments * Enable comments * Minor updates * Read backend API base URL from environment * Escape to reset comments mode * Set popover position as auto and boundary as scroll parent * Disable warning * Added permissions for comment threads * Add resolved API for comment threads * Migration to set commenting permission on existing apps * Fix updates bringing the RTS down * Show view latest button, scroll to bottom on creating a new comment * Cleanup comment reducer * Move to typescript for RTS * Add missing server.ts and tsconfig files * Resolve / unresolve comment * Scaffold app comments * Minor fixes: comment on top of all widgets, add toggle button at viewer header * Reconnect socket on creating a new app, set connected status in store * Retry socket connection flow * Integration tests for comments with api mocks using msw * Fix circular depependency * rm file * Minor cleanup and comments * Minor refactors: move isScrolledToBottom to common hooks, decouple prevent interactions overlay from comments wrapper * Use policies when pushing updates in RTS * ENV var to set if comments are enabled * Fix: check if editor/viewer is initialised before waiting for init action * Add tests for comments reducer * Revert "ENV var to set if comments are enabled" This reverts commit 988efeaa69d378d943a387e1e73510334958adc5. * Enable comments for users with appsmith email * lint * fix * Try running a socket.io server inside backend * Update comment reducer tests * Init mentions within comments * Fix comment thread updates with email rooms * Minor fixes * Refactors / review suggestions * lint * increase cache limit for builds * Comment out tests for feature that's under development * Add Dockerfile for RTS * Fix policies missing for first comment in threads * Use draftJS for comments input with mentions support * fix fixtures * Use thread's policies when querying for threads * Update socket.io to v4 * Add support for richer body with mentions * Update comment body type to RawDraftContentState * fix stale method * Fix mentions search * Minor cleanups * Comment context menu and thread UI updates * revert: Scaffold app comments * Yarn dependencies * Delete comment using id api added * Init app comments * Add test for creating thread * Api for delete comment with id * Test comment creation response and policies * Copy comment links * Fix reset editor state * Delete valid comment testcase added * Delete comment TC : code refactor * Don't allow creating comments with an empty body * Pin comments WIP[] * Ignore dependency-reduced-pom.xml files from VCS * Cleanup of some dev-only files, for review * Delete comment * Update socket.io to v4 in RTS * Pin and resolve comment thread object added in commentThread * Pin and resolve comment thread object added in commentThread * Update comment thread API * Added creationTime and updationTime in comment thread response * Added creationTime and updationTime in comment thread response * Added human readable id to comment threads, fallback to username for null name in user document * Refactor * lint * fix test, rm duplicate selector * comment out saga used for dev * CommentThread viewed status, username fallback for getName=null, username field added in pin & resolve status * lint * trigger tests Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Abhijeet <abhi.nagarnaik@gmail.com>
2021-04-29 10:33:51 +00:00
this.props.handlePathUpdated(location);
2021-03-08 08:24:12 +00:00
};
2019-08-29 11:22:09 +00:00
public render() {
2022-01-25 13:56:52 +00:00
if (
!this.props.isEditorInitialized ||
!this.state.registered ||
this.props.loadingGuidedTour
) {
return (
<CenteredWrapper style={{ height: "calc(100vh - 35px)" }}>
<Spinner />
</CenteredWrapper>
);
}
return (
<ThemeProvider theme={theme}>
<DndProvider
backend={TouchBackend}
options={{
enableMouseEvents: true,
}}
>
<div>
<Helmet>
<meta charSet="utf-8" />
<title>
{`${this.props.currentApplicationName} |`} Editor | Appsmith
</title>
</Helmet>
2021-03-08 08:24:12 +00:00
<GlobalHotKeys>
<MainContainer />
<AddCommentTourComponent />
<CommentShowCaseCarousel />
2021-08-18 09:40:31 +00:00
<GitSyncModal />
<DisconnectGitModal />
<ConcurrentPageEditorToast />
2022-01-25 13:56:52 +00:00
<GuidedTourModal />
<RepoLimitExceededErrorModal />
2021-03-08 08:24:12 +00:00
</GlobalHotKeys>
</div>
<RequestConfirmationModal />
</DndProvider>
</ThemeProvider>
);
}
}
const theme = getTheme(ThemeMode.LIGHT);
2019-10-24 09:23:50 +00:00
const mapStateToProps = (state: AppState) => ({
currentApplicationId: getCurrentApplicationId(state),
2020-08-07 06:56:47 +00:00
errorPublishing: getPublishingError(state),
isPublishing: getIsPublishingApplication(state),
isEditorLoading: getIsEditorLoading(state),
2020-01-24 09:54:40 +00:00
isEditorInitialized: getIsEditorInitialized(state),
user: getCurrentUser(state),
currentApplicationName: state.ui.applications.currentApplication?.name,
currentPageId: getCurrentPageId(state),
isPageLevelSocketConnected: getIsPageLevelSocketConnected(state),
2022-01-25 13:56:52 +00:00
loadingGuidedTour: loading(state),
2019-10-18 08:16:26 +00:00
});
2019-08-26 12:41:21 +00:00
2019-10-24 09:23:50 +00:00
const mapDispatchToProps = (dispatch: any) => {
return {
initEditor: (applicationId: string, pageId: string, branch?: string) =>
dispatch(initEditor(applicationId, pageId, branch)),
2021-03-08 08:24:12 +00:00
resetEditorRequest: () => dispatch(resetEditorRequest()),
Initialise comments (#3328) * Initial scaffolding for comments CRUD APIs * add actions * add assets * state management for existing comments and creating new * add ui components * add overlay comments wrapper to baseWidget * add toggle comment mode button at editor header * trigger tests * Disallow commenting as someone else * Add applicationId for comments * lint * Add overlay blacklist to prevent component interaction while adding comments * Comment thread style updates * Placeholder comment context menu * Controlled comment thread visibility for making new comments visible by default * Update comment type description * Reset input on save * Resolve comment thread button ui * fix close on esc key, dont create new comment on outside click * Submit on enter * add emoji picker * Attempt at adding a websocket server in Java * CRUD APIs for comment threads * Add API for getting all threads in application * Move types to a separate file * Initial commit for real time server (RTS) * Add script to start RTS * Fix position property * Use create comment thread API * Use add comment to thread API * Add custom cursor * Dispatch logout init on 401 errors * Allow CORS for real time connection * Add more logs to RTS * Fix construction of MongoClient * WIP: Real time comments * Enable comments * Minor updates * Read backend API base URL from environment * Escape to reset comments mode * Set popover position as auto and boundary as scroll parent * Disable warning * Added permissions for comment threads * Add resolved API for comment threads * Migration to set commenting permission on existing apps * Fix updates bringing the RTS down * Show view latest button, scroll to bottom on creating a new comment * Cleanup comment reducer * Move to typescript for RTS * Add missing server.ts and tsconfig files * Resolve / unresolve comment * Scaffold app comments * Minor fixes: comment on top of all widgets, add toggle button at viewer header * Reconnect socket on creating a new app, set connected status in store * Retry socket connection flow * Integration tests for comments with api mocks using msw * Fix circular depependency * rm file * Minor cleanup and comments * Minor refactors: move isScrolledToBottom to common hooks, decouple prevent interactions overlay from comments wrapper * Use policies when pushing updates in RTS * ENV var to set if comments are enabled * Fix: check if editor/viewer is initialised before waiting for init action * Add tests for comments reducer * Revert "ENV var to set if comments are enabled" This reverts commit 988efeaa69d378d943a387e1e73510334958adc5. * Enable comments for users with appsmith email * lint * fix * Try running a socket.io server inside backend * Update comment reducer tests * Init mentions within comments * Fix comment thread updates with email rooms * Minor fixes * Refactors / review suggestions * lint * increase cache limit for builds * Comment out tests for feature that's under development * Add Dockerfile for RTS * Fix policies missing for first comment in threads * Use draftJS for comments input with mentions support * fix fixtures * Use thread's policies when querying for threads * Update socket.io to v4 * Add support for richer body with mentions * Update comment body type to RawDraftContentState * fix stale method * Fix mentions search * Minor cleanups * Comment context menu and thread UI updates * revert: Scaffold app comments * Yarn dependencies * Delete comment using id api added * Init app comments * Add test for creating thread * Api for delete comment with id * Test comment creation response and policies * Copy comment links * Fix reset editor state * Delete valid comment testcase added * Delete comment TC : code refactor * Don't allow creating comments with an empty body * Pin comments WIP[] * Ignore dependency-reduced-pom.xml files from VCS * Cleanup of some dev-only files, for review * Delete comment * Update socket.io to v4 in RTS * Pin and resolve comment thread object added in commentThread * Pin and resolve comment thread object added in commentThread * Update comment thread API * Added creationTime and updationTime in comment thread response * Added creationTime and updationTime in comment thread response * Added human readable id to comment threads, fallback to username for null name in user document * Refactor * lint * fix test, rm duplicate selector * comment out saga used for dev * CommentThread viewed status, username fallback for getName=null, username field added in pin & resolve status * lint * trigger tests Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Abhijeet <abhi.nagarnaik@gmail.com>
2021-04-29 10:33:51 +00:00
handlePathUpdated: (location: typeof window.location) =>
dispatch(handlePathUpdated(location)),
fetchPage: (pageId: string) => dispatch(fetchPage(pageId)),
updateCurrentPage: (pageId: string) => dispatch(updateCurrentPage(pageId)),
collabStartSharingPointerEvent: (pageId: string) =>
dispatch(collabStartSharingPointerEvent(pageId)),
collabStopSharingPointerEvent: (pageId?: string) =>
dispatch(collabStopSharingPointerEvent(pageId)),
2019-10-24 09:23:50 +00:00
};
};
export default withRouter(
connect(mapStateToProps, mapDispatchToProps)(Sentry.withProfiler(Editor)),
);