Commit 660cf92b authored by Igor Drozdov's avatar Igor Drozdov

Introduce Prev/Next pagination to branches

Gitaly provides page-token pagination for branches instead of
offset pagination.

That means that we can't easily access a particular page of
the branches list without fetching all branches from Gitaly
and iterate them manually.

However, page-token pagination allows us to retrieve next bunch
of branches. We can use it in order to implement prev-next
pagination which should work more performant.
parent c94bbc2b
......@@ -60,7 +60,10 @@
%ul.content-list.all-branches
- @branches.each do |branch|
= render "projects/branches/branch", branch: branch, merged: @merged_branch_names.include?(branch.name), commit_status: @branch_pipeline_statuses[branch.name], show_commit_status: @branch_pipeline_statuses.any?
= paginate @branches, theme: 'gitlab'
- if Feature.enabled?(:branches_pagination_without_count, @project, default_enabled: true)
= paginate_without_count @branches
- else
= paginate @branches, theme: 'gitlab'
- else
.nothing-here-block
= s_('Branches|No branches to show')
......
---
name: branches_pagination_without_count
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50759
rollout_issue_url:
milestone: '13.9'
type: development
group: group::source code
default_enabled: true
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment