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 top level tabs edit #19722

Merged

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

This PR addresses several small issues detected when editing the top level tabs in the dashboard.

The main problem behind them is that the tab & the content, being different components, were not 100% in sync after re-order/add/remove actions on them.
This PR hoists the state handling up for this scenarios and ensure the state is driven in the same way.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Issue 1

When adding a new tab, the container gets selected & the "Collapse tab content" popup appears.

Before:

collapse-msg.mov

After:

Screen.Recording.2022-04-14.at.13.16.11.mov

Issue 2

When adding a new tab, said tab is selected, but the content still reflects the one from a previous tab

Before:

add-tab-content-does-not-change.mov

After:

Screen.Recording.2022-04-14.at.13.17.22.mov

Issue 3

Reordering tabs makes the tab & content out of sync, so the current tab content is lost.

Before:

switch-tabs-content.mov

After:

Screen.Recording.2022-04-14.at.13.18.25.mov

Issue 4

Deleting a tab always switches to the last one. This should only happen if the tab being deleted is the current one the user is seeing, otherwise, nothing should change.

Before:

delete-switches-tab.mov

After:

Screen.Recording.2022-04-14.at.13.20.07.mov

TESTING INSTRUCTIONS

Check each individual "Before" video for reproduction steps

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 Apr 14, 2022

Codecov Report

Merging #19722 (9fcea20) into master (e061955) will increase coverage by 0.00%.
The diff coverage is 80.00%.

@@           Coverage Diff           @@
##           master   #19722   +/-   ##
=======================================
  Coverage   66.51%   66.51%           
=======================================
  Files        1690     1690           
  Lines       64614    64618    +4     
  Branches     6655     6656    +1     
=======================================
+ Hits        42978    42983    +5     
  Misses      19936    19936           
+ Partials     1700     1699    -1     
Flag Coverage Δ
javascript 51.20% <80.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...d/components/DashboardBuilder/DashboardBuilder.tsx 70.10% <66.66%> (-0.36%) ⬇️
...d/src/dashboard/components/gridComponents/Tabs.jsx 82.55% <85.71%> (+3.90%) ⬆️
...components/DashboardBuilder/DashboardContainer.tsx 72.22% <100.00%> (-1.47%) ⬇️

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 e061955...9fcea20. Read the comment docs.

@rusackas
Copy link
Member

Rebase needed... hopefully then it'll magically pass CI

@diegomedina248 diegomedina248 force-pushed the fix/dashboard-top-level-tabs-edit branch from 47e0ce7 to 9fcea20 Compare April 19, 2022 20:44
@rusackas rusackas merged commit 1c5d3b7 into apache:master Apr 19, 2022
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-Patch size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants