Upgrade from 7.x to 7.14.0

This page describes the required upgrade instructions for the 7.14.0 release of Fonto Content Quality. This release removes a number of APIs that are no longer relevant with the move from the sidebar to the new Navigator UI.

ContentQualityAnnotation

The ContentQualityAnnotation type is removed.

APIs that received this type as argument, now receive the annotation id instead.

Where you were using the getCurrentRangeObject function on theContentQualityAnnotation type, you should now use the content-quality-get-context-node-id-and-range operation.

ContentQualityConnector

Overriding the ContentQualityConnector with the connectorsManager variable content-quality-connector is no longer possible. Use a custom CMS client using connectorsManager#setCmsClient instead.

ContentQualityTextWithAnnotationStyle

The props of this component have changed. This component now only renders the annotation text with the corresponding style. If you still want to render other text around the annotation text, you can do so by using a separate Text component inline with the ContentQualityTextWithAnnotationStyle component.

JavaScript

<ContentQualityTextWithAnnotationStyle annotationId={annotationId} />

New API

ContentQualityAnnotationDebugInformation

The props of this component have changed. This component now only accepts an annotationId.

JavaScript

<ContentQualityAnnotationDebugInformation annotationId={annotationId} />

New API

content-quality-get-context-node-id-and-range

This operation has been renamed to content-quality-get-node-id-and-range. Its input operationData and exported operationData also changed. See the table below.

Old

New

annotationId (string)

annotationId (ContentQualityAnnotationIdentifier)

The type of this property changed to a more specific type. It's still a string, so you don't have to change it.

contextNodeIdQuery (XPathQuery)

Removed.

Use a custom transform after this operation to modify the exported operation data if you need it.

Imported operation data

Old

New

contextNodeId (NodeId)

contentQualityAnnotationNodeId (NodeId)

overrideRange (OverrideRange)

contentQualityAnnotationRange (OverrideRange).

range (Object)

Removed.

Use contentQualityAnnotationRange instead.

Exported operation data

Content Quality document operations

The table below describes all the removed operations and the suggested replacement operation.

These replacement operations should all be used in combination with content-quality-get-node-id-and-range to get the data required for the replacement operation(s). Make sure to map the exported operation data of the content-quality-get-node-id-and-range to the appropriate replacement operation's operationData (e.g. map contentQualityAnnotationRange to overrideRange).

Removed operation

Replacement operation(s)

content-quality-insert-inline-frame-element

insert-inline-frame-element

content-quality-insert-inline-frame-element-with-reference

createPermanentIdForReference combined with insert-inline-frame-element.

You will need to transform the data from createPermanentIdForReference to insert-inline-frame-element accordingly.

content-quality-insert-multiple-inline-frame-element

Use a custom mutation instead.

content-quality-toggle-inline-frame-element

toggle-inline-frame-element

content-quality-toggle-inline-frame-element-with-reference

createPermanentIdForReference combined with toggle-inline-frame-element.

You will need to transform the data from createPermanentIdForReference to toggle-inline-frame-element accordingly.

content-quality-replace-node

replace-node

content-quality-replace-text

insert-text

content-quality-set-attributes

set-attributes

content-quality-set-attributes-with-reference

createPermanentIdForReference combined with set-attributes.

You will need to transform the data from createPermanentIdForReference to set-attributes accordingly.

content-quality-execute-operation

No replacement. Use the direct platform operation combined with content-quality-get-node-id-and-range instead.

content-quality-execute-operation-with-reference

No replacement. Use the direct platform operation combined with content-quality-get-node-id-and-range instead.

JavaScript

"my-custom-insert-text": {
	"steps": [
		{
			"type": "operation/content-quality-get-node-id-and-range"
		},
		{
			"type": "operation/insert-text",
			"data": {
				"contextNodeId": "{{contentQualityAnnotationNodeId}}",
				"overrideRange": "{{contentQualityAnnotationRange}}"
			}
		}
	]
}

Example

HttpApiAnnotator

The namespace and name properties within the type object in the request and response are renamed to namespaceURI and localName respectively.

AnnotationsRegexAnnotator

The namespace and name properties within the type object in the metadata are renamed to namespaceURI and localName respectively.

Schema locations of analysis.xml

The schema location for both the analysis-configuration as well as the experimental-analysis-configuration have changed. These are now located at http://schemas.fontoxml.com/content-quality/1.0/analysis-configuration.xsd and http://schemas.fontoxml.com/content-quality/1.0/experimental-analysis-configuration.xsd. Please change your analysis.xml files accordingly.

Namespace URI of annotations

The namespace URI of the LanguageAnnotations and the annotations produced by the LanguageToolAnnotator have changed. See the changes below. The localNames of the annotations are unchanged.

Source

Old namespace URI

New namespace URI

LanguageToolAnnotator

urn:fontoxml:fcq:annotations:language-tool:1.0.0

urn:fontoxml:fcq:annotations:language-tool:1.0.0

LanguageAnnotation

urn:fontoxml:fcq:annotations:language:1.0.0

urn:fontoxml:content-quality:language:1.0.0

ContentQualityManager

The ContentQualityManager has been removed.

  1. The busyChangedNotifier API has been removed. Remove all occurrences in your Editor.

  2. The registerAnnotationType API has been removed. See the new API registerContentQualityAnnotationType.

    The heading of the annotation card will now be rendered by the product. You can safely remove that from the CardContentComponent.

  3. The setActiveAnnotationIds API has been removed. Remove all occurrences in your Editor.

  4. The clearActiveAnnotationIds API has been removed. Remove all occurrences in your Editor.

  5. The isBusy API has been removed. Remove all occurrences in your Editor.

  6. The registerFixedSidebarItem API has been removed. Remove all occurrences in your Editor.