Experimental support for collapsable headers

(cherry picked from commit e2ed3b9d8dfab09f1b1861dbc8e74f08e137ebcc)