Content
View differences
Updated by Henriette Darge 25 days ago
# **Acceptance criteria**
* The `Primer::OpenProject::FilterableTreeView` should be extended for this to support async loading and filtering
* **Filtering:** When filtering:
* Each search triggers a server request (with a debounce)
* all search results are shown, with their complete (parent) hierarchy being expanded
* matching text is highlighted in the returned tree
* there is a no-results message is shown when the server returns an empty tree
* there is a loading skeleton while a request is in flight
* **Expansion state**:
* Nodes that were expanded before filtering are still expanded after When removing the filter is cleared
* **Selection:** filter:
* Nodes that were checked before filtering are still checked after the filter The previous collapsed/expand state is cleared restored
* Nodes that are checked but hidden by the current filter are still submitted with the form The previous selection is restored (multi selection mode)
* **Include sub-items:** Mutli selection mode:
* When "Include sub-items" is checked, With include sub-items checked: when selecting a parent node, it activates **all children** not only the form submission includes this information so the server can resolve all descendants
* For the currently visible tree, include sub-items behaves as before (all children are selected and disabled) ones.
* **Styling:**
* The search bar is moved to the first position, then the segmented control, then the checkbox
**Project selector**
* The global project selector can expand/collapse hierarchy nodes
* Per defaullt, all nodes are collapsed
# **Technical notes**
* The limit for the project selector remains
# **Out of scope**
* Remembering what was collapsed and what was expanded after page reload
* The `Primer::OpenProject::FilterableTreeView` should be extended for this to support async loading and filtering
* **Filtering:**
* Each search triggers a server request (with a debounce)
* all search results are shown, with their complete (parent) hierarchy being expanded
* matching text is highlighted in the returned tree
* there is a no-results message is shown when the server returns an empty tree
* there is a loading skeleton while a request is in flight
* **Expansion state**:
* Nodes that were expanded before filtering are still expanded after
* **Selection:**
* Nodes that were checked before filtering are still checked after the filter
* Nodes that are checked but hidden by the current filter are still submitted with the form
* **Include sub-items:**
* When "Include sub-items" is checked,
* For the
* **Styling:**
* The search bar is moved to the first position, then the segmented control, then the checkbox
* The global project selector can expand/collapse hierarchy nodes
* Per defaullt, all nodes are collapsed
# **Technical notes**
* The limit for the project selector remains
# **Out of scope**
* Remembering what was collapsed and what was expanded after page reload