Skip to content

Sort package list by Published and persist user selection

What does this MR do and why?

This MR:

  • changes the default sort from Name to Published
  • Persist the user choice, notice that we are also persisting the current selection in the URL, the priority is as follow:
  1. If something is in the URL (query string) use what is in the query string
  2. If there is nothing in the URL but there is something in the localStorage use what is in the localStorage
  3. If there is nothing in the URL and nothing in the localStorage use the default Published

Screenshots or screen recordings

PackageSorting

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Go to the package registry and add some packages https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-create-a-new-package-artificially
  2. Go to the list and play with sorting

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #347285 (closed)

Edited by Nicolò Maria Mezzopera

Merge request reports