-
Notifications
You must be signed in to change notification settings - Fork 272
feat(core): add orderyby shared control #1122
feat(core): add orderyby shared control #1122
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/superset/superset-ui/DNwmffspeAjaDcEhZUKdR9DCYdFm |
237b44d
to
d302f86
Compare
Codecov Report
@@ Coverage Diff @@
## master #1122 +/- ##
=======================================
Coverage 28.98% 28.99%
=======================================
Files 462 462
Lines 9200 9209 +9
Branches 1449 1453 +4
=======================================
+ Hits 2667 2670 +3
- Misses 6331 6334 +3
- Partials 202 205 +3
Continue to review full report at Codecov.
|
timeseries_limit_metric: enableExploreDnd ? dnd_sort_by : sort_by, | ||
orderby: enableExploreDnd ? dnd_sort_by : sort_by, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this control relates to ordering by metric (as opposed to ordering by e.g. a column name), perhaps we should rename orderby
to orderby_metric
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem at all.
But this control is just for declaring the orderby clause in the SQL, and I guess if we add dimension(column) sorting, we'll probably do it in this control too.
The name of this control, which is also the name of the query object, makes it easier to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points - if we don't think there will be a need for separate ordering controls for 1) only columns 2) only metrics 3) columns and metrics, then this is probably the right solution for now 👍
@zhaoyongjie please list all chart that are added this control. |
there is no chart with this control. |
🏆 Enhancements
Add a new shared control "orderby" for non-timeseries chart.
related PR: #1112
Now all non-time series chart, are using the "timeseries_limit_metric" control. I would like to introduce a unified sorting control. So that in the future we can have a unified sorting control (sort columns and metrics).