Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New pattern - Filter a data table #264

Closed
IxDbloke opened this issue Jun 25, 2021 · 5 comments
Closed

New pattern - Filter a data table #264

IxDbloke opened this issue Jun 25, 2021 · 5 comments
Labels

Comments

@IxDbloke
Copy link

IxDbloke commented Jun 25, 2021

Background

This is a common pattern for case management systems built for internal Home Office staff. It's used in DSA (Unadjusted), Ludus, Atlas and Identify and prioritise immigration cases (IPIC).
During 2020 we brought together different designers from the Home Office to identify use cases and patterns from their services. The following components were very common and tend to work together as a single pattern:

  • Data tables
  • Filtering
  • Search
  • Tabs

A common example is the Ministry of Justice pattern which HO teams can re-use for a lot of use cases.
https://moj-design-system.herokuapp.com/components/filter

image

Isobel Seacombe is considering a similar pattern using accordions for the Ludus service -

image

One variation ion the MOJ version is that the filter flags which filters are selected but not what the filter values are. So, I might filter by Status = New case but the summary will only show Status (remove)

Karwai developed an example pattern for her Wildcats service -

https://test-mock-wildcat-service.herokuapp.com/list

image

The main differences are:

  • visitors open a filter panel using a show/hide link
  • there's no indication which filters are active (although we can modify this pattern to remind visitors they're looking at a filtered view)

Query builder

For the Atlas service Harshna developed a more sophisticated filter which enables case managers to look for specific cases based on searching for partial information such finding a person with only a first name, in a city.

image

Case managers go through the following steps:

  • pick something to filter eg 'type'
  • apply a condition - such as a date range or a combination of values. For a 'status' I might pick the values 'new', 'open' and 'for review'
  • add a second thing to filter (anecdotally, it seems like Atlas users usually only need one thing to filter at a time)

Typeahead with check boxes

If a data table contains a column which has a lot of potential values (such as: all the countries in the world) designers can use the following pattern:

image

Case managers use it by:

  • typing in an input field to narrow the number of choices down
  • selecting a value using a check box
  • reviewing their choices, which are displayed beneath the input box. They can remove any they don't need by clicking on a 'clear' button.

image

User research

We discovered the following tasks from running user research on case managers. These are probably quite common:

  • Check for new cases
  • Triage new cases and assign them to other case managers
  • View cases assigned to me
  • Investigate the most urgent cases
  • Check other case managers' work during the day
  • Complete ad hoc queries (such as 'bring back all the citizens who use our service named Dave in Manchester')

We observed case managers having to use filters to perform basic tasks, such as viewing new cases or seeing their own workload for the day. It's important to offer search and filters for specific tasks rather than relying on them to enable repetitive tasks.

A set of tabs representing the status of each case can act like a filter -

image

The advantage of this is:

  • we can show summaries of the total numbers of cases with each status
  • case managers can quickly change between views without clicking on multiple inputs

This component is already part of the NotGov system.

Our case managers tended to multi-task - accessing different government systems through different browser tabs and often through more than one screen. For example, they might check email through one screen and access our service through another. We observed them forgetting filters were active, adding more filters and getting blank results for their table.

Case managers have also used more sophisticated platforms elsewhere in the government. Some of these allow them to save their search critera and share them with other staff.

Accessibility

A lot of the case managers we researched used laptops with Internet Explorer so we need to consider resilient design patterns.
Case managers used both small and large screens. We observed a case manager who worked from home and had bought her own 27 inch screen, so we need to be consider responsive design.

HTML

The majority of filters we've seen are input fields or check boxes so there are plenty of examples of accessible mark-up available. Check boxes need to be contained within a fieldset and have a legend for a caption.

<fieldset>
<fieldset__legend>Filter by vehicle</fieldset__legend
<input type="checkbox" id="vehicle1" name="vehicle1" value="Bike">
<label for="vehicle1"> bike</label><br>
<input type="checkbox" id="vehicle2" name="vehicle2" value="Car">
<label for="vehicle2"> car</label><br>
<input type="checkbox" id="vehicle3" name="vehicle3" value="Boat">
<label for="vehicle3"> boat</label><br> 
</fieldset>

We can offer show/hide patterns or accordions for progressive disclosure.
We need to develop accessible HTML and CSS for the typeahead check boxes.

@IxDbloke IxDbloke changed the title Filter a data table (new pattern) New pattern - Filter a data table Jun 25, 2021
@karypun karypun mentioned this issue Jun 27, 2021
@kelliedesigner
Copy link

Hey this is great, just a heads up that we're revisiting filtering again at MOJ, and plan to develop the variations and docs of the component. It would be great to pool findings!

@jamesmckechnie
Copy link

jamesmckechnie commented Jul 1, 2021

Typeahead with check boxes

Accessible React functionality can be taken from Checkbox multi select (for atlassian).

The look and feel of the component should similar to that found onaccessible-autocomplete on alphagov github.

Functionality

When user clicks on the component, they should see all options available.

When user clicks an option, the checkbox will show checked, the option will appear in the text field as a tag and the options list will stay open and a “delete all” cross will appear on right had side.

To delete, user can either:

  • press cross on the tag
  • press backspace on keyboard to delete last option
  • press cross on right hand sixe to delete all

When user navigates away, the options will remain inside the select component and select component will revert back to default styling.

User research

This component is currently being researched and accessibility tested in its project.

Screenshot 2021-07-01 at 11 02 52

Screenshot 2021-07-01 at 11 03 21

@kelliedesigner
Copy link

Here's out latest work on Filters that we will be looking to publish in the MOJ Pattern Library:
ministryofjustice/moj-frontend#197

@kelliedesigner
Copy link

The latest documentation on Filters has now been published to the MOJ Pattern Library:
https://design-patterns.service.justice.gov.uk/components/filter/

Feedback welcome!

@reyrrep
Copy link

reyrrep commented Sep 8, 2021

@jamesmckechnie hello, you said earlier 'This component is currently being researched and accessibility tested in its project.' Do you have any news yet?

@UKHomeOffice UKHomeOffice locked and limited conversation to collaborators Apr 25, 2022
@LaurencePiercy LaurencePiercy converted this issue into discussion #362 Apr 25, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

5 participants