Skip to content

Commit f285352

Browse files
committed
Add skeletal template for chat function and testcases
1 parent f982120 commit f285352

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

apps/frontend/src/app/collaboration/[id]/page.tsx

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ export default function CollaborationPage(props: CollaborationProps) {
4747
);
4848
const [matchedUser, setMatchedUser] = useState<string | undefined>(undefined);
4949

50+
// Chat states
51+
const [messageToSend, setMessageToSend] = useState<string | undefined>(
52+
undefined
53+
);
54+
5055
// Manual test case states
5156
const [manualTestCase, setManualTestCase] = useState<string | undefined>(
5257
undefined
@@ -82,12 +87,16 @@ export default function CollaborationPage(props: CollaborationProps) {
8287
{
8388
key: "1",
8489
label: "Case 1",
85-
children: "Insert Test Case 1", // TODO: Setup test-cases in db for each qn and pull/paste here
90+
children: (
91+
<Input.TextArea disabled placeholder="Insert Test Case 1" rows={6} />
92+
), // TODO: Setup test-cases in db for each qn and pull/paste here
8693
},
8794
{
8895
key: "2",
8996
label: "Case 2",
90-
children: "Insert Test Case 2",
97+
children: (
98+
<Input.TextArea disabled placeholder="Insert Test Case 2" rows={6} />
99+
),
91100
},
92101
{
93102
key: "3",
@@ -96,6 +105,7 @@ export default function CollaborationPage(props: CollaborationProps) {
96105
<Input.TextArea
97106
onChange={(e) => setManualTestCase(e.target.value)}
98107
placeholder="Input Manual Test Case"
108+
rows={6}
99109
/>
100110
),
101111
},
@@ -208,6 +218,21 @@ export default function CollaborationPage(props: CollaborationProps) {
208218
<MessageOutlined className="title-icons" />
209219
Chat
210220
</div>
221+
222+
<div className="chat-message-box">
223+
<div className="chat-header-message">
224+
Matched with {matchedUser}
225+
</div>
226+
{/* TODO: Map and input the history of messages sent here */}
227+
<div></div>
228+
</div>
229+
<div className="chat-typing-box">
230+
<Input.TextArea
231+
onChange={(e) => setMessageToSend(e.target.value)}
232+
placeholder="Send Message Here"
233+
rows={4}
234+
/>
235+
</div>
211236
</div>
212237
</Row>
213238
</Col>

apps/frontend/src/app/collaboration/[id]/styles.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,25 @@
101101
padding: 1rem;
102102
}
103103

104+
.chat-message-box {
105+
margin-top: 1rem;
106+
height: 70%;
107+
border: 1px solid #d9d9d9;
108+
border-radius: 6px;
109+
overflow-y: scroll;
110+
}
111+
112+
.chat-header-message {
113+
font-size: 14px;
114+
color: #c6c6c6;
115+
margin: 3px auto;
116+
text-align: center;
117+
}
118+
119+
.chat-typing-box {
120+
margin-top: 1rem;
121+
}
122+
104123
.question-title,
105124
.test-title,
106125
.code-title,

0 commit comments

Comments
 (0)