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: Native time range filter in legacy charts #23865

Merged
merged 1 commit into from
May 1, 2023

Conversation

kgabryje
Copy link
Member

SUMMARY

Some legacy charts (e.g. Heatmap and Bar Chart) were not getting dashboard time range filters applied with GENERIC_CHART_AXES enabled. This PR manually converts the time range into an adhoc filter, similarly how it's done for v1 charts.

Additionally, this PR brings back the time section for Calendar Heatmap chart, which was broken without it.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

image

After:

image

TESTING INSTRUCTIONS

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

@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #23865 (774adcf) into master (053dca1) will increase coverage by 0.00%.
The diff coverage is 88.46%.

❗ Current head 774adcf differs from pull request most recent head 4b4c0c3. Consider uploading reports for the commit 4b4c0c3 to get more accurate results

@@           Coverage Diff           @@
##           master   #23865   +/-   ##
=======================================
  Coverage   68.11%   68.11%           
=======================================
  Files        1938     1938           
  Lines       74958    74975   +17     
  Branches     8141     8141           
=======================================
+ Hits        51055    51069   +14     
- Misses      21824    21827    +3     
  Partials     2079     2079           
Flag Coverage Δ
hive 53.00% <64.28%> (-0.01%) ⬇️
mysql 78.80% <92.85%> (+<0.01%) ⬆️
postgres 78.87% <92.85%> (+<0.01%) ⬆️
presto 52.92% <64.28%> (-0.01%) ⬇️
python 82.67% <92.85%> (-0.01%) ⬇️
sqlite 77.39% <92.85%> (+<0.01%) ⬆️
unit 52.81% <78.57%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...s/legacy-plugin-chart-calendar/src/controlPanel.ts 50.00% <ø> (ø)
.../src/dashboard/components/gridComponents/Chart.jsx 55.96% <ø> (ø)
...tend/src/components/Chart/DrillBy/DrillByModal.tsx 74.13% <75.00%> (+0.06%) ⬆️
superset/utils/core.py 90.92% <85.71%> (-0.07%) ⬇️
superset-frontend/src/logger/LogUtils.ts 97.14% <100.00%> (+0.36%) ⬆️
superset/reports/notifications/email.py 98.63% <100.00%> (+0.01%) ⬆️

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

@kgabryje
Copy link
Member Author

/testenv up FEATURE_GENERIC_CHART_AXES=true

@github-actions
Copy link
Contributor

@kgabryje Container image not yet published for this PR. Please try again when build is complete.

@github-actions
Copy link
Contributor

@kgabryje Ephemeral environment creation failed. Please check the Actions logs for details.

@sfirke
Copy link
Member

sfirke commented Apr 28, 2023

I wonder if this would fix #23773 ? Seems like the same issue except I believe my affected charts are the new EChart bar chart, not legacy.

@eschutho eschutho merged commit 78833bc into apache:master May 1, 2023
@eschutho
Copy link
Member

eschutho commented May 1, 2023

@kgabryje Thanks for the quick fix! Do you think we can fast-follow with a test, too?

@sfirke do you need a way to test this to find out? I could spin up a new ephemeral for you off master if you want.

@sfirke
Copy link
Member

sfirke commented Jun 23, 2023

@eschutho I closed the related issue above, it appears fixed in 2.1.1 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset:2023.17 size/S v2.1 🍒 2.1.1 🍒 2.1.2 🍒 2.1.3 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants