make todolist auto resize with constraints