Skip to content

Commit

Permalink
Add default height to intelligence
Browse files Browse the repository at this point in the history
  • Loading branch information
devleejb committed Feb 1, 2024
1 parent 468e168 commit acf0e41
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
25 changes: 14 additions & 11 deletions frontend/src/components/editor/YorkieIntelligenceFeature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
Box,
Button,
CircularProgress,
Fade,
FormControl,
IconButton,
InputAdornment,
Expand Down Expand Up @@ -143,19 +144,19 @@ function YorkieIntelligenceFeature(props: YorkieIntelligenceFeatureProps) {
<Typography>{title}</Typography>
</Box>
{isLoading && <CircularProgress sx={{ marginX: "auto" }} />}
{!isLoading && (
<Box ref={markdownPreviewRef} sx={{ maxHeight: 500, overflow: "auto" }}>
<Box ref={markdownPreviewRef} sx={{ height: 350, overflow: "auto" }}>
{!isLoading && (
<MarkdownPreview
source={addSoftLineBreak(data || "")}
wrapperElement={{
"data-color-mode": currentTheme,
}}
/>
</Box>
)}
)}
</Box>

<Stack gap={2}>
{isComplete && (
<Fade in={isComplete}>
<Stack direction="row" justifyContent="flex-end" gap={1}>
<Button variant="outlined" onClick={handleRetry}>
<RefreshIcon fontSize="small" />
Expand All @@ -170,7 +171,7 @@ function YorkieIntelligenceFeature(props: YorkieIntelligenceFeatureProps) {
Replace
</Button>
</Stack>
)}
</Fade>
<FormControl>
<FormContainer
defaultValues={{ content: "" }}
Expand All @@ -193,11 +194,13 @@ function YorkieIntelligenceFeature(props: YorkieIntelligenceFeatureProps) {
</InputAdornment>
),
endAdornment: (
<InputAdornment position="end">
<IconButton type="submit" edge="end">
<SendIcon />
</IconButton>
</InputAdornment>
<Fade in={isComplete}>
<InputAdornment position="end">
<IconButton type="submit" edge="end">
<SendIcon />
</IconButton>
</InputAdornment>
</Fade>
),
}}
/>
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/editor/YorkieIntelligenceFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ function YorkieIntelligenceFooter(props: YorkieIntelligenceFooterProps) {
horizontal: "left",
}}
onClose={handleCloseModalOpen}
disableScrollLock
disablePortal
>
<Card
ref={cardRef}
Expand Down

0 comments on commit acf0e41

Please sign in to comment.