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: Scroll to top when selecting a global dashboard tab #28386

Conversation

michael-s-molina
Copy link
Member

SUMMARY

This PR changes the dashboard component to scroll to top when a global tab is selected. This is to avoid the situation where a blank dashboard is shown to the user because of the previous tab scroll position. This change does not affect internal tab selections.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2024-05-08.at.11.22.55.mov
Screen.Recording.2024-05-08.at.11.21.39.mov

TESTING INSTRUCTIONS

Check the videos for instructions.

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

@michael-s-molina michael-s-molina requested a review from a team May 8, 2024 14:33
@@ -603,11 +603,6 @@ export function setActiveTab(tabId, prevTabId) {
return { type: SET_ACTIVE_TAB, tabId, prevTabId };
}

export const SET_ACTIVE_TABS = 'SET_ACTIVE_TABS';
export function setActiveTabs(activeTabs) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This was not being referenced anywhere.

@@ -35,16 +35,4 @@ describe('DashboardState reducer', () => {
),
).toEqual({ activeTabs: ['tab2'] });
});

Copy link
Member

Choose a reason for hiding this comment

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

Is this the test I've seen randomly failing on CI? If so, then die, test!

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 8, 2024
@michael-s-molina michael-s-molina merged commit 9e4ba67 into apache:master May 8, 2024
31 of 32 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 May 9, 2024
imancrsrk pushed a commit to imancrsrk/superset that referenced this pull request May 10, 2024
michael-s-molina added a commit that referenced this pull request May 13, 2024
jzhao62 pushed a commit to jzhao62/superset that referenced this pull request May 16, 2024
EnxDev pushed a commit to EnxDev/superset that referenced this pull request May 31, 2024
@sfirke
Copy link
Member

sfirke commented Jun 26, 2024

This is a great fix - I kept noticing it during my testing 😄

@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
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 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 lgtm This PR has been approved by a maintainer size/S v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.2 🚢 4.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants