This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 5.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 13b97af7f63f00a6ab129a8cfb1fb9b5993ec4e3
Author: Vladislav Korenkov <[email protected]>
AuthorDate: Thu Mar 20 23:14:09 2025 +1000

    fix(chart control): Change default of "Y Axis Title Margin" (#32720)
    
    (cherry picked from commit d319543377f69ec6f0848e0393033283b39b5733)
---
 .../cypress/e2e/dashboard/drillby.test.ts          | 36 +++++++++++-----------
 .../cypress/e2e/dashboard/drilltodetail.test.ts    | 16 +++++-----
 .../src/sections/chartTitle.tsx                    |  2 +-
 .../src/Timeseries/Regular/Bar/controlPanel.tsx    |  2 +-
 4 files changed, 28 insertions(+), 28 deletions(-)

diff --git 
a/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts 
b/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts
index e471d1da8c..44d994b4f4 100644
--- a/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts
@@ -511,29 +511,29 @@ describe('Drill by modal', () => {
 
     it('Line chart', () => {
       testEchart('echarts_timeseries_line', 'Line Chart', [
-        [70, 93],
-        [70, 93],
+        [85, 93],
+        [85, 93],
       ]);
     });
 
     it('Area Chart', () => {
       testEchart('echarts_area', 'Area Chart', [
-        [70, 93],
-        [70, 93],
+        [85, 93],
+        [85, 93],
       ]);
     });
 
     it('Scatter Chart', () => {
       testEchart('echarts_timeseries_scatter', 'Scatter Chart', [
-        [70, 93],
-        [70, 93],
+        [85, 93],
+        [85, 93],
       ]);
     });
 
     it('Bar Chart', () => {
       testEchart('echarts_timeseries_bar', 'Bar Chart', [
-        [70, 94],
-        [362, 68],
+        [85, 94],
+        [490, 68],
       ]);
     });
 
@@ -566,22 +566,22 @@ describe('Drill by modal', () => {
 
     it('Generic Chart', () => {
       testEchart('echarts_timeseries', 'Generic Chart', [
-        [70, 93],
-        [70, 93],
+        [85, 93],
+        [85, 93],
       ]);
     });
 
     it('Smooth Line Chart', () => {
       testEchart('echarts_timeseries_smooth', 'Smooth Line Chart', [
-        [70, 93],
-        [70, 93],
+        [85, 93],
+        [85, 93],
       ]);
     });
 
     it('Step Line Chart', () => {
       testEchart('echarts_timeseries_step', 'Step Line Chart', [
-        [70, 93],
-        [70, 93],
+        [85, 93],
+        [85, 93],
       ]);
     });
 
@@ -617,8 +617,8 @@ describe('Drill by modal', () => {
       cy.get('[data-test-viz-type="mixed_timeseries"] canvas').then($canvas => 
{
         // click 'boy'
         cy.wrap($canvas).scrollIntoView();
-        cy.wrap($canvas).trigger('mouseover', 70, 93);
-        cy.wrap($canvas).rightclick(70, 93);
+        cy.wrap($canvas).trigger('mouseover', 85, 93);
+        cy.wrap($canvas).rightclick(85, 93);
 
         drillBy('name').then(intercepted => {
           const { queries } = intercepted.request.body;
@@ -651,8 +651,8 @@ describe('Drill by modal', () => {
         cy.get(`[data-test="drill-by-chart"] canvas`).then($canvas => {
           // click second query
           cy.wrap($canvas).scrollIntoView();
-          cy.wrap($canvas).trigger('mouseover', 246, 114);
-          cy.wrap($canvas).rightclick(246, 114);
+          cy.wrap($canvas).trigger('mouseover', 261, 114);
+          cy.wrap($canvas).rightclick(261, 114);
 
           drillBy('ds').then(intercepted => {
             const { queries } = intercepted.request.body;
diff --git 
a/superset-frontend/cypress-base/cypress/e2e/dashboard/drilltodetail.test.ts 
b/superset-frontend/cypress-base/cypress/e2e/dashboard/drilltodetail.test.ts
index 4ebd64dd6e..6183170d3b 100644
--- a/superset-frontend/cypress-base/cypress/e2e/dashboard/drilltodetail.test.ts
+++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/drilltodetail.test.ts
@@ -96,24 +96,24 @@ function testTimeChart(vizType: string) {
 
   cy.get(`[data-test-viz-type='${vizType}'] canvas`).then($canvas => {
     cy.wrap($canvas).scrollIntoView();
-    cy.wrap($canvas).trigger('mousemove', 70, 93);
-    cy.wrap($canvas).rightclick(70, 93);
+    cy.wrap($canvas).trigger('mousemove', 85, 93);
+    cy.wrap($canvas).rightclick(85, 93);
 
     drillToDetailBy('Drill to detail by 1965');
     cy.getBySel('filter-val').should('contain', '1965');
     closeModal();
 
     cy.wrap($canvas).scrollIntoView();
-    cy.wrap($canvas).trigger('mousemove', 70, 93);
-    cy.wrap($canvas).rightclick(70, 93);
+    cy.wrap($canvas).trigger('mousemove', 85, 93);
+    cy.wrap($canvas).rightclick(85, 93);
 
     drillToDetailBy('Drill to detail by boy');
     cy.getBySel('filter-val').should('contain', 'boy');
     closeModal();
 
     cy.wrap($canvas).scrollIntoView();
-    cy.wrap($canvas).trigger('mousemove', 70, 93);
-    cy.wrap($canvas).rightclick(70, 93);
+    cy.wrap($canvas).trigger('mousemove', 85, 93);
+    cy.wrap($canvas).rightclick(85, 93);
 
     drillToDetailBy('Drill to detail by all');
     cy.getBySel('filter-val').first().should('contain', '1965');
@@ -435,7 +435,7 @@ describe('Drill to detail modal', () => {
       SUPPORTED_TIER2_CHARTS.forEach(waitForChartLoad);
     });
 
-    describe('Modal actions', () => {
+    describe.only('Modal actions', () => {
       it('clears filters', () => {
         interceptSamples();
 
@@ -443,7 +443,7 @@ describe('Drill to detail modal', () => {
         cy.get("[data-test-viz-type='box_plot'] canvas").then($canvas => {
           const canvasWidth = $canvas.width() || 0;
           const canvasHeight = $canvas.height() || 0;
-          const canvasCenterX = canvasWidth / 3;
+          const canvasCenterX = canvasWidth / 3 + 15;
           const canvasCenterY = (canvasHeight * 5) / 6;
 
           cy.wrap($canvas).scrollIntoView();
diff --git 
a/superset-frontend/packages/superset-ui-chart-controls/src/sections/chartTitle.tsx
 
b/superset-frontend/packages/superset-ui-chart-controls/src/sections/chartTitle.tsx
index 6c8d08364c..43ad46ba7f 100644
--- 
a/superset-frontend/packages/superset-ui-chart-controls/src/sections/chartTitle.tsx
+++ 
b/superset-frontend/packages/superset-ui-chart-controls/src/sections/chartTitle.tsx
@@ -84,7 +84,7 @@ export const titleControls: ControlPanelSectionConfig = {
           clearable: true,
           label: t('Y Axis Title Margin'),
           renderTrigger: true,
-          default: TITLE_MARGIN_OPTIONS[0],
+          default: TITLE_MARGIN_OPTIONS[1],
           choices: formatSelectOptions(TITLE_MARGIN_OPTIONS),
           description: t('Changing this control takes effect instantly'),
         },
diff --git 
a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx
 
b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx
index ee2d9a6c5c..55cd48736a 100644
--- 
a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx
+++ 
b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx
@@ -122,7 +122,7 @@ function createAxisTitleControl(axis: 'x' | 'y'): 
ControlSetRow[] {
           clearable: true,
           label: t('AXIS TITLE MARGIN'),
           renderTrigger: true,
-          default: sections.TITLE_MARGIN_OPTIONS[0],
+          default: sections.TITLE_MARGIN_OPTIONS[1],
           choices: formatSelectOptions(sections.TITLE_MARGIN_OPTIONS),
           description: t('Changing this control takes effect instantly'),
           visibility: ({ controls }: ControlPanelsContainerProps) =>

Reply via email to