Improve logic for overlapping blame chunks (blob blame)
What does this MR do and why?
I noticed that sometimes when a line number (hash) is in the URL, the overlapping chunk does not render blame information. This MR improves the logic for overlapping blame chunks to catch these edge cases.
Screenshots or screen recordings
Before | After |
---|---|
Some blame information is missing | Blame information for the overlapping chunk is rendered |
How to set up and validate locally
- Enable the
graphql_git_blame
,blob_blame_info
andhighlight_js_worker
feature flags - Open a
.json
file via the repository files browser - Click the
Blame
button in the blob header - Select a line number
- Refresh the page
- The page should automatically scroll to the selected line
- When scrolling down the page the blame information should render as expected
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #425267 (closed)
Edited by Jacques Erasmus