better sidebar handling from mobile to desktop