Skip to content

Broken search results for long project/group name

Tomas Bulva requested to merge 387034-links-to-comments-are-broken into master

What does this MR do and why?

Fix missing links

Screenshots or screen recordings

Long project name (what is currently broken):

before after
Screenshot_2023-01-23_at_10.15.55 Screenshot_2023-01-25_at_16.21.14

Short project name (is staying the same):

before after
Screenshot_2023-01-23_at_10.19.22 Screenshot_2023-01-19_at_15.11.18

How to set up and validate locally

  1. Make sure you have advanced search enabled.
  2. Create a new empty project: http://127.0.0.1:3000/projects/new#blank_project
  3. Give it a comically long name: this is a super long test project name that is running forever and will hug the whole line in the search results and breaks everything
  4. In this new project create a new issue. It can be empty but it's more realistic if there is some description. I used https://www.lipsum.com/feed/html
  5. In this new issue create a new comment. It should contain the word YOUR_SEARCHED_TERM that you want to search for.
  6. Visit any group or project member pages such as https://gdk:3000/search?scope=notes&search=YOUR_SEARCHED_TERM
  7. You should see, in the search results, a link that will take you to the comment itself.

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 #387034

Edited by Tomas Bulva

Merge request reports

Loading