Releases page anchor tags only work for the first 20 releases
Summary
The Project overview > Releases page automatically scrolls to a specific release entry if the URL includes an anchor tag (i.e. .../-/releases#v0.3
). However, this page only renders the first 20 releases, so if the anchor targets release #21, nothing happens.
Steps to reproduce
- Create a project with 21 releases
- Try to navigate to the Releases page and target the first release using the release's tag name as an anchor (i.e.
.../-/releases#v1.0
).
What is the current bug behavior?
Nothing.
What is the expected correct behavior?
The Releases page should highlight the linked release item.
Further details
Right now this issue occurs because we only render the first 20 releases (#14955 (closed)).
We'll soon be adding pagination to this page (!19912 (merged)), which will allow users to manually page to older releases, but our anchor-focusing logic won't be able to automatically jump to the right page.
Output of checks
This bug happens on GitLab.com.
Possible fixes
I think the best course of action is to wait until we ship #32827 (closed), which will add a dedicated page for each release entry. As part of this feature, we should update all current links use the anchor tag method described above to link to these individual release pages instead.