Skip to content

Add pagination to secrets table

Miranda Fluharty requested to merge 424457-secrets-table-pagination into master

What does this MR do and why?

🎏 This page is behind the ci_tanukey_ui feature flag

Add pagination to secrets table

  • add pagination component to secrets table
  • write client resolver that returns a slice of the mock data based on offset/limit query variables
  • make pagination update query variables in app components
  • keep url params up to date with page

MR acceptance checklist

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

Screenshots or screen recordings

Before After
Screenshot_2024-03-19_at_22.02.23 Screen_Recording_2024-03-19_at_22.00.49

How to set up and validate locally

Check out the branch and enable the feature flag for a root group:

git checkout 424457-secrets-table-pagination
echo "Feature.enable(:ci_tanukey_ui, Group.find_by_full_path(\"gitlab-org\"))" | gdk rails c
  1. have developer-or-higher access to a root group and enable the feature flag for that group
    • note: make sure this is a root group - enabling the flag for a subgroup will have no effect because we check for the flag on the project.group.root_ancestor/project.root_ancestor
  2. navigate to the secrets page for the root group, i.e.: http://gdk.test:3000/groups/gitlab-org/-/secrets/
    • note: the secrets displayed on the page come from mock data for now
  3. navigate back and forth between pages of secrets and confirm that the url params and browser history are updated when you do so

optional: test this for a project in the group:

  1. navigate to the secrets page for some project that belongs to the group, i.e. http://gdk.test:3000/gitlab-org/gitlab-test/-/secrets
  2. repeat step 3. above

to run tests:

yarn install
yarn jest ci/secrets

Related to #424457 (closed)

Edited by Miranda Fluharty

Merge request reports