Frontend configuration

This page describes the frontend configuration options for Fonto Review. It describes ways to customize the UI and annotations to suit your specific usecase.

The client-side UI configuration of Fonto Review is described in the README file of Fonto's reference configuration repository. This describes the following configuration options:

Alongside the UI configuration, there are a few other options, which are listed below.

Annotation target types

Fonto Review offers several annotation target types besides just text ranges. Target types describe where the annotation is located in the document. The available annotation target types are listed below.

Text Range

These are the most basic annotation target types that are available. These point to a text range in the document, with a start and end container ending in a textnode. Configuring text range target types is done via the registerTextRangeReviewAnnotationType registration API.

Target type in database: TEXT_RANGE_SELECTOR

Objects

Object targets can point to any single object in the document. Objects in this sense are for example images and formulas. Configuring object target types is done via the registerObjectReviewAnnotationType registration API.

Target type in database: OBJECT_SELECTOR

Publications

Publication targets point to the loaded document in general. They are not attached to any range in the document. Technically they point to the loaded root document. Configuring publication target types is done via the registerPublicationReviewAnnotationType registration API.

Target type in database: PUBLICATION_SELECTOR

Server side filtering

Read more on server side filtering in the CMS integration guide.

Change proposals

This feature is also sometimes called change suggestions.

Fonto Review has a specific annotation type called "Change proposals". Change proposals allow users to fill in a suggestion for a change in the annotation card. If you model the data for change proposals as described below, automatic merging of the change proposal can be offered. This feature is only enabled if your data model uses a proposedChange property inside the annotation's metadata. This is used by default in the reference configuration on GitHub.

Fonto Review will provide your annotation card with an callback function that merges the text proposed by aforementioned property into the document. Fonto Review also provides the reviewAnnotation that gets passed into the card annotation card with a proposalState property that indicates what the current proposalState is (e.g. that it cannot be merged because the originating text changed or the proposal would yield a schema invalid situation). The proposalState property will only be set if the annotation is selected.

The default ReviewAnnotationAcceptProposalButton component can be used to have the same behaviour as the reference configuration implements.

Review state polling interval

Fonto Review uses a periodic polling system to check if annotations have been changed in the CMS. The interval used by the background polling mechanism, which defaults to 7 seconds, can be changed. The default interval is based on achieving a decent user experience, avoiding users making changes which they will eventually lose. The interval can be changed using the remote-review-state-update-interval-ms configuration variable.