Added an annotations-only controls mode when selecting an annotations mode. This is to make more efficient use of the screen width real estate when viewing preview on mobile or embed experiences.
Implementation
This feature is currently under a responsive-web feature flip which is controlled by EUA. This is why I chose to add it via configuration as to not force any changes onto any consumers of this library. This functionality can be toggled on by setting enableAnnotationsOnlyControls option to true when instantiating new Preview()
I also opted in to making most of the changes via CSS rather than via React props (which was my first attempt). This to me is a bit more elegant and cleaner as it doesn't require massive changes to the React components.
Added an annotations-only controls mode when selecting an annotations mode. This is to make more efficient use of the screen width real estate when viewing preview on mobile or embed experiences.
Implementation This feature is currently under a responsive-web feature flip which is controlled by EUA. This is why I chose to add it via configuration as to not force any changes onto any consumers of this library. This functionality can be toggled on by setting
enableAnnotationsOnlyControls
option to true when instantiatingnew Preview()
I also opted in to making most of the changes via CSS rather than via React props (which was my first attempt). This to me is a bit more elegant and cleaner as it doesn't require massive changes to the React components.
Also open to any changes to config naming
Design
https://zpl.io/dxDDLEp
Demo
DocViewer
ImageViewer
With old "Exit Annotation" Button
Keyboard navigation - a11y