Make sidebar transition smoother

Part of #168.