Update 'updateHeaderHeight' function in pipeline page

According to !159610 (comment 2035126682) I have divided the calculation function into different issue to focus on.