msyavuz commented on code in PR #36993:
URL: https://github.com/apache/superset/pull/36993#discussion_r2676841492
##########
superset-frontend/src/explore/components/ExploreViewContainer/index.jsx:
##########
@@ -559,6 +559,29 @@ function ExploreViewContainer(props) {
}
}
+ // Automatically set axis title margins when titles are added or removed
+ if (changedControlKeys.includes('x_axis_title')) {
+ const xAxisTitle = props.controls.x_axis_title?.value || '';
+ const currentMargin = props.controls.x_axis_title_margin?.value ?? 0;
Review Comment:
Is this a neccessary change here? I am worried this might break in some edge
cases. If we want this feature, i think we need more extensive tests(maybe e2e
as well)
##########
superset-frontend/src/explore/components/ExploreViewContainer/ExploreViewContainer.test.tsx:
##########
@@ -474,3 +474,181 @@ test('shows error indicator with function labels', async
() => {
expect(await screen.findByText(/Metric is required/)).toBeInTheDocument();
});
+
+describe('Automatic axis title margin adjustment', () => {
Review Comment:
Let's not use describe blocks and flatten the test structure
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts:
##########
@@ -190,3 +194,149 @@ describe('transformNegativeLabelsPosition', () => {
expect((result as any)[4].label).toBe(undefined);
});
});
+
+describe('getPadding', () => {
Review Comment:
Let's not use describe blocks and flatten the test structure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]