The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Fix completion results (#64080)
Romeo Van Snick33070f6e0685
diff --git a/e2e/test/scenarios/native/native-reproductions.cy.spec.ts b/e2e/test/scenarios/native/native-reproductions.cy.spec.tsindex f7605789de4..d89471e4647 100644--- a/e2e/test/scenarios/native/native-reproductions.cy.spec.ts+++ b/e2e/test/scenarios/native/native-reproductions.cy.spec.ts@@ -818,3 +818,38 @@ describe("issue 59356", () => {cy.get("@dataset.all").should("have.length", 2);});});++describe("issue 63711", () => {+ beforeEach(() => {+ H.restore();+ cy.signInAsNormalUser();+ });++ it("Completions should be visible when there are a lot of options (metabase#63711)", () => {+ H.startNewNativeQuestion();+ H.NativeEditor.type("s");++ cy.log("completions should be scrollable");+ H.NativeEditor.completions()+ .findByLabelText("Completions")+ .then(($el) => {+ const element = $el[0];+ cy.wrap(element.scrollHeight).should("be.gt", element.clientHeight);+ });++ cy.log("completions should not cut off the height of the inner element");+ H.NativeEditor.completion("SAVEPOINT")+ .should("be.visible")+ .then(($outerElement) => {+ cy.wrap($outerElement)+ .findByText("AVEPOINT")+ .should("be.visible")+ .then(($innerElement) => {+ cy.wrap($innerElement[0].offsetHeight).should(+ "be.eq",+ $outerElement[0].clientHeight,+ );+ });+ });+ });+});diff --git a/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/CodeMirrorEditor.module.css b/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/CodeMirrorEditor.module.cssindex 6270d88a134..953700fe21f 100644--- a/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/CodeMirrorEditor.module.css+++ b/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/CodeMirrorEditor.module.css@@ -42,6 +42,7 @@display: grid;gap: 0 1rem;grid-template-columns: 1fr;+ grid-auto-rows: max-content;&:has(.cm-completionDetail) {grid-template-columns: max-content 1fr;