-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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: Adds the Default Temporal Column #22477
feat: Adds the Default Temporal Column #22477
Conversation
@zhaoyongjie @villebro I'm tagging you to help with the review of the proposed changes and also to make sure we don't forget to change specific parts of the code. At this point, I'm only mapping the parts of the code that will be affected before starting the implementation. |
@michael-s-molina Thanks for mentioning these potential issues. I've some thoughts on the current design. I'd like to know what your thoughts are.
|
If we can consider some breaking changes on the Superset 3.0, I think just removing the default temporal column in the |
Hi @zhaoyongjie. Thanks for the review.
We're aligned here. That's why we want to preserve the changes made by your original PR that improved the separation of these concepts. We just want to make it clearer to the user what column is being used by a Time Range.
That's an important observation. In our proposal, the Default Temporal Column defines which column will be used when applying a Time Range. We're intentionally supporting only one column affected by the Time Range at this stage. If a user defines a temporal filter in Explore (they don't have to), and the column involved in the filter is the same as the one defined in Default Temporal Column then we should replace its value as you pointed out. If the column used in the filter is different than the one in Default Temporal Column, then the filter will not be affected by a Time Range. I added these rules to the PR description. Thank you for the observation.
In the future, our idea is to move this configuration to the native filters and increase its flexibility. At that stage, we won't need a Default Temporal Column anymore. |
@michael-s-molina, Thanks for the reply.
If I understand correctly, the This design should quickly solve the customer's request, but it will also have some side effects. For example:
|
The Time Range will use the column defined by DTC to generate the the
We believe the new concept will improve the user experience. Especially because we can clearly describe the purpose for the control.
You're absolutely right about this. We discussed internally, and Product decided that it was OK no not support that requirement at this stage.
Good point. We need to consider it in the implementation. Thank you again 🙂 |
Closing this in favor of #22707 |
SUMMARY
This PR is a follow-up #21767 and introduces the Default Temporal Column control to non-legacy charts. Previously, the default temporal column used by time-based filters such as Time Range was defined in the Filters control of Explore. When creating a new chart with a dataset containing a temporal column, the application would automatically add that column as a filter in the Filters control and use it as the source for time-based filters. That strategy resulted in some problems with our clients when evaluating the Generic X-axis feature:
After internal discussion, we concluded that the best place to make these configurations would be in the native filters module, where a user, when creating a Time Range filter, could potentially select all the temporal columns affected by the filter, even if they come from different datasets. This would give the users the flexibility to create different filter configurations and also clearly show which columns are being affected by the filter. We would like to prototype and validate the solution with our users before changing the native filters module. Meanwhile, we want to provide a solution to the problems stated above, and this PR proposes the following changes:
GENERIC_CHART_AXES
is enabled and the dataset has at least one temporal columnHere's a preview of how the feature will look like:
The PR description will be updated after the changes.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TODO - It will be updated after the changes
TESTING INSTRUCTIONS
TODO - It will be updated after the changes
@codyml @kasiazjc @lauderbaugh
ADDITIONAL INFORMATION