Skip to content

Commit b049dfd

Browse files
authored
chore(compass-aggregations): disable default background color in editor (#4194)
1 parent 846d308 commit b049dfd

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

packages/compass-aggregations/src/components/focus-mode/focus-mode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const editorAreaBaseStyles = css({
8181
});
8282

8383
const editorAreaDarkStyles = css({
84-
backgroundColor: palette.gray.dark3,
84+
backgroundColor: palette.gray.dark4,
8585
});
8686

8787
const editorAreaLightStyles = css({

packages/compass-aggregations/src/components/pipeline-builder-workspace/pipeline-as-text-workspace/pipeline-editor.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ const editorContainerStyles = css({
4343
overflow: 'hidden',
4444
});
4545

46+
// We use custom color here so need to disable default one that we use
47+
// everywhere else
48+
const codeEditorStyles = css({
49+
'& .cm-editor': {
50+
background: 'transparent !important',
51+
},
52+
});
53+
4654
const errorContainerStyles = css({
4755
flex: 'none',
4856
marginTop: 'auto',
@@ -133,6 +141,7 @@ export const PipelineEditor: React.FunctionComponent<PipelineEditorProps> = ({
133141
completer={completer}
134142
minLines={16}
135143
onBlur={onBlurEditor}
144+
className={codeEditorStyles}
136145
/>
137146
</div>
138147
{showErrorContainer && (

packages/compass-aggregations/src/components/stage-editor/stage-editor.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const editorContainerStyles = css({
3131
height: '100%',
3232
});
3333

34-
const editorStyles = css({
34+
const codeEditorContainerStyles = css({
3535
flex: 1,
3636
flexShrink: 0,
3737
margin: 0,
@@ -47,8 +47,12 @@ const editorContainerStylesLight = css({
4747
background: palette.gray.light3,
4848
});
4949

50-
const aceEditorStyles = css({
51-
minHeight: '160px',
50+
// We use custom color here so need to disable default one that we use
51+
// everywhere else
52+
const codeEditorStyles = css({
53+
'& .cm-editor': {
54+
background: 'transparent !important',
55+
},
5256
});
5357

5458
const bannerStyles = css({
@@ -146,16 +150,15 @@ export const StageEditor = ({
146150
className
147151
)}
148152
>
149-
<div className={editorStyles}>
153+
<div className={codeEditorContainerStyles}>
150154
<CodemirrorMultilineEditor
151155
ref={editorRef}
152156
text={stageValue ?? ''}
153157
onChangeText={(value: string) => {
154158
onChange(index, value);
155159
}}
156-
className={aceEditorStyles}
160+
className={codeEditorStyles}
157161
id={`aggregations-stage-editor-${index}`}
158-
minLines={5}
159162
completer={completer}
160163
annotations={annotations}
161164
onBlur={onBlurEditor}

0 commit comments

Comments
 (0)