superset
superset copied to clipboard
refactor(plugins): BigNumber Time Comparison with existing time_offset API
SUMMARY
Previously we implemented the time comparison in BigNumber viz using some new custom properties in the queryObject to compute the offsets. We are moving away from that approach in order to be more consistent with the way Superset handles time comparison in other visualizations.
Some of the changes of this PR are:
- Use existing time_offset APIs instead of the instant comparison ones
- Create new shared section to include the controls for time comparison, some taken from Advanced Analytics
- Create a new control label to display the comparison ranges using existing time_range API and not a new one
There will be a follow up PR cleaning up the customizations from previous approach, that clean up is left out of this PR to ease the review process.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [X] Required feature flags: FEATURE_CHART_PLUGINS_EXPERIMENTAL
- [ ] 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 Report
Attention: Patch coverage is 11.29032%
with 55 lines
in your changes are missing coverage. Please review.
Project coverage is 69.73%. Comparing base (
349e496
) to head (61d9923
). Report is 44 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #27718 +/- ##
==========================================
- Coverage 69.77% 69.73% -0.05%
==========================================
Files 1911 1922 +11
Lines 75056 75273 +217
Branches 8362 8434 +72
==========================================
+ Hits 52374 52493 +119
- Misses 20630 20717 +87
- Partials 2052 2063 +11
Flag | Coverage Δ | |
---|---|---|
javascript | 57.35% <9.83%> (-0.14%) |
:arrow_down: |
mysql | 77.89% <100.00%> (+<0.01%) |
:arrow_up: |
postgres | 78.00% <100.00%> (-0.02%) |
:arrow_down: |
presto | 53.63% <0.00%> (?) |
|
python | 83.03% <100.00%> (+0.11%) |
:arrow_up: |
sqlite | 77.44% <100.00%> (-0.02%) |
:arrow_down: |
unit | 56.77% <0.00%> (+0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
/testenv up
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://54.184.250.188:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://35.166.80.185:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://35.167.243.15:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://34.221.145.242:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://34.215.133.163:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://54.245.212.136:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://34.218.244.115:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true
@Antonio-RiveroMartnez Ephemeral environment spinning up at http://34.223.248.234:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
@Antonio-RiveroMartnez I added the hold:testing
label to this PR. I'll wait for your rebase and will test the changes using Airbnb's production data, the same way I did for https://github.com/apache/superset/pull/28432 just to confirm that the time-shifts remain in sync with legacy charts.
Ephemeral environment shutdown and build artifacts deleted.