Go directly to Git Blame from Global Search
Old title to be replaced after Release Post
Users want more information related to when a code search result was last modified
Insight
Users often want to understand more about when a code search result was last modified.
Supporting evidence
Users mentioned that some of the most important information when looking through results of a code search are when it was last updated and who modified it. Often times they are looking for the commit where this portion of the code was changed. In addition, some users also wanted to be able to sort results by when they were last modified as well. - this was broken out into #341039
Action
Since the Git Blame offers much of this information that a user would be looking for related to a specific section of code they are searching, we should make it easier to get to that information. For the first iteration of this, we will include a link from search results that takes the user directly to the Blame page (anchored to the specific line). We should include telemetry with this to observe how often this functionality is utilized. If we find that this is widely used, we may consider a future iteration of providing ways to show the Blame information directly on the results page (or within a drawer on the page).
Tasks
-
Add Git Blame icon to our SVG library (@nickbrandt to complete - gitlab-svgs#262 (closed)) -
When user hovers over any portion of a code line, highlight the line number area (as seen in design) as well as show the new Git Blame icon as well as the current link icon. -
When user hovers over the Git Blame icon, show a tooltip for the icon/link -
When user clicks the Git Blame icon, direct the user to the Blame page for this file, anchored to the line number associated with where they clicked the icon. -
Add this update to our Global Search documentation (perhaps add a short section here)
Resources
Release Notes
Users often want to understand more about code search results, such as when was a file changed or by whom. Now users can easily answer these questions with fewer clicks by using the helpful links in Code Search results.
This change adds an additional link next to lines of code when hovering over results from a Code Search.
https://docs.gitlab.com/ee/user/search/advanced_search.html#gitlab-advanced-search