Skip to content

Commit 9d1c391

Browse files
committed
layout improvements on different screen sizes
1 parent 98f3894 commit 9d1c391

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/client/components/ChatV2/ChatBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export const ChatBox = ({
274274

275275
<Typography
276276
sx={{
277-
display: { xs: 'none', lg: 'block' },
277+
display: { sm: 'none', md: 'block' },
278278
ml: 'auto',
279279
opacity: acuallyDisabled ? 0 : 1,
280280
transition: 'opacity 0.2s ease-in-out',
@@ -296,7 +296,7 @@ export const ChatBox = ({
296296
</Typography>
297297
}
298298
>
299-
<OutlineButtonBlack sx={{ display: { xs: 'block', lg: 'none' } }} onClick={() => setChatLeftSidePanelOpen(true)} id="left-panel-open">
299+
<OutlineButtonBlack sx={{ display: { sm: 'block', md: 'none' } }} onClick={() => setChatLeftSidePanelOpen(true)} id="left-panel-open">
300300
<SettingsIcon sx={{ color: 'rgba(0, 0, 0, 0.7)' }} />
301301
</OutlineButtonBlack>
302302
</Tooltip>

src/client/components/ChatV2/ChatV2.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ export const ChatV2 = () => {
378378
) : (
379379
<>
380380
<LeftMenu
381-
sx={{ display: { xs: 'none', lg: 'flex' }, position: 'fixed', top: 0 }}
381+
sx={{ display: { sm: 'none', md: 'flex' }, position: 'fixed', top: 0 }}
382382
course={course}
383383
handleReset={handleReset}
384384
user={user}
@@ -391,7 +391,7 @@ export const ChatV2 = () => {
391391
ragIndices={ragIndices}
392392
messages={messages}
393393
/>
394-
<Box width={400} /> {/* Holds space for left menu */}
394+
<Box sx={{ width: { md: 300, lg: 400 } }} /> {/* Holds space for left menu */}
395395
</>
396396
))}
397397

@@ -557,16 +557,14 @@ export const ChatV2 = () => {
557557
{!isMobile && showAnnotations && activeFileSearchResult && (
558558
<Box
559559
sx={{
560-
maxWidth: { xs: 300, md: 400 },
560+
width: { md: 300, lg: 400 },
561561
height: '100vh',
562562
display: 'flex',
563563
flexDirection: 'column',
564564
flex: 1,
565565
position: 'sticky',
566566
top: 0,
567567
borderLeft: '1px solid rgba(0,0,0,0.12)',
568-
width: 400,
569-
minWidth: 400,
570568
paddingTop: !isEmbeddedMode ? '4rem' : 0,
571569
}}
572570
>
@@ -609,8 +607,7 @@ const LeftMenu = ({
609607
sx={[
610608
{
611609
flex: 1,
612-
minWidth: 300,
613-
maxWidth: { xs: 300, md: 400 },
610+
width: { md: 300, lg: 400 },
614611
position: 'relative',
615612
height: '100vh',
616613
borderRight: '1px solid rgba(0, 0, 0, 0.12)',

0 commit comments

Comments
 (0)