superset icon indicating copy to clipboard operation
superset copied to clipboard

refactor(explore): extract ControlPanelSection and support dynamic section control

Open stephenLYZ opened this issue 2 years ago • 3 comments

SUMMARY

Background: Currently the forecasting feature requires using a temporal x-axis. The majority of the advanced analytics controls are also currently specific to temporal x-axis, so they will need to be hidden when a non-temporal x-axis is selected.

Solution: Currently only dynamic control is supported, but not section-level. So this pr adds the ability to allows a section to be displayed dynamically and reset the value when hidden.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

after

https://user-images.githubusercontent.com/11830681/198889737-93f5cc59-baee-4e68-ae80-dd4ddb5942cd.mov

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

stephenLYZ avatar Oct 30 '22 15:10 stephenLYZ

Codecov Report

Merging #21975 (ae5ea9d) into master (83d990d) will decrease coverage by 0.00%. The diff coverage is 78.72%.

@@            Coverage Diff             @@
##           master   #21975      +/-   ##
==========================================
- Coverage   66.99%   66.99%   -0.01%     
==========================================
  Files        1833     1837       +4     
  Lines       69935    69997      +62     
  Branches     7571     7599      +28     
==========================================
+ Hits        46855    46892      +37     
- Misses      21121    21137      +16     
- Partials     1959     1968       +9     
Flag Coverage Δ
javascript 53.80% <78.72%> (+<0.01%) :arrow_up:

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

Impacted Files Coverage Δ
...-chart-controls/src/sections/advancedAnalytics.tsx 12.50% <0.00%> (-1.79%) :arrow_down:
...i-chart-controls/src/sections/forecastInterval.tsx 66.66% <0.00%> (-33.34%) :arrow_down:
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
...perset-frontend/src/explore/components/Control.tsx 71.42% <ø> (ø)
.../src/explore/components/ControlPanelsContainer.tsx 73.50% <66.66%> (-3.87%) :arrow_down:
...end/src/explore/components/ControlPanelSection.tsx 78.12% <78.12%> (ø)
...superset-ui-chart-controls/src/utils/visibility.ts 100.00% <100.00%> (ø)
...board/components/nativeFilters/FilterBar/index.tsx 50.00% <0.00%> (-10.44%) :arrow_down:
...ts/nativeFilters/FilterBar/ActionButtons/index.tsx 78.57% <0.00%> (-8.93%) :arrow_down:
...nd/plugins/plugin-chart-table/src/controlPanel.tsx 48.43% <0.00%> (-4.69%) :arrow_down:
... and 15 more

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

codecov[bot] avatar Oct 30 '22 16:10 codecov[bot]

/testenv up

geido avatar Nov 28 '22 16:11 geido

@geido Ephemeral environment spinning up at http://54.244.2.94:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

github-actions[bot] avatar Nov 28 '22 16:11 github-actions[bot]