Skip to content

[FIX] Scroll active sidebar item into view when sidebar opens#3678

Open
amit-noy wants to merge 1 commit into
mlrun:feature/refactor-navbarfrom
amit-noy:ML-12665
Open

[FIX] Scroll active sidebar item into view when sidebar opens#3678
amit-noy wants to merge 1 commit into
mlrun:feature/refactor-navbarfrom
amit-noy:ML-12665

Conversation

@amit-noy
Copy link
Copy Markdown

@amit-noy amit-noy commented May 27, 2026

📝 Description

When the sidebar opens, the active navigation item was not brought into view. Users navigating to items below the fold (e.g. "ML functions" when collapsible sections are expanded) would see the sidebar open at the top with no scroll to the active item.


🛠️ Changes Made

  • When the sidebar opens, it now waits for the expand animation to finish (300ms) and then scrolls to the active item if it's out of view
  • Previously the scroll only happened when navigating to a new page - now it also happens when the sidebar itself opens

✅ Checklist

  • I have given the PR a well-structured title describing the domain and the specific change that was made
  • I tested the changes in the browser (locally or via preview build)
  • I confirmed that existing tests pass
  • I added or updated unit / integration tests (if needed)
  • I checked that this change doesn’t introduce new console warnings or lint / formatting errors
  • I updated the relevant Jira ticket with the appropriate details and status

🔗 References


🚨 Potentially Breaking Changes

  • Yes
  • No

Includes DRC change

  • Yes
  • No

If yes -> requires bump NPM version


🔍 Additional Notes

block: 'nearest' is used so the scroll only triggers if the item is actually out of view - if it's already visible, nothing moves.


📸 Screenshots / Demos


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant