-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: reset metrics on dataset change #12782
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12782 +/- ##
==========================================
+ Coverage 66.42% 68.95% +2.53%
==========================================
Files 1022 1026 +4
Lines 50106 48856 -1250
Branches 5193 5257 +64
==========================================
+ Hits 33283 33689 +406
+ Misses 16680 15033 -1647
+ Partials 143 134 -9
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
end state of this project
|
2bdb97a
to
f65d3d6
Compare
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.
Tested nvd3, deck.gl, echarts on dropdown select, input, checkbox, time range(default last week), advanced analytics and annotation. all LGTM! ✅
ready for code review @rusackas @villebro @zhaoyongjie
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.
For SelectControl
, MetricControl
etc this mostly makes sense, but I think this will have unwanted consequences for controls that default to non-empty/false. For example, Pie Chart defaults to true
on the "Show labels" and "Put labels outside" controls, which would be false
with this change. I think it would be optimal to rather reset to the default control values as defined by the selected viz.
I think it would be nice to retain metrics/columns with matching column names at least since a lot of times users would want to fix a broken chart or iterate on an existing one by replacing the datasource with a newer (and slightly updated) dataset. I know this requirement exists because as a former Data Scientist, I've done similar operation in Tableau a lot. A better experience is probably to still keep the selected options, but highlight the invalid ones (like Tableau does with invalid calculated columns when you switch a datasource). @junlincc could you elaborate on the motivation behind the original roadmap ticket? If it is about not showing invalid options, would highlighting them solve the concerns you had? |
@ktmud @hushaoqing Any changes in Superset nowadays can be contentious, that's why we wanna respect and prioritize the requests that is based on some testing results and research large enterprises raised over personal preference or opinion. We will go ahead with this change and take your suggestion into next iteration. |
@junlincc Sorry for missing the context. I asked for more information because it was not stated in the roadmap ticket. It would be nice if we can ensure all future tickets have that info. I know the ticket has been open for a long time, but if I didn't notice this roadmap item, then I doubt others users would have, either. Again, apologies to both you and @pkdotson for jumping in late, but I think it's worth considering alternatives given how important the control areas are. If you don't think my proposed alternative make sense, then go ahead and implement original proposal. I also don't want @pkdotson 's hard work go wasted. |
And FYI, one of the motivation behind SIP-43 was to have the ability to retain control values when switching viz types:
I think it would make sense to extend that ability to datasource switch, too. |
Right, that's the goal. In terms of timeline, it probably will happen naturally after Echarts migration and dynamic control that @villebro proposed. Well actually it's already happening in Time-series Echarts. Really appreciate your suggestions though! since chart creation flow is still fairly broken, and the lack of consistency in control fields across different chart types, it makes more sense reseting to default when switching dataset for now. @pkdotson please address @villebro's comment, then we are good to go. thanks you both! |
I guess I got a little concerned when you said this is the end of this project:
Rather than resetting everything to default, I think it makes more sense to just reset |
The end state of this project for the time being. We really want to make incremental changes and iterate rapidly instead of holding off the progress because of factors that are out of control. Back to the solution itself... I am going to respect the original feature request received from the forum for now. let's discuss more next week to explore different options along with other contentious topics. im sure we can reach consensus somehow :) @mihir174 @ktmud @villebro |
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.
Two minor nits, LGTM!
superset-frontend/src/explore/components/ControlPanelsContainer.jsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/explore/components/ControlPanelsContainer.jsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover.jsx
Show resolved
Hide resolved
superset-frontend/src/explore/components/controls/AnnotationLayerControl.jsx
Outdated
Show resolved
Hide resolved
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.
Approve as product sign-off ✅
reset control to default -> default metric count, row limit 10000
@pkdotson thanks for the PR! please address @zhaoyongjie 's comment, if that's not much of work.
31b1f91
to
29a42e0
Compare
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.
LGTM
SUMMARY
This pr will reset metrics controls when there is a change in dataset.
closes apache-superset/superset-roadmap#112
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-01-28.at.3.01.34.PM.mov
TEST PLAN
change dataset and in explore view and check controls of various charts to ensure all controls are defaulted to empty state.
ADDITIONAL INFORMATION