box-ui-elements icon indicating copy to clipboard operation
box-ui-elements copied to clipboard

fix(preview-sidebar): fix version not updating on small screens

Open greathmaster opened this issue 3 years ago • 1 comments

Overview

Currently, if a version is selected in the Preview sidebar and the Preview sidebar is closed, it reverts to the latest version of the document.

This creates problems for small screens where the Preview sidebar is moved to the bottom and becomes a vertical sliding drawer. When an old version is selected and the drawer is closed, a user cannot view the old version because, it reverts to the latest version of the document.

This PR fixes the issue by removing the version reset performed when the drawer is closed.

Note this would also affect the regular desktop experience. If a user closes the Preview Sidebar after selecting the version, it would remain on that version instead of changing back to the latest version.

Demo

Before

Preview-Drawer-Before

After

Preview-Drawer-After

greathmaster avatar Oct 17 '22 19:10 greathmaster

@greathmaster, has the desktop change been approved by the relevant stakeholders?

jstoffan avatar Oct 17 '22 19:10 jstoffan