Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions frontend/src/components/editor/ai/ai-completion-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
// Use complete to pass the prompt directly, else input might be empty
complete(initialPrompt);
}
// eslint-disable-next-line react-hooks/exhaustive-deps

Check warning on line 157 in frontend/src/components/editor/ai/ai-completion-editor.tsx

View workflow job for this annotation

GitHub Actions / 🧹 Lint frontend

React Compiler has skipped optimizing this component because one or more React ESLint rules were disabled. React Compiler only works when your components follow all the rules of React, disabling them may result in unexpected or incorrect behavior
}, [triggerImmediately]);

// Focus the input
Expand Down Expand Up @@ -254,11 +254,14 @@
};

return (
<div className={cn("flex flex-col w-full rounded-[inherit]", className)}>
<div
data-ai-input-open={showInput}
className={cn("flex flex-col w-full rounded-[inherit]", className)}
>
<div
className={cn(
"flex items-center gap-2 border-b px-3 transition-all rounded-[inherit] rounded-b-none duration-300",
showInput && "max-h-[400px] min-h-11 visible",
"flex items-center gap-2 px-3 transition-all rounded-[inherit] rounded-b-none duration-300",
showInput && "max-h-[400px] border-b min-h-11 visible",
!showInput && "max-h-0 min-h-0 invisible",
)}
>
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/editor/notebook-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,11 @@ const EditableCellComponent = ({
{...cellDomProps(cellId, cellData.name)}
>
{cellOutput === "above" && outputArea}
<div className={cn("tray")} data-hidden={isMarkdownCodeHidden}>
<div
className={cn("tray")}
data-has-output-above={hasOutputAbove}
data-hidden={isMarkdownCodeHidden}
>
<StagedAICellBackground cellId={cellId} />
<div className="absolute right-2 -top-4 z-10">
<CellToolbar
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/css/app/Cell.css
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@
position: relative;
z-index: 1;

&:first-child .cm-editor {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should fix the issue with clipping for moving the create cell buttons

/* Round the top of the code editor unless there is output above or the AI prompt input is open */
&:has([data-has-output-above="false"]):has([data-ai-input-open="false"])
.cm-editor {
border-top-left-radius: 9px;
border-top-right-radius: 9px;
}
Expand Down
Loading