This PR adds several features and new functionality to the EditionCrafter component. Specifically:
Adds the ability to pass a documentInfo prop to the component that is an object keyed with document names and containing configuration info for multiple different documents. For example (from the Storybook examples):
If multiple documents are passed to the component this way, then by default the viewer will display folios from the first document in the first pane and from the second document in the second:
You can then use a dropdown to select different documents for each pane:
This feature enables easy comparison of folios from multiple documents or different versions of the same document between the different panes.
Optional three-pane view: There is now a threePane prop that can be optionally passed to the component which will display a third view pane in the viewer. The third pane begins "tucked away" on the right side of the screen by default, and can be resized by dragging the divider.
Simplification of component props: As evidenced in the example two bullet points above this, information such as the document/project name, threePanel flag, and documentInfo can now be passed directly to the component as props, rather than being bundled into a config JavaScript object and passed as a single prop. In the case of a single document rather than a variorum, the new prop structure looks like, for example:
In this PR
This PR adds several features and new functionality to the
EditionCrafter
component. Specifically:Adds the ability to pass a
documentInfo
prop to the component that is an object keyed with document names and containing configuration info for multiple different documents. For example (from the Storybook examples):If multiple documents are passed to the component this way, then by default the viewer will display folios from the first document in the first pane and from the second document in the second: You can then use a dropdown to select different documents for each pane: This feature enables easy comparison of folios from multiple documents or different versions of the same document between the different panes.
Optional three-pane view: There is now a
threePane
prop that can be optionally passed to the component which will display a third view pane in the viewer. The third pane begins "tucked away" on the right side of the screen by default, and can be resized by dragging the divider.Simplification of component props: As evidenced in the example two bullet points above this, information such as the document/project name,
threePanel
flag, anddocumentInfo
can now be passed directly to the component as props, rather than being bundled into aconfig
JavaScript object and passed as a single prop. In the case of a single document rather than a variorum, the new prop structure looks like, for example: