Skip to content

Commit d18a11d

Browse files
committed
mintify layout
1 parent aaf04de commit d18a11d

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

src/client/App.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useRef } from 'react'
1+
import React, { useEffect } from 'react'
22
import { Outlet, useLocation, useParams } from 'react-router-dom'
33
import { SnackbarProvider } from 'notistack'
44
import { initShibbolethPinger } from 'unfuck-spa-shibboleth-session'
@@ -69,7 +69,6 @@ const AdminLoggedInAsBanner = () => {
6969

7070
const App = () => {
7171
const theme = useTheme()
72-
const appRef = useRef<HTMLDivElement>(null)
7372
const { courseId } = useParams()
7473
const location = useLocation()
7574

@@ -95,9 +94,9 @@ const App = () => {
9594
<CssBaseline />
9695
<LocalizationProvider dateAdapter={AdapterDateFns} adapterLocale={fi}>
9796
<SnackbarProvider preventDuplicate>
98-
<Box minHeight="100vh" height="100vh" display="flex" flexDirection="column" ref={appRef}>
97+
<Box minHeight="100vh" height="100vh" display="flex" flexDirection="column">
9998
<NavBar />
100-
<Box component="main" sx={{ flex: 1 }}>
99+
<Box sx={{ flex: 1 }}>
101100
<Outlet />
102101
</Box>
103102
<Footer />

src/client/components/ChatV2/ChatV2.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ export const ChatV2 = () => {
203203
return (
204204
<Box
205205
sx={{
206-
flex: 1,
207206
display: 'flex',
208207
flexDirection: 'row',
209208
height: '100%',
@@ -228,10 +227,9 @@ export const ChatV2 = () => {
228227
<Box
229228
sx={{
230229
flex: 4,
231-
position: 'relative',
232230
display: 'flex',
231+
position: 'relative',
233232
flexDirection: 'column',
234-
height: '100%',
235233
}}
236234
>
237235
<Box
@@ -264,9 +262,11 @@ export const ChatV2 = () => {
264262
</SettingsButton>
265263
</Box>
266264

267-
<Conversation messages={messages} completion={completion} fileSearchResult={fileSearchResult} />
265+
<Box sx={{ height: '100%', display: 'flex', flexDirection: 'column', gap: 3, width: '70%', minWidth: 600, margin: 'auto', paddingBottom: '5rem' }}>
266+
<Conversation messages={messages} completion={completion} fileSearchResult={fileSearchResult} />
267+
</Box>
268268

269-
<Box sx={{ position: 'sticky', bottom: 0, backgroundColor: 'white', paddingBottom: '1.2rem' }}>
269+
<Box sx={{ position: 'sticky', bottom: 0, backgroundColor: 'white', paddingBottom: '1.5rem' }}>
270270
<ChatBox
271271
disabled={false}
272272
onSubmit={(message) => {
@@ -280,7 +280,7 @@ export const ChatV2 = () => {
280280
</Box>
281281

282282
{/* Annotations columns */}
283-
<Box sx={{ flex: 1, borderLeft: '1px solid lightgray', position: 'relative' }}>
283+
<Box sx={{ flex: 1, borderLeft: 'none', position: 'relative' }}>
284284
{ragIndex && (
285285
<Box sx={{ position: 'sticky', top: 0 }}>
286286
<CitationsBox messages={messages} fileSearchResult={fileSearchResult} />

src/client/components/ChatV2/Conversation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ const MessageItem = ({ message }: { message: Message }) => (
2121
)
2222

2323
export const Conversation = ({ messages, completion, fileSearchResult }: { messages: Message[]; completion: string; fileSearchResult: FileSearchResult }) => (
24-
<Box sx={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 3, width: '70%', minWidth: 600, margin: 'auto', paddingBottom: '5rem' }}>
24+
<>
2525
{messages.length === 0 && <ConversationSplash />}
2626
{messages.map((message, idx) => (
2727
<MessageItem key={idx} message={message} />
2828
))}
2929
{completion && <MessageItem message={{ role: 'assistant', content: completion, fileSearchResult }} />}
30-
</Box>
30+
</>
3131
)

src/client/components/ChatV2/generics/ConversationSplash.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const ConversationSplash = () => (
99
flexDirection: 'column',
1010
justifyContent: 'center',
1111
alignItems: 'center',
12-
height: '40rem',
12+
height: '100%',
1313
transition: 'opacity 0.6s, transform 0.6s',
1414
opacity: 1,
1515
transform: 'scale(1)',

0 commit comments

Comments
 (0)