Skip to content

Implement pagination in the file tree browser

What does this MR do and why?

Currently, the File tree browser only loads page 1 of the paginated list for each directory.. This MR displays a Show more button when a directory contains more than 1 page (more than 100 items). When the button is clicked, the next page will be fetched.

⚠️ Note: fetching nested items if the user is currently viewing a nested item that is not on page 1 will be handled in a follow-up.

References

Screenshots or screen recordings

Before After
Screenshot_2025-09-04_at_10.11.27 Screenshot_2025-09-04_at_10.12.21

2025-09-04_10.13.37

How to set up and validate locally

  1. Enable the repository_file_tree_browser feature flag
  2. Navigate a repository/directory containing many files
  3. A show more button should render below lists containing more than 100 items
  4. Clicking Show more should fetch the next page

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #550196 (closed)

Edited by Jacques Erasmus

Merge request reports

Loading