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 #63629: Filter on cards causes an unnecessary horizontal scroll bar for public/static embedding (#63650)
Brad Anderson6f660a3090f3
diff --git a/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js b/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.jsindex 69fcdcf7b31..4485fba5a37 100644--- a/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js+++ b/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js@@ -1424,7 +1424,7 @@ describe("scenarios > dashboard > parameters", () => {H.createQuestionAndDashboard({questionDetails: ordersCountByCategory,dashboardDetails: {- parameters: [categoryParameter],+ parameters: [categoryParameter, countParameter],},}).then(({ body: dashcard }) => {const dashboardId = dashcard.dashboard_id;@@ -1440,8 +1440,9 @@ describe("scenarios > dashboard > parameters", () => {{id: dashcard.id,row: 1,- size_x: 12,+ size_x: 24,size_y: 6,+ inline_parameters: [countParameter.id],parameter_mappings: [{parameter_id: categoryParameter.id,@@ -1452,6 +1453,15 @@ describe("scenarios > dashboard > parameters", () => {{ "stage-number": 0 },],},+ {+ parameter_id: countParameter.id,+ card_id: ORDERS_BY_YEAR_QUESTION_ID,+ target: [+ "dimension",+ ["field", "count", { "base-type": "type/Integer" }],+ { "stage-number": 1 },+ ],+ },],},],@@ -1483,11 +1493,15 @@ describe("scenarios > dashboard > parameters", () => {});cy.location().should(({ search }) => {- expect(search).to.eq("?category=Gadget");+ expect(search).to.eq("?category=Gadget&count=");});// Verify filter doesn't show up in the dashboard headerH.dashboardParametersContainer().should("not.exist");++ cy.findByTestId("embed-frame").then(($el) => {+ expect(H.isScrollableHorizontally($el[0])).to.be.false;+ });});[diff --git a/frontend/src/metabase/dashboard/components/CollapsibleDashboardParameterList/CollapsibleDashboardParameterList.tsx b/frontend/src/metabase/dashboard/components/CollapsibleDashboardParameterList/CollapsibleDashboardParameterList.tsxindex a3e81585286..58b15f61658 100644--- a/frontend/src/metabase/dashboard/components/CollapsibleDashboardParameterList/CollapsibleDashboardParameterList.tsx+++ b/frontend/src/metabase/dashboard/components/CollapsibleDashboardParameterList/CollapsibleDashboardParameterList.tsx@@ -88,7 +88,13 @@ export const CollapsibleDashboardParameterList = forwardRef<<>{/* Invisible expanded parameter list for measurements */}<div- className={cx(CS.fixed, CS.hidden, CS.pointerEventsNone, CS.fullWidth)}+ className={cx(+ CS.fixed,+ CS.hidden,+ CS.pointerEventsNone,+ CS.fullWidth,+ CS.left,+ )}><DashboardParameterList{...parametersListCommonProps}