In Patron Requests table view maintain sort

Description

Context

If a user changes the sort order of the request table, and subsequently drills into an individual request and comes back to the request table, the table reverts to it’s default sort. Understanding that the web application is stateless, what can be done to maintain the sort?

Goal

Implement a mechanism to persist ad-hoc changes made by a user to data grids. Applied initially to patron request grids.

Example Scenario

  • Given the Exception Requests grid on the /patronRequests page

  • When a user has changed the sort order in the grid

    • And subsequently (but not necessarily immediately) navigates away from and then back to the/patronRequests

  • Then the Exception Requests grid is sorted as last set by the user prior to navigating away

    • And there is no change to other grids on that page (ie, changes are persisted only to the affected grids changes)

In Scope

  • All patron requests grids on /patronRequests

  • All patron requests grids on /libraries

  • Per session persistence

Out of Scope

  • Data grids other than specified patron request grids

    • While the persistence mechanism may be applicable to other grids, extending to those is out of scope for now.

    • Once the behaviour has been used and road tested, we can come back to looking at extending this to other.

  • Persisting settings or preferences beyond

    • the current session

    • the current user - changes I make should not affect what you see at the same time (this is expected to be isolated anyway, as current session implies current user session)

is fixed by

Activity

Show:

Gill Osguthorpe October 10, 2024 at 3:46 PM

QA: 10/10/24

Tested in several grids, including both server side and client side grids:

  • Sorting, moving to a different page then returning to the page. On pages with one grid and multiple grids, and in collapsed and open accordions.

  • Sorting then filtering. Checked that sort order is retained. Then moved to another page and returned to check the sort order.

  • Sorting then searching.

Casey Henderson October 10, 2024 at 2:59 PM

Now also supports persisting sort settings for client data grids

Casey Henderson October 10, 2024 at 12:26 PM
Edited

QA branch here: https://libraries-dcb-hub-admin-scaffold-uat-git-dcb-1087-knowint.vercel.app/

As this is a major change to the data grids (particularly to the data grid types, which control all sorts of stuff), I’d recommend testing that filters, search and click-through are all working as expected as part of QA.

The sort persistence changes are also applied to all grids as there’s no reasonable way of making them apply to only the patron request grid. The framework for persisting other data grid user settings has also been included to support the future implementation of https://openlibraryfoundation.atlassian.net/browse/DCB-1133.

Done

Details

Assignee

Reporter

Components

Fix versions

Sprint

Priority

Created May 2, 2024 at 2:06 AM
Updated October 25, 2024 at 2:12 PM
Resolved October 10, 2024 at 3:41 PM

Flag notifications