-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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(explore): Allow using time formatter on temporal columns in data table #18569
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18569 +/- ##
==========================================
- Coverage 66.29% 66.21% -0.09%
==========================================
Files 1594 1596 +2
Lines 62623 62656 +33
Branches 6312 6314 +2
==========================================
- Hits 41518 41488 -30
- Misses 19456 19520 +64
+ Partials 1649 1648 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@kgabryje Ephemeral environment spinning up at http://54.71.136.162:8080. Credentials are |
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.
First pass comments. Works really nicely! A minor wording change proposal + I recommend also adding it to legacy charts due to the minor needed changes.
superset-frontend/src/explore/components/DataTableControl/index.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/explore/components/DataTableControl/index.tsx
Outdated
Show resolved
Hide resolved
/testenv up |
@kgabryje Ephemeral environment spinning up at http://54.203.1.9:8080. Credentials are |
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 last comments, other than that LGTM!
superset-frontend/src/explore/components/DataTableControl/index.tsx
Outdated
Show resolved
Hide resolved
Thanks for your hard work. Before I reviewed the code, I did some experiments.
This problem was not actually introduced by this PR, but it is a long-standing one. let us check SQL, we can see time function only apply on main time column, while datetime1 wrongly uses the time drill-down function in the frontend. IMO, We'd better fix the original issue before we merge this PR into master.
|
@zhaoyongjie the reason for this is that existing users are currently relying on the timegrain only applying to the primary temporal column. See the discussion here: #17239 We're actually currently exploring the possibility of introducing a time grain option in the column control, after which we will no longer be restricted to only having a single time grained temporal column. |
@villebro Thanks for the mention! I applied time format in the customize panel to resolve the inconsistency. |
06b9494
to
9a77d01
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!
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
Enable switching between displaying epoch (original value) and time formatted value (format: YYYY-mm-dd HH:MM:SS).
Temporal columns in data table (tabs "Data" and "Samples") now have a clickable "gear" icon, which opens a popover that allows switching between 2 display modes.
Selected display mode is specific to each column - user can select different display modes for each temporal column. The selection is also specific to datasource, meaning if there are temporal columns that have the same name in 2 datasources, those columns can have different display modes.
Selection is saved in local storage - when user reloads the page, changes hart config etc., it will be persisted.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-02-03.at.14.27.52.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
https://app.shortcut.com/preset/story/33355/explore-south-table-timestamp-column-in-data-panel-did-not-show-correctly
CC @rusackas @jinghua-qa @kasiazjc