Skip to content

Commit ec361d2

Browse files
authored
Merge pull request #6 from balureddy003/codex/add-chat-navigation-option
Add chat navigation option
2 parents a52f96a + 57e87d6 commit ec361d2

File tree

5 files changed

+48
-7
lines changed

5 files changed

+48
-7
lines changed

src/frontend/src/App.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import React from 'react';
22
import './App.css';
33
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
4-
import { HomePage, PlanPage } from './pages';
4+
import { HomePage, PlanPage, ChatPage } from './pages';
55

66
function App() {
77
return (
88
<Router>
99
<Routes>
1010
<Route path="/" element={<HomePage />} />
1111
<Route path="/plan/:planId" element={<PlanPage />} />
12+
<Route path="/chat" element={<ChatPage />} />
1213
<Route path="*" element={<Navigate to="/" replace />} />
1314
</Routes>
1415
</Router>
1516
);
1617
}
1718

18-
export default App;
19+
export default App;

src/frontend/src/components/content/PlanPanelLeft.tsx

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@ import PanelLeft from "@/coral/components/Panels/PanelLeft";
22
import PanelLeftToolbar from "@/coral/components/Panels/PanelLeftToolbar";
33
import {
44
Body1Strong,
5-
Button,
6-
Subtitle1,
7-
Subtitle2,
85
Toast,
96
ToastBody,
107
ToastTitle,
118
Tooltip,
129
useToastController,
1310
} from "@fluentui/react-components";
1411
import {
15-
Add20Regular,
1612
ChatAdd20Regular,
13+
Chat20Regular,
1714
ErrorCircle20Regular,
1815
} from "@fluentui/react-icons";
1916
import TaskList from "./TaskList";
@@ -142,6 +139,25 @@ const PlanPanelLeft: React.FC<PlanPanelLefProps> = ({ reloadTasks,restReload })
142139
<Body1Strong>New task</Body1Strong>
143140
</div>
144141

142+
<br />
143+
<div
144+
className="tab tab-chat"
145+
onClick={() => navigate("/chat")}
146+
tabIndex={0}
147+
role="button"
148+
onKeyDown={(e) => {
149+
if (e.key === "Enter" || e.key === " ") {
150+
e.preventDefault();
151+
navigate("/chat");
152+
}
153+
}}
154+
>
155+
<div className="tab tab-chat-icon">
156+
<Chat20Regular />
157+
</div>
158+
<Body1Strong>Chat</Body1Strong>
159+
</div>
160+
145161
<br />
146162
<TaskList
147163
inProgressTasks={inProgressTasks}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from "react";
2+
import Chat from "@/components/Chat";
3+
4+
const ChatPage: React.FC = () => {
5+
return <Chat />;
6+
};
7+
8+
export default ChatPage;

src/frontend/src/pages/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export { default as HomePage } from './HomePage';
2-
export { default as PlanPage } from './PlanPage';
2+
export { default as PlanPage } from './PlanPage';
3+
export { default as ChatPage } from './ChatPage';

src/frontend/src/styles/PlanPanelLeft.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@ background: radial-gradient(circle, rgba(238, 174, 221, 1) 0%, rgba(117, 121, 23
3939
color: #2F2F4A; */
4040
}
4141

42+
.tab.tab-chat {
43+
margin: 0px 8px;
44+
}
45+
46+
.tab.tab-chat-icon {
47+
display: flex;
48+
width: 40px;
49+
height: 40px;
50+
background-color: var(--colorNeutralBackground1);
51+
justify-content: center;
52+
align-items: center;
53+
border-radius: 16px;
54+
box-sizing: border-box;
55+
}
56+
4257
/* TASKLIST */
4358

4459
.task-tab {

0 commit comments

Comments
 (0)