Add programmatic API for sidebar collapse menu item.