Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sqllab): invalid css scope for ace editor autocomplete #28156

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { useDispatch } from 'react-redux';
import { css, styled, usePrevious, useTheme } from '@superset-ui/core';
import { Global } from '@emotion/react';

import { SQL_EDITOR_LEFTBAR_WIDTH } from 'src/SqlLab/constants';
Copy link
Member

Choose a reason for hiding this comment

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

Needn't tackle it in this PR, but I would think layout constants like these should be global (or in the theme) since they likely could/should apply to other views in the app.

Copy link
Member

Choose a reason for hiding this comment

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

src/SqlLab/constants.ts looks like a good place for this constant.

import { queryEditorSetSelectedText } from 'src/SqlLab/actions/sqlLab';
import { FullSQLEditor as AceEditor } from 'src/components/AsyncAceEditor';
import type { KeyboardShortcut } from 'src/SqlLab/components/KeyboardShortcutButton';
Expand Down Expand Up @@ -189,6 +190,10 @@ const AceEditorWrapper = ({
width: ${theme.gridUnit * 130}px !important;
}

.ace_tooltip {
max-width: ${SQL_EDITOR_LEFTBAR_WIDTH}px;
}

.ace_scroller {
background-color: ${theme.colors.grayscale.light4};
}
Expand Down
Loading