Skip to content

Commit b09deaa

Browse files
authored
Merge branch 'main' into fix-display_value-blank
2 parents c826363 + e48a583 commit b09deaa

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

quadratic-client/src/app/ui/menus/CodeEditor/AICodeBlockParser.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@ export function parseCodeBlocks(input: string): Array<string | JSX.Element> {
2323
}
2424

2525
export function CodeBlockParser({ input }: { input: string }): JSX.Element {
26-
return <Stack gap={2}>{parseCodeBlocks(input)}</Stack>;
26+
return (
27+
<Stack gap={2} className="select-text">
28+
{parseCodeBlocks(input)}
29+
</Stack>
30+
);
2731
}

quadratic-client/src/app/ui/menus/CodeEditor/AiAssistant.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export const AiAssistant = ({ evalResult, editorMode, editorContent, isActive }:
181181
return (
182182
<>
183183
<div
184-
className="overflow-y-auto whitespace-pre-wrap pb-2 pl-3 pr-4 text-sm outline-none"
184+
className="select-text overflow-y-auto whitespace-pre-wrap pb-2 pl-3 pr-4 text-sm outline-none"
185185
spellCheck={false}
186186
onKeyDown={(e) => {
187187
if (((e.metaKey || e.ctrlKey) && e.key === 'a') || ((e.metaKey || e.ctrlKey) && e.key === 'c')) {

quadratic-client/src/app/ui/menus/CodeEditor/CodeEditor.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,10 @@ export const CodeEditor = () => {
338338
<CodeEditorProvider>
339339
<div
340340
ref={containerRef}
341-
className={cn('relative flex bg-background', codeEditorPanelData.panelPosition === 'left' ? '' : 'flex-col')}
341+
className={cn(
342+
'relative flex select-none bg-background',
343+
codeEditorPanelData.panelPosition === 'left' ? '' : 'flex-col'
344+
)}
342345
style={{
343346
width: `${
344347
codeEditorPanelData.editorWidth +

quadratic-client/src/app/ui/menus/CodeEditor/CodeEditorHeader.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const CodeEditorHeader = (props: Props) => {
120120
className={cn(
121121
`relative`,
122122
unsaved &&
123-
`after:pointer-events-none after:absolute after:-bottom-0.5 after:-right-0.5 after:h-3 after:w-3 after:rounded-full after:border-2 after:border-solid after:border-background after:bg-warning after:content-['']`
123+
`after:pointer-events-none after:absolute after:-bottom-0.5 after:-right-0.5 after:h-3 after:w-3 after:rounded-full after:border-2 after:border-solid after:border-background after:bg-gray-400 after:content-['']`
124124
)}
125125
>
126126
<TooltipHint title={`${language}${unsaved ? ' · Unsaved changes' : ''}`} placement="bottom">
@@ -136,7 +136,7 @@ export const CodeEditorHeader = (props: Props) => {
136136
</TooltipHint>
137137
</div>
138138
<div className="mx-2 flex truncate text-sm font-medium">
139-
Cell ({cellLocation.x}, {cellLocation.y})
139+
Cell ({cellLocation.x}, {cellLocation.y}) {unsaved && ' - Unsaved changes'}
140140
{currentCodeEditorCellIsNotInActiveSheet && (
141141
<span className="ml-1 min-w-0 truncate">- {currentSheetNameOfActiveCodeEditorCell}</span>
142142
)}

quadratic-client/src/app/ui/menus/SheetBar/SheetBar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ export const SheetBar = (): JSX.Element => {
422422
zIndex: 1,
423423
backgroundColor: theme.palette.background.paper,
424424
}}
425-
className="sheet-bar"
425+
className="sheet-bar select-none"
426426
>
427427
{hasPermission && (
428428
<SheetBarButton

quadratic-client/src/app/ui/menus/TopBar/TopBar.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export const TopBar = () => {
5555
// if clicked (not child clicked), maximize window. For electron.
5656
if (event.target === event.currentTarget) electronMaximizeCurrentWindow();
5757
}}
58+
className="select-none"
5859
>
5960
<div
6061
className="flex items-stretch lg:basis-1/3"

0 commit comments

Comments
 (0)