LuisSanchez commented on code in PR #36993:
URL: https://github.com/apache/superset/pull/36993#discussion_r2680531668
##########
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:
Yes, if we skip this change, we will avoid setting automatically the margins
to a default of 30 or 0 if the title changes.
If we don't add this, we leave the update of the margins to the final user,
giving, imho, a bad experience
For example, it will look like this instead of the "after" in the description
https://github.com/user-attachments/assets/64f161b8-1500-4274-bc7d-43f4847e37fd
--
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]