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): Resetting controls when switching query mode #19792

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Apr 20, 2022

SUMMARY

As a result of changes in PR #19039, when user switched query mode in table chart between Aggregate and Raw Records, the controls in currently inactive mode were being reset. This PR fixes that problem by introducing a new prop resetOnHide, which is true by default and set to false in table chart controls.
Please consider this PR as a hotfix - we should probably figure out a more sturdy, foolproof solution.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screen.Recording.2022-04-20.at.15.12.14.mov

After:

Screen.Recording.2022-04-20.at.16.18.31.mov

TESTING INSTRUCTIONS

  1. Open a table chart
  2. Add some values to controls in aggregate mode
  3. Add some values to controls in raw records mode
  4. Switch between the modes a few times, verify that controls are not being reset
  5. Run query, verify that values of currently hidden controls are not included in the query

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

Copy link
Member

@rusackas rusackas 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 quick turnaround!

@stephenLYZ
Copy link
Member

LGTM!

@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #19792 (4fef1a4) into master (e3a54aa) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master   #19792   +/-   ##
=======================================
  Coverage   66.53%   66.53%           
=======================================
  Files        1692     1692           
  Lines       64779    64780    +1     
  Branches     6660     6661    +1     
=======================================
+ Hits        43102    43103    +1     
  Misses      19977    19977           
  Partials     1700     1700           
Flag Coverage Δ
javascript 51.23% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...nd/plugins/plugin-chart-table/src/controlPanel.tsx 16.66% <ø> (ø)
...perset-frontend/src/explore/components/Control.tsx 71.42% <100.00%> (+1.42%) ⬆️

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 e3a54aa...4fef1a4. Read the comment docs.

@kgabryje kgabryje merged commit fcc8080 into apache:master Apr 20, 2022
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 20, 2022
@sadpandajoe
Copy link
Member

🏷️ preset:2022.15

hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.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 preset:2022.15 size/S 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants