Took a few minutes to solve a real world UI problem