Content
View differences
Updated by Jens Ulferts over 2 years ago
**As** a user
**I want to** These are just notes to have a visual differentiation between facilitate the properties of the list and those of a project
**so that** I can more easily discern the two implementation. The authoritative specification is in <mention class="mention" data-id="49687" data-type="work_package" data-text="#49687">#49687</mention>
**Acceptance criteria** ### Acceptance criteria
* "+Project" button is moved, the behaviour of leading to the project creation form is unchanged
* Filters button is moved, the behaviour of toggling the form remains unchanged
* Filters button shows number of active filters
* it is not 100% clear yet when the number will be increased
* It could be counted up whenever a filter is added even though it is not yet completed (e.g. adding the "Name or identifier" filter with the "contains" operator requires the user completing the filter by inserting a string to search for)
* It could be counted up only after the filter is completed and applied. applied.
* Adding the "Configure view" button is out of scope
**Technical notes** ### Technical notes
* All of this is currently rendered by the [https://github.com/opf/openproject/blob/dev/app/views/projects/index.html.erb](https://github.com/opf/openproject/blob/dev/app/views/projects/index.html.erb) file
* There is already a filter component but it does not contain the filter toggle button (yet)
* The component renders the filters. That part can probably stay the way it is for now.
* That filter component ideally becomes generalized in a way that it can be applied to other pages as well
* Takes a query object to know about the available and selected filters regardless of whether the query is a project query or e.g. a user/member query.
* The filter toggle button and the "+ Project" button are in the IndexPageHeaderComponent
* Moving the filter toggle button inside the FiltersComponent would bundle functionality but might make it harder to have the "+ Project" button next to it
* This could be worked around by having [slots](https://viewcomponent.org/guide/slots.html) for the buttons
* There is a [Stimulus ProjectController](https://github.com/opf/openproject/blob/dev/frontend/src/stimulus/controllers/dynamic/project.controller.ts) that does too many things. It is responsible for the filter behaviour but also includes functionality for the description toggling.
* A new controller should be created that is only concerned with the filters. The rest can stay in the ProjectController
**I want to**
**so that** I can more easily discern the two
**Acceptance criteria**
* "+Project" button is moved, the behaviour of leading to the project creation form is unchanged
* Filters button is moved, the behaviour of toggling the form remains unchanged
* Filters button shows number of active filters
* it is not 100% clear yet when the number will be increased
* It could be counted up whenever a filter is added even though it is not yet completed (e.g. adding the "Name or identifier" filter with the "contains" operator requires the user completing the filter by inserting a string to search for)
* It could be counted up only after the filter is completed and applied.
* Adding the "Configure view" button is out of scope
**Technical notes**
* All of this is currently rendered by the [https://github.com/opf/openproject/blob/dev/app/views/projects/index.html.erb](https://github.com/opf/openproject/blob/dev/app/views/projects/index.html.erb) file
* There is already a filter component but it does not contain the filter toggle button (yet)
* The component renders the filters. That part can probably stay the way it is for now.
* That filter component ideally becomes generalized in a way that it can be applied to other pages as well
* Takes a query object to know about the available and selected filters regardless of whether the query is a project query or e.g. a user/member query.
* The filter toggle button and the "+ Project" button are in the IndexPageHeaderComponent
* Moving the filter toggle button inside the FiltersComponent would bundle functionality but might make it harder to have the "+ Project" button next to it
* This could be worked around by having [slots](https://viewcomponent.org/guide/slots.html) for the buttons
* There is a [Stimulus ProjectController](https://github.com/opf/openproject/blob/dev/frontend/src/stimulus/controllers/dynamic/project.controller.ts) that does too many things. It is responsible for the filter behaviour but also includes functionality for the description toggling.
* A new controller should be created that is only concerned with the filters. The rest can stay in the ProjectController