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): Native filter on the dashboard with multiple tabs is displayed as out of scope #20693

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

There's a race condition when hydrating the dashboard that's causing the native filters to be treated as out of scope.
The original issue was found and fixed by #17084 by ensuring the hydration happened before the active tabs were set.

However, this #19983 caused a regression by passing to the hydration function an empty array for the active tabs, causing it to override what's already in the state. The state could already have the tabs set cause the function that calls the hydration is under an async callback, un thus could be slower.

By passing undefined as the active tabs (the normal scenario), the issue is solved.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

old.mov

After:

new.mov

TESTING INSTRUCTIONS

  1. Create 2 charts
  2. Create a dashboard with 2 tabs
  3. Add 1st chart to 1st tab, 2nd chart to 2nd tab
  4. Create a native filter (e.g. value filter), save the changes and revisit the dashboard
  5. Pay attention to the native filter

Note that the issue happens on revisit, the first time around it works.

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

@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

Merging #20693 (7cb255e) into master (8d4994a) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #20693      +/-   ##
==========================================
- Coverage   66.85%   66.85%   -0.01%     
==========================================
  Files        1753     1753              
  Lines       65825    65832       +7     
  Branches     7006     7007       +1     
==========================================
+ Hits        44010    44011       +1     
- Misses      20030    20035       +5     
- Partials     1785     1786       +1     
Flag Coverage Δ
javascript 51.95% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...rontend/src/dashboard/containers/DashboardPage.tsx 5.31% <ø> (+0.05%) ⬆️
...perset-frontend/src/addSlice/AddSliceContainer.tsx 59.61% <0.00%> (-7.06%) ⬇️
superset-frontend/src/addSlice/App.tsx 0.00% <0.00%> (ø)
...nd/src/views/CRUD/data/dataset/AddDatasetModal.tsx 42.50% <0.00%> (ø)

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 8d4994a...7cb255e. Read the comment docs.

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM

@zhaoyongjie zhaoyongjie merged commit effa7d9 into apache:master Jul 13, 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 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/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants