michael-s-molina commented on code in PR #30393: URL: https://github.com/apache/superset/pull/30393#discussion_r1775921299
########## superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/customControls.tsx: ########## @@ -66,10 +67,16 @@ function isForcedCategorical(controls: ControlStateMapping): boolean { } function isSortable(controls: ControlStateMapping): boolean { + const xAxisValue = controls?.x_axis?.value as QueryFormColumn; + // Given that we don't know the type of a custom SQL column, + // we treat it as sortable and give the responsibility to the + // user to provide a sortable result. + const isCustomSQL = !isPhysicalColumn(xAxisValue); return ( isForcedCategorical(controls) || + isCustomSQL || checkColumnType( - getColumnLabel(controls?.x_axis?.value as QueryFormColumn), + getColumnLabel(xAxisValue), Review Comment: So, I tried to add a test for our shared controls but quickly find out that the way they are structured makes the tests really hard. I hate this weird declarative structure that we have instead of working with real React composition. I think we should postpone writing tests for them right now because we should rewrite them completely. -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org