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(dashboard): unset empty time filter indicator #16272

Merged
merged 1 commit into from
Aug 16, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Aug 16, 2021

SUMMARY

Currently the time filter indicator shows filter box time filters as being applied despite being set to "No filter". This PR changes the chart data endpoint (both legacy and VI) to not add the time filter to "applied columns" if the time filter is set to "No filter". In addition, unit tests are added for all non-Druid functionality in get_time_filter_status as the function didn't have any unit tests, along with a dataset fixture that can be used with the new unit tests (=faster than the integration tests).

AFTER

Notice how now the indicator doesn't show the filter box time range as being applied when set to "No filter":
image
However, when set to something else, it's now showing up correctly:
image

BEFORE

Notice how both V1 (left) and legacy (middle) chart indicators previously showed the filter as being applied:
image

TESTING INSTRUCTIONS

  1. Create a filter box with a "No filter" time range and create a dashboard with it
  2. Add a legacy chart to the dashboard
  3. Notice the filter indicator showing the time range as applied.

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

@villebro villebro force-pushed the villebro/time-filter-indicator branch from 5dbdc26 to 7c4a221 Compare August 16, 2021 11:50
@villebro villebro force-pushed the villebro/time-filter-indicator branch from 7c4a221 to b97408a Compare August 16, 2021 12:05
@codecov
Copy link

codecov bot commented Aug 16, 2021

Codecov Report

Merging #16272 (b4da868) into master (3709131) will decrease coverage by 0.11%.
The diff coverage is 100.00%.

❗ Current head b4da868 differs from pull request most recent head b97408a. Consider uploading reports for the commit b97408a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16272      +/-   ##
==========================================
- Coverage   76.70%   76.58%   -0.12%     
==========================================
  Files         997      997              
  Lines       53240    53247       +7     
  Branches     6774     6774              
==========================================
- Hits        40838    40781      -57     
- Misses      12172    12236      +64     
  Partials      230      230              
Flag Coverage Δ
hive ?
mysql 81.55% <100.00%> (+0.02%) ⬆️
postgres 81.62% <100.00%> (+0.03%) ⬆️
presto 81.41% <100.00%> (+0.02%) ⬆️
python 81.88% <100.00%> (-0.23%) ⬇️
sqlite 81.22% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset/common/query_actions.py 92.85% <ø> (ø)
superset/viz.py 56.57% <ø> (ø)
superset/utils/core.py 89.89% <100.00%> (+0.81%) ⬆️
superset/utils/date_parser.py 96.58% <100.00%> (+0.01%) ⬆️
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 69.80% <0.00%> (-16.87%) ⬇️
superset/db_engine_specs/presto.py 89.95% <0.00%> (-0.42%) ⬇️
superset/connectors/sqla/models.py 89.46% <0.00%> (-0.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3709131...b97408a. Read the comment docs.

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@villebro villebro merged commit 36abc51 into apache:master Aug 16, 2021
@villebro villebro deleted the villebro/time-filter-indicator branch August 16, 2021 16:32
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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 preset-io size/L 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants