How do I make a task a sub or parent

In the Plan page (with the list of tasks) swipe right to make a task a sub-task, or left to promote a sub-task to a main task.