Move gridview size calculation logic to viewmodel + tests