msyavuz commented on code in PR #37459:
URL: https://github.com/apache/superset/pull/37459#discussion_r2786606344
##########
superset-frontend/src/dashboard/components/FiltersBadge/index.tsx:
##########
@@ -106,10 +107,14 @@ const indicatorsInitialState: Indicator[] = [];
export const FiltersBadge = ({ chartId }: FiltersBadgeProps) => {
const dispatch = useDispatch();
- const datasources = useSelector<RootState, any>(state => state.datasources);
- const dashboardFilters = useSelector<RootState, any>(
- state => state.dashboardFilters,
+ const isAutoRefreshing = useIsAutoRefreshing();
+ const datasources = useSelector<RootState, RootState['datasources']>(
Review Comment:
Really nice to see proper types on these!
##########
superset-frontend/packages/superset-ui-core/src/components/Icons/AntdEnhanced.tsx:
##########
@@ -40,6 +40,9 @@ import {
CaretLeftOutlined,
CaretRightOutlined,
CaretRightFilled,
+ PauseOutlined,
+ PauseCircleOutlined,
+ PlayCircleOutlined,
Review Comment:
Can we add these in alphabetical order?
##########
superset-frontend/plugins/plugin-chart-echarts/src/Tree/buildQuery.ts:
##########
@@ -16,14 +16,36 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { buildQueryContext, QueryFormData } from '@superset-ui/core';
+import { buildQueryContext, QueryFormOrderBy } from '@superset-ui/core';
+import { EchartsTreeFormData } from './types';
+
+export default function buildQuery(formData: EchartsTreeFormData) {
+ const { id, parent, name, row_limit } = formData;
+ const orderby: QueryFormOrderBy[] = [];
+ const shouldApplyOrderBy =
+ row_limit !== undefined && row_limit !== null && row_limit !== 0;
+ const orderbyColumns: string[] = [];
+
+ [parent, id, name].forEach(column => {
+ if (column) {
+ orderbyColumns.push(column);
+ }
+ });
+ orderbyColumns.forEach(column => {
+ orderby.push([column, true]);
+ });
Review Comment:
Can you expand a bit more on these order by changes?
##########
superset-frontend/plugins/plugin-chart-echarts/src/Treemap/buildQuery.ts:
##########
@@ -16,15 +16,36 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { buildQueryContext, QueryFormData } from '@superset-ui/core';
+import {
+ buildQueryContext,
+ QueryFormData,
+ QueryFormOrderBy,
+} from '@superset-ui/core';
export default function buildQuery(formData: QueryFormData) {
- const { metric, sort_by_metric } = formData;
+ const { metric, sort_by_metric, groupby = [], row_limit } = formData;
+ const orderby: QueryFormOrderBy[] = [];
+ const shouldApplyOrderBy =
+ row_limit !== undefined && row_limit !== null && row_limit !== 0;
+
+ if (sort_by_metric && metric) {
+ orderby.push([metric, false]);
+ }
+ if (!sort_by_metric && groupby.length > 0) {
+ groupby.forEach(column => {
+ orderby.push([column, true]);
+ });
+ }
+ if (sort_by_metric && groupby.length > 0) {
+ groupby.forEach(column => {
+ orderby.push([column, true]);
+ });
+ }
Review Comment:
Here too. Not sure about the reason for these but we can probably extract a
generic helper for this right?
##########
superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx:
##########
@@ -52,14 +51,11 @@ function BigNumberVis({
kickerFontSize = PROPORTION.KICKER,
metricNameFontSize = PROPORTION.METRIC_NAME,
showMetricName = true,
- mainColor = BRAND_COLOR,
Review Comment:
These were unused?
##########
superset-frontend/plugins/plugin-chart-echarts/src/Graph/buildQuery.ts:
##########
@@ -16,15 +16,34 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { buildQueryContext, QueryFormData } from '@superset-ui/core';
+import { buildQueryContext, QueryFormOrderBy } from '@superset-ui/core';
+import { EchartsGraphFormData } from './types';
+
+export default function buildQuery(formData: EchartsGraphFormData) {
+ const { source, target, source_category, target_category, row_limit } =
+ formData;
+ const orderby: QueryFormOrderBy[] = [];
+ const shouldApplyOrderBy =
+ row_limit !== undefined && row_limit !== null && row_limit !== 0;
+
+ [source, target, source_category, target_category].forEach(column => {
+ if (column) {
+ orderby.push([column, true]);
+ }
+ });
Review Comment:
Are these changes related to the PR?
--
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]