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(dashboard): Don't switch to first tab when directPathToChild changes #26340

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

kgabryje
Copy link
Member

SUMMARY

When user performed an action that caused directPathToChild to point to an element outside of DashboardContainer (such as clicking on applied native filter's name in chart's header to highlight the native filter), it caused the tabs to switch to the first tab.
This PR fixes that behaviour to instead remain on current tab.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screen.Recording.2023-12-22.at.11.47.24.mov

After:

Screen.Recording.2023-12-22.at.11.46.23.mov

TESTING INSTRUCTIONS

  1. Create a dashboard with tabs
  2. Apply some native filters, go to a chart in 2nd tab and click on filter's name in filters badge
  3. Verify that the native filter got highlighted, but the tab didn't switch
  4. Sometimes we do expect the tabs to switch. For example, apply a cross filter to a chart in 2nd tab from a chart in 1st tab.
  5. Click on cross filter's name in filters badge in 2nd tab.
  6. Verify that the tab switched and the source chart is highlighted

ADDITIONAL INFORMATION

  • Has associated issue: Clicking 'Applied filters' tooltip causes unexpected tab switch #26262
  • 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

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5e85f5c) 69.18% compared to head (ab10fa3) 69.18%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #26340   +/-   ##
=======================================
  Coverage   69.18%   69.18%           
=======================================
  Files        1945     1945           
  Lines       75971    75973    +2     
  Branches     8467     8468    +1     
=======================================
+ Hits        52559    52561    +2     
  Misses      21225    21225           
  Partials     2187     2187           
Flag Coverage Δ
javascript 56.52% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kgabryje
Copy link
Member Author

/testenv up

Copy link
Contributor

@kgabryje Container image not yet published for this PR. Please try again when build is complete.

Copy link
Contributor

@kgabryje Ephemeral environment creation failed. Please check the Actions logs for details.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kgabryje kgabryje merged commit 39ac453 into apache:master Dec 22, 2023
31 checks passed
@michael-s-molina michael-s-molina added v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch labels Dec 22, 2023
michael-s-molina pushed a commit that referenced this pull request Dec 27, 2023
michael-s-molina pushed a commit that referenced this pull request Dec 27, 2023
josedev-union pushed a commit to Ortege-xyz/studio that referenced this pull request Jan 22, 2024
@mistercrunch mistercrunch added 🍒 3.0.3 🍒 3.0.4 🍒 3.1.0 🍒 3.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 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 v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch 🍒 3.0.3 🍒 3.0.4 🍒 3.1.0 🍒 3.1.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants