Skip to content
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

fix(plugin-chart-table): Include time control #23533

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Mar 30, 2023

SUMMARY

The "Include time" control in Table chart is not working properly when GENERIC_CHART_AXES is enabled because of lack of the time column in chart settings.
This PR removes the include_time checkbox and if include_time was true before and granularity_sqla was set, it moves the granularity_sqla column to dimensions. The end result is the same as with the checkbox, except that the label of the time column is actual column name rather than "Time".

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screenshot 2023-03-30 at 13 54 33

After:

image

TESTING INSTRUCTIONS

  1. Disable GENERIC_CHART_AXES
  2. Create a table chart and check "Include time", add a time column
  3. Enable GENERIC_CHART_AXES
  4. The "Include time" checkbox should disappear, the time column should now be added to Dimensions
  5. Nothing should happen if "Include time" was not checked before enabling the feature flag

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@kgabryje
Copy link
Member Author

CC @yousoph

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Merging #23533 (db2eb64) into master (de42c11) will increase coverage by 0.03%.
The diff coverage is 65.71%.

❗ Current head db2eb64 differs from pull request most recent head 1af6c03. Consider uploading reports for the commit 1af6c03 to get more accurate results

@@            Coverage Diff             @@
##           master   #23533      +/-   ##
==========================================
+ Coverage   67.64%   67.68%   +0.03%     
==========================================
  Files        1914     1914              
  Lines       73925    73964      +39     
  Branches     8020     8032      +12     
==========================================
+ Hits        50009    50060      +51     
+ Misses      21873    21855      -18     
- Partials     2043     2049       +6     
Flag Coverage Δ
javascript 53.90% <60.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tend/plugins/legacy-preset-chart-nvd3/src/utils.js 15.92% <ø> (ø)
...ugin-chart-pivot-table/src/plugin/controlPanel.tsx 4.00% <0.00%> (-0.17%) ⬇️
superset-frontend/src/SqlLab/App.jsx 0.00% <ø> (ø)
superset-frontend/src/SqlLab/actions/sqlLab.js 64.50% <ø> (ø)
...d/src/SqlLab/components/ShareSqlLabQuery/index.tsx 81.48% <ø> (ø)
...frontend/src/SqlLab/components/SouthPane/index.tsx 79.54% <ø> (ø)
...frontend/src/SqlLab/components/SqlEditor/index.jsx 56.68% <ø> (ø)
...d/src/SqlLab/components/TabbedSqlEditors/index.jsx 49.47% <ø> (ø)
superset-frontend/src/components/Chart/Chart.jsx 55.35% <ø> (ø)
...erset-frontend/src/components/Chart/chartAction.js 55.34% <ø> (ø)
... and 58 more

... and 10 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and tested to work as expected - a big step forward in terms of UX for table charts with temporal dimensions 🚀

@kgabryje kgabryje merged commit 13ffb4b into apache:master Apr 3, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants