Skip to content

Commit 01d82a0

Browse files
fix: hide the composition sync bar when monaco editor height is getting smaller (#5570)
1 parent 099da87 commit 01d82a0

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

src/shared/components/FluxMonacoEditor.scss

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,29 @@
4444
}
4545
}
4646

47-
.sync-bar {
48-
z-index: 999;
49-
position: absolute;
50-
width: 48px;
47+
.flux-editor--monaco {
48+
position: relative;
49+
overflow: hidden;
5150

52-
.sync-icon {
53-
color: #0098f0;
51+
.sync-bar {
52+
position: absolute;
53+
width: 48px;
54+
55+
.sync-icon {
56+
color: #0098f0;
57+
}
5458
}
55-
}
5659

57-
.sync-bar--on {
58-
background: #0098f01a; // blue with 10% opacity
59-
border-top: 1px solid #0098f0;
60-
border-bottom: 1px solid #0098f0;
61-
}
60+
.sync-bar--on {
61+
background: #0098f01a; // blue with 10% opacity
62+
border-top: 1px solid #0098f0;
63+
border-bottom: 1px solid #0098f0;
64+
}
6265

63-
.sync-bar--off {
64-
opacity: 50%;
65-
background-color: $cf-grey-35;
66-
border-top: 1px solid $cf-white;
67-
border-bottom: 1px solid $cf-white;
66+
.sync-bar--off {
67+
opacity: 50%;
68+
background-color: $cf-grey-35;
69+
border-top: 1px solid $cf-white;
70+
border-bottom: 1px solid $cf-white;
71+
}
6872
}

src/shared/components/FluxMonacoEditor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ const FluxEditorMonaco: FC<Props> = ({
132132

133133
return (
134134
<ErrorBoundary>
135-
<div id={ICON_SYNC_ID} className="sync-bar">
136-
<Icon glyph={IconFont.Sync} className="sync-icon" />
137-
</div>
138135
<div className={wrapperClassName} data-testid="flux-editor">
139136
<MonacoEditor
140137
language={FLUXLANGID}
@@ -158,6 +155,9 @@ const FluxEditorMonaco: FC<Props> = ({
158155
}}
159156
editorDidMount={editorDidMount}
160157
/>
158+
<div id={ICON_SYNC_ID} className="sync-bar">
159+
<Icon glyph={IconFont.Sync} className="sync-icon" />
160+
</div>
161161
</div>
162162
</ErrorBoundary>
163163
)

0 commit comments

Comments
 (0)