expand/collapse note frontend and api