Compare commits

...

2 Commits

Author SHA1 Message Date
sadpandajoe
3d24afdabf fix(sqllab): move outline to inner .ace_editor to avoid clipping popovers
Address Copilot/Bito review: the previous EditorOutline wrapper used
overflow: hidden to clip the border-radius, which would also clip
Ace's autocomplete dropdown and gutter/annotation tooltips that Ace
mounts as descendants of .ace_editor. Apply the border + border-radius
directly to the .ace_editor element instead so the outline still
renders and popovers are no longer clipped at the wrapper boundary.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-17 00:05:05 +00:00
sadpandajoe
c7a09acd01 fix(sqllab): shrink Template Parameters editor height and add outline
Reduce editor height from 800px to 360px so the popover fits on
laptop viewports without overflowing. Replace the broken
StyledEditorHost styled wrapper (whose &.ace_editor selector never
matched because the class lives on a deeper DOM node) with an
EditorOutline div that applies border + border-radius + overflow:hidden
directly, ensuring the outline is always visible in both light and
dark themes via theme.colorBorder.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 18:27:46 +00:00

View File

@@ -30,9 +30,10 @@ import {
import { EditorHost } from 'src/core/editors';
import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor';
const StyledEditorHost = styled(EditorHost)`
&.ace_editor {
const EditorOutline = styled.div`
& .ace_editor {
border: 1px solid ${({ theme }) => theme.colorBorder};
border-radius: ${({ theme }) => theme.borderRadius}px;
}
`;
@@ -87,14 +88,16 @@ const TemplateParamsEditor = ({
</a>{' '}
{t('syntax.')}
</StyledParagraph>
<StyledEditorHost
id={`template-params-${queryEditorId}`}
height="800px"
onChange={debounce(onChange, Constants.FAST_DEBOUNCE)}
language={language === 'yaml' ? 'yaml' : 'json'}
width="100%"
value={code}
/>
<EditorOutline>
<EditorHost
id={`template-params-${queryEditorId}`}
height="360px"
onChange={debounce(onChange, Constants.FAST_DEBOUNCE)}
language={language === 'yaml' ? 'yaml' : 'json'}
width="100%"
value={code}
/>
</EditorOutline>
</div>
);