optimize layout when hiding parts