“Jump to next unresolved thread” button in threads don't jump to the next thread
Summary
!23123 (merged) refactored the “Jump to next…” button functionality in merge request threads.
As a side effect, it broke the current functionality, where if you click on “Jump to next…” in a thread, it always jumps to the right thread, even if you click the same button in the same thread multiple times.
For example: There are 4 threads. If one clicks on the “next thread” button in thread 1, it jumps to thread 2. But then, if one manually scrolls and clicks on the “next thread” button in thread 4, it jumps to thread 3. The “next thread” buttons in the threads should jump to the next visible thread, so clicking on the button in thread 4 should jump to thread 1.
Steps to reproduce
- Create at least 4 threads in a merge request
- Navigate to the Overview tab
- Click on the “next thread” button in thread 1 and it correctly jumps to thread 2
- Click on the “next thread” button in thread 4 and it incorrectly jumps to thread 3
What is the current bug behavior?
Clicking the “Jump to next…” button in a thread does not jump to the next expected thread, it jumps based on which buttons you've previously clicked.
What is the expected correct behavior?
The “next thread” buttons in the threads should jump to the next visible thread in a top-to-bottom order. So thread 1 should always jump to thread 2.