Skip to content

Commit

Permalink
Fix error, tweak border styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankeairns committed Jun 18, 2024
1 parent 6fe6382 commit 25dac89
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
5 changes: 0 additions & 5 deletions packages/kbn-text-based-editor/src/editor_footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ export const EditorFooter = memo(function EditorFooter({
queryHasChanged,
measuredContainerWidth,
}: EditorFooterProps) {
const { euiTheme } = useEuiTheme();
const [isErrorPopoverOpen, setIsErrorPopoverOpen] = useState(false);
const [isWarningPopoverOpen, setIsWarningPopoverOpen] = useState(false);
const onUpdateAndSubmit = useCallback(
Expand All @@ -162,10 +161,6 @@ export const EditorFooter = memo(function EditorFooter({
[runQuery, updateQuery]
);

const shadowStyle = isInCompactMode
? `inset 0 0px 0, inset 0 -1px 0 ${euiTheme.border.color}`
: 'none';

return (
<EuiFlexGroup
gutterSize="none"
Expand Down
7 changes: 6 additions & 1 deletion packages/kbn-text-based-editor/src/overwrite.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* NOTE: Much of this is overriding Monaco styles so the specificity is intentional */

// Radius for both the main container and the margin (container for line numbers)
.TextBasedLangEditor .monaco-editor, .TextBasedLangEditor .monaco-editor .margin {
.TextBasedLangEditor .monaco-editor, .TextBasedLangEditor .monaco-editor .margin, .TextBasedLangEditor .monaco-editor .overflow-guard {
border-top-left-radius: $euiBorderRadius;
border-bottom-left-radius: $euiBorderRadius;
}
Expand Down Expand Up @@ -51,3 +51,8 @@
.TextBasedLangEditor--expanded .monaco-editor .monaco-hover {
display: block !important;
}

.TextBasedLangEditor--expanded .monaco-editor, .TextBasedLangEditor--expanded .monaco-editor .margin, .TextBasedLangEditor--expanded .monaco-editor .overflow-guard {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
2 changes: 2 additions & 0 deletions packages/kbn-text-based-editor/src/query_history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ export function QueryHistory({
.euiTable th[data-test-subj='tableHeaderCell_duration_3'] span {
justify-content: flex-end;
}
border-bottom-left-radius: ${euiTheme.border.radius.medium};
border-top-left-radius: ${euiTheme.border.radius.medium};
max-height: ${isInCompactMode ? CONTAINER_MAX_HEIGHT_COMPACT : CONTAINER_MAX_HEIGHT_EXPANDED}px;
overflow-y: auto;
${scrollBarStyles}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const textBasedLanguageEditorStyles = (
},
historyContainer: {
border: euiTheme.border.thin,
borderTop: `2px solid ${euiTheme.colors.lightShade}`,
borderTop: 'none',
borderLeft: editorIsInline ? 'none' : euiTheme.border.thin,
borderRight: editorIsInline ? 'none' : euiTheme.border.thin,
backgroundColor: euiTheme.colors.lightestShade,
Expand Down

0 comments on commit 25dac89

Please sign in to comment.