Skip to content

Highlight line which includes search term is code search results

What does this MR do?

Highlight line which includes search term is code search results.

There's also some existing UX proposals in #16429 (closed):

To help users read the results we give them I propose we add line highlighting + bold key word highlighting to those results.

I've implemented the line highlighting as the smallest valuable change, because highlighting specific search term occurrence within line is more tricky and error prone.

Screenshots

Obtained from a fresh development copy (logged as root user):
http://localhost:3000/search?utf8=%E2%9C%93&snippets=&scope=&repository_ref=master&search=anonymizeIp&project_id=8

example-highlight

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Need help to test with Internet Explorer, Microsoft Edge and Safari, because they are not available in my operating system.

Security

No need for security review.

Closes #196384 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports