user
4 mins, ago
diff --git a/app/src/components/ui/collaboration/Messages.tsx b/app/src/components/ui/collaboration/Messages.tsx
new file mode 100644
index 0000000..b0bfae4
--- /dev/null
+++ b/app/src/components/ui/collaboration/Messages.tsx
@@ -0,0 +1,80 @@
+import React, { useState } from "react";
+import { getAvatarColor } from "../../../modules/collaboration/functions/getAvatarColor";
+import { KebabIcon } from "../../icons/ExportCommonIcons";
+
+interface MessageProps {
+ val: {
+ userName: string;
+ userId: string;
+ message: string;
+ creationTime: string;
+ idEdited: boolean;
+ modifiedTime: string;
+ };
+ i: number;
+}
+
+const Messages: React.FC
= ({ val, i }) => {
+ const [isEditing, setIsEditing] = useState(false);
+ const [openOptions, setOpenOptions] = useState(false);
+ const currentUser = "1";
+ return (
+ <>
+ {isEditing ? (
+ <>
+
+ {val.userName[0]}
+
+
+
+
{val.userName}
+
{val.creationTime}
+
+ {val.userId === currentUser && (
+
+
+ {openOptions && (
+
+
+
+
+ )}
+
+ )}
+
+ >
+ ) : (
+
+ )}
+ >
+ );
+};
+
+export default Messages;
diff --git a/app/src/components/ui/collaboration/ThreadChat.tsx b/app/src/components/ui/collaboration/ThreadChat.tsx
new file mode 100644
index 0000000..c1441a2
--- /dev/null
+++ b/app/src/components/ui/collaboration/ThreadChat.tsx
@@ -0,0 +1,63 @@
+import React from "react";
+import { CloseIcon, KebabIcon } from "../../icons/ExportCommonIcons";
+import Messages from "./Messages";
+import { ExpandIcon } from "../../icons/SimulationIcons";
+
+const ThreadChat: React.FC = () => {
+ const messages = [
+ {
+ userName: "user 1",
+ userId: "1",
+ message: "hello, thread check",
+ creationTime: "2 hrs ago",
+ idEdited: true,
+ modifiedTime: "5 mins ago",
+ },
+ {
+ userName: "user 2",
+ userId: "2",
+ message: "hello, thread check",
+ creationTime: "2 hrs ago",
+ idEdited: true,
+ modifiedTime: "5 mins ago",
+ },
+ ];
+
+ return (
+
+
+
+
Comment
+
+
+
+
Mark as Unread
+
Mark as Resolved
+
Delete Thread
+
+
+
+
+
+ {messages.map((val, i) => (
+
+ ))}
+
+
+
+
+ );
+};
+
+export default ThreadChat;
diff --git a/app/src/pages/Project.tsx b/app/src/pages/Project.tsx
index 1437021..d40a831 100644
--- a/app/src/pages/Project.tsx
+++ b/app/src/pages/Project.tsx
@@ -38,7 +38,6 @@ import {useToggleStore} from "../store/useUIToggleStore";
import RegularDropDown from "../components/ui/inputs/RegularDropDown";
import VersionSaved from "../components/layout/sidebarRight/versionHisory/VersionSaved";
import SimulationPlayer from "../components/ui/simulation/simulationPlayer";
-import CommentThreads from "../components/ui/collaboration/CommentThreads";
const Project: React.FC = () => {
let navigate = useNavigate();
@@ -181,7 +180,6 @@ const Project: React.FC = () => {
>
)}
-
);
};
diff --git a/app/src/styles/scene/comments.scss b/app/src/styles/scene/comments.scss
index af3bc99..1487d7e 100644
--- a/app/src/styles/scene/comments.scss
+++ b/app/src/styles/scene/comments.scss
@@ -32,9 +32,6 @@
display: flex;
align-items: start;
flex-direction: column;
- padding-top: 0;
- height: 0;
- width: 0;
overflow: hidden;
transition: all 0.2s;
.header {
@@ -52,15 +49,22 @@
margin-top: 10px;
}
.replies {
- margin-top: 10px;
+ margin-top: 4px;
font-size: var(--font-size-small);
color: var(--input-text-color);
}
+ .header,
+ .message,
+ .replies {
+ display: none;
+ opacity: 0;
+ }
}
.expand {
min-width: 200px;
max-width: 260px;
padding: 12px;
+ padding-top: 0;
height: 100%;
}
}
@@ -68,5 +72,11 @@
.users-commented {
padding: 12px;
}
+ .header,
+ .message,
+ .replies {
+ display: flex !important;
+ opacity: 1 !important;
+ }
}
}