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(sqllab): resultset disappeared on switching tabs #21741

Merged

Conversation

justinpark
Copy link
Member

@justinpark justinpark commented Oct 7, 2022

SUMMARY

Since the rendering refactoring by #20877, the number of redundant rendering reduced.
The FilterableTable re-rendering reduced related to the unnecessary property update but it wasn't reloaded when height is updated. It's mainly caused by functional component refactoring at #21136 which uses useRef to capture the height so it won't refreshed with the updated height prop properly.

https://github.com/EugeneTorap/superset/blob/66b704c13ae5b3840109c584989b1248cafb86e1/superset-frontend/src/components/FilterableTable/index.tsx#L335-L336

This occurs the empty result-set problem due to react-virtualized rendering issue with NaN height value.

This commit fixes the rendering issue with the updated height value.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

  • Before
filterableTable--before.mov
  • After
filterableTable--after.mov

TESTING INSTRUCTIONS

  • Go to SqlLab
  • Open 2 tabs in UI
  • Run query in 1 and wait for results to show
  • Switch to other tab, then back to original tab

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
    cc: @EugeneTorap

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Oct 7, 2022
@codecov
Copy link

codecov bot commented Oct 8, 2022

Codecov Report

Merging #21741 (fcefb26) into master (0c46149) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #21741      +/-   ##
==========================================
- Coverage   66.84%   66.84%   -0.01%     
==========================================
  Files        1800     1800              
  Lines       68940    68933       -7     
  Branches     7334     7332       -2     
==========================================
- Hits        46084    46079       -5     
+ Misses      20964    20963       -1     
+ Partials     1892     1891       -1     
Flag Coverage Δ
javascript 53.15% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...-frontend/src/components/FilterableTable/index.tsx 72.67% <ø> (+0.04%) ⬆️

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

@EugeneTorap
Copy link
Contributor

Can we merge it?

@ktmud ktmud merged commit d7ee443 into apache:master Oct 10, 2022
justinpark added a commit to airbnb/superset-fork that referenced this pull request Oct 10, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 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 size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants