[IMP]planner: rename method to resize_dialog and imporve code.