Can we have a feature where we can collapse tasks and its subtasks in list view, similar to how projects and sub project view work?

Basically the title. I would like to collapse tasks (if any subtask exist) for screenshot below.

See below for how projects can collapse.
image