# Feature OP-12310 - Replace current filter expand with a filter drop modal 

Project: OpenProject
Status: in specification
URL: https://community.openproject.org/work_packages/OP-12310

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Parimal Satyal |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

### Context

Today, the filter button in a work package index (in Table, List or Cards view) works as an expand.

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/53692/content">

The current approach has a number of disadvantages:

*   it takes more horizontal space than necessary and can take a lot of vertical space
    *   when there are lot of criteria, the expand can fill the entire viewport
*   it is a non-standard UI component and behaves differently than the other button that affects filter criteria (i.e, Include projects)
*   filters are applied immediately with every new criteria, vs with an &quot;Apply&quot; button once the user has selected all the necessary criteria, which has a performance overhead (since a new query is made with every change)

This feature aims to fix these three issues by replacing the filter expand with a filder drop modal.

### **Acceptance criteria**

**<img class="op-uc-image op-uc-image_inline" style="width:783px;" src="/api/v3/attachments/53525/content">**

*   On non-mobile devices, clicking on the &quot;Filters&quot; button displays a drop modal:
    *   Width: 630px
        *   **\[open\]** or should the width depend on available space?
    *   Max-height: 80% of view port
        *   If the content overflows, the modal will allow scroll between the header and the action bar.
*   The drop modal is composed of these components:
    *   A header, with the title &quot;Filter&quot;
    *   The same filter options as today
    *   An action bar (grey background) with two buttons:
        *   Apply (primary)
        *   Clear (secondary)
*   The selected filters are not applied till the user clicks on the &quot;Apply&quot; button.
    *   The button closes the modal and applies the filters to the current view.
*   The &quot;Clear&quot; button clears all filter options on the open modal,
    *   it reinitalises it to the default filter state (only 1 active: status == open).
    *   the reinitialised filter criteria are not applied immediately; the user has to then click on &quot;Apply&quot;
    *   if the user closes the modal by clicking outside of the modal _before_ clicking &quot;Apply&quot;, the changes are not applied
*   On mobile devices, the modal behaves as drop-modals normally do and take the full screen.

### Out of scope

*   This feature does not change or update the actual filtering mechanism, only the behaviour of the _container_ and the point at which it is applied is modified.
*   The filter tab in the work package configuration form will remain unchanged.
