Art gallery will be retained in plans to redevelop Ripon building