-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
fix: Scroll to top when selecting a global dashboard tab #28386
Conversation
@@ -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) { |
There was a problem hiding this comment.
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'] }); | |||
}); | |||
|
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(cherry picked from commit 9e4ba67)
This is a great fix - I kept noticing it during my testing 😄 |
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