Skip to content

batches: migrate list page, enable filtering to multiple statuses

Administrator requested to merge kr/batch-change-list-filters into main

Created by: courier-new

Closes #31164 (closed).

Swaps out the filters on the batch changes index (list) page from a set of radio buttons to a new MultiSelect, which defaults to open + draft (or just open, if running batch changes server-side is not enabled).

image

Design based on this Figma screen, but with a multi-select in place of the single select dropdown and without the search field.

Granted, it looks a little odd right now for users without server-side execution enabled, since there are only the two options for open and closed. But I don't think it's necessarily worth the effort and extra code to preserve the radio buttons when the flag is disabled when we'll only be supporting that case for at most a couple more releases.

Most of the code changes here, as you might notice, are actually because I migrated the list view for this page from the older requestGraphQL and FilteredConnection to Apollo, useConnection, and the new filtered connection component composition API as part of this work. As part of that migration, I was also able to simplify the logic around if batch changes is licensed and if there are any batch changes created yet (to auto-switch to the "Getting started" tab if not) by capturing them both in a single query, independent from the connection.

Test plan

This page is heavily covered by storybook stories as well as an integration test. I've added an additional storybook story for the namespace version of this page. I also verified manually that things were functioning as expected as thoroughly as I could.

Merge request reports

Loading