Links to comments on commits hidden in some cases
Summary
Clicking on links in notification emails for when people comment a commit doesn't always bring us to the comment. The reason is because it may happen on a collapsed diff (and the link doesn't auto-expand the relevant diff) or that it happens on a multi-page view of the commit (and the link doesn't show us the relevant page).
Steps to reproduce
- Go to this link (a direct link to a comment as returned by a notification email): https://gitlab.gnome.org/GNOME/gimp/-/commit/6a9d449eac943dc8e0357ee41387c5e357d39f5c#note_1250595
Expected result: the web browser should directly scroll to the comment.
Actual result: it doesn't, and I can't find it easily. At the top, we can even see a button saying there are 2 comments on the commit:
Yet the button is actually grayed out and doesn't propose anything. It turns out that the issue is that there is one file which is collapsed (a new file, so the diff is big) and that was where the comment were. Clicking the link should have expanded this automatically.
Second case even worse:
- Go to this link: https://gitlab.gnome.org/GNOME/gimp/-/commit/0cb3e75f791c16206db791fb27edbbc8c248221a#note_1250388
Here the diff is so big that there are 9 pages of diff. So if I want to find where the comment is, I should click each and every page. But then when I do, the #note_1250388
part of the URL disappears so I don't scroll to the comment. Moreover some diffs are collapsed in some of the page. So each time, I should check the whole diff, in case some are collapsed, and search for the comment. And since loading each page is far from instant, I would spend a lot of time. Needless to say, I tried and stopped after having wasted a few minutes.
Expected result: the link in the notification should bring me to the right page of the commit and make sure the annotated part of the diff is expanded, so that the browser scrolls us to the right place.
Example Project
Cf. the 2 links above in GIMP's repository.
What is the current bug behavior?
We click a link in an email notification and it sometimes doesn't bring us to the comment. And finding it is so hard when this happens, that I usually abandons after a few minutes.
Also what's up with this comments button? Why is it always grayed-out. It would be nice if it were also to allow us to jump on comments on a commit, or something (this way, we could find it without having received the notification).
What is the expected correct behavior?
A link should bring us to the comment it is supposed to link to.
Relevant logs and/or screenshots
Cf. above.
Output of checks
Results of GitLab environment info
Whatever Gitlab version and environment is used for GNOME's Gitlab instance.
Results of GitLab application Check
Same.