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): invalid empty state on switch tab #29278

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

justinpark
Copy link
Member

SUMMARY

The current DB selection empty state screen is modified through the setEmptyState function. As a result, when tabs switch and share the same DB selection ID, the setEmptyState call is ignored, leading to a bug where the empty state is displayed even when a DB is selected.

This commit unifies the state management by using useMemo to ensure that the showEmpty value is always set when there is a currently selected DB.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

before--empty-on-switch-tab.mov

After:

after--empty-on-switch-tab.mov

TESTING INSTRUCTIONS

Open multiple tabs that selects the same db and then switch tabs each others

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

@dosubot dosubot bot added the sqllab Namespace | Anything related to the SQL Lab label Jun 17, 2024
@justinpark justinpark merged commit 725afc3 into apache:master Jun 18, 2024
34 checks passed
@michael-s-molina michael-s-molina added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label Jun 18, 2024
@mistercrunch mistercrunch added 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 24, 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 sqllab Namespace | Anything related to the SQL Lab v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants