[go: up one dir, main page]

Auto-scroll to current dir/file in the repository file tree browser

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When user navigates to a file page, the file name can get obscured in the list. As part of this issue we should implement auto-scrolling to the current directory/file upon page load and when a directory/file is selected from the tree (not the FTB).

This is part of a bigger effort to implement a file tree browser (FTB) in the repository.

Steps to Reproduce

Environment: Production, Browser: Chrome 142 / Arc, OS: macOS, Viewport: Desktop, Screen Reader: None

  1. Navigate to a file page, where the file name appears below the fold in the file tree list. Ex: https://gitlab.com/jerasmus/jerasmus-test-project/-/blob/master/1mb.exe
  2. Notice that the current selected file is not obvious to the user, since we do not have functionality that scrolls to the current file in the list.

Expected vs Actual

  • Expected: The file tree browser scrolls to the current selected element on load.
  • Actual: The file tree browser does not scroll to the current selected element on load.

Evidence

no-scroll.mov

Additional Info

  • Console errors:
  • Reproducibility: Always
Edited by 🤖 GitLab Bot 🤖