Skip to content

Fix scroll to hash when blob blame enabled

Jacques Erasmus requested to merge 425267-fix-blame-scroll-to-line into master

What does this MR do and why?

Fixes the scroll to hash when blame is enabled for a blob

Screenshots or screen recordings

Before After
Does not auto-scroll to the selected line Auto-scrolls to the selected line
Screenshot_2023-10-31_at_04.38.23 Screenshot_2023-10-31_at_04.40.09

How to set up and validate locally

  1. Enable the graphql_git_blame, blob_blame_info and highlight_js_worker feature flags
  2. Open a .json file via the repository files browser
  3. Click the Blame button in the blob header
  4. Select a line number
  5. Refresh the page
  6. The page should automatically scroll to the selected line

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #425267 (closed)

Edited by Jacques Erasmus

Merge request reports