diff --git a/src/components/HypothesisBuilder/comments.js b/src/components/HypothesisBuilder/comments.js
index ca3b17da3..dc4e0cf14 100644
--- a/src/components/HypothesisBuilder/comments.js
+++ b/src/components/HypothesisBuilder/comments.js
@@ -1,8 +1,9 @@
-import { ChatAltIcon } from "@heroicons/react/solid";
-import dayjs from "dayjs";
import React, { useEffect, useState } from "react";
+import clsx from "clsx";
import { getPersons } from "../../api/services/users";
-import { CommentInput, CommentText } from "../Comment";
+import { CommentInput } from "../Comment";
+import { DefaultCommentsTimeline } from "./default-comments-timeline";
+import { TraditionalCommentsTimeline } from "./traditional-comments-timeline";
function getInitials(name) {
const matches = name.match(/\b(\w)/g);
@@ -18,6 +19,7 @@ export function CommentsSection({
const [commentTextValue, setCommentTextValue] = useState("");
const [isLoading, setIsLoading] = useState(false);
const [users, setUsers] = useState([]);
+ const [commentsView, setCommentsView] = useState("Default");
// eslint-disable-next-line no-unused-vars
const handleComment = (event) => {
@@ -69,63 +71,38 @@ export function CommentsSection({
+
+
Comments view:
+
+ {["Default", "Traditional"].map((view) => (
+
+ ))}
+
+
{comments.length <= 0 ? (
No comments yet
+ ) : commentsView === "Default" ? (
+
) : (
-
- {comments.map((comment) => (
- -
-
-
-
- {comment.imageUrl ? (
-
- ) : (
-
- {getInitials(comment.created_by.name)}
-
- )}
-
-
-
-
-
-
-
-
-
- {comment.created_by.name}
-
-
-
- commented {dayjs(comment.created_at).fromNow()}
-
-
-
-
-
-
-
- ))}
-
+
)}
);
diff --git a/src/components/HypothesisBuilder/default-comments-timeline.js b/src/components/HypothesisBuilder/default-comments-timeline.js
new file mode 100644
index 000000000..10e0708e1
--- /dev/null
+++ b/src/components/HypothesisBuilder/default-comments-timeline.js
@@ -0,0 +1,64 @@
+import { ChatAltIcon } from "@heroicons/react/solid";
+import dayjs from "dayjs";
+import { CommentText } from "../Comment";
+
+export const DefaultCommentsTimeline = ({
+ comments,
+ onClickUserTag,
+ getInitials
+}) => (
+
+ {comments.map((comment) => (
+ -
+
+
+
+ {comment.imageUrl ? (
+
+ ) : (
+
+ {getInitials(comment.created_by.name)}
+
+ )}
+
+
+
+
+
+
+
+
+
+ {comment.created_by.name}
+
+
+
+ commented {dayjs(comment.created_at).fromNow()}
+
+
+
+
+
+
+
+ ))}
+
+);
diff --git a/src/components/HypothesisBuilder/traditional-comments-timeline.js b/src/components/HypothesisBuilder/traditional-comments-timeline.js
new file mode 100644
index 000000000..ff38e6bf7
--- /dev/null
+++ b/src/components/HypothesisBuilder/traditional-comments-timeline.js
@@ -0,0 +1,61 @@
+import dayjs from "dayjs";
+import { CommentText } from "../Comment";
+
+export const TraditionalCommentsTimeline = ({
+ comments,
+ onClickUserTag,
+ getInitials
+}) => (
+
+ {comments.map((comment) => (
+ -
+
+
+
+
+ {`[${comment?.subject || "No subject"}]`}
+
+
+
+
+ {`[${comment.created_by.name}]`}
+
+
+
+ {comment.imageUrl ? (
+
+ ) : (
+
+ {getInitials(comment.created_by.name)}
+
+ )}
+
+
+
+
+ {dayjs(comment.created_at).fromNow()}
+
+
+
+
+
+ ))}
+
+);