Skip to content

CEE 2.0.4

Choose a tag to compare

@martinjoconnor martinjoconnor released this 02 Sep 00:25
· 72 commits to main since this release
f7fdc41

CEDAR Embeddable Editor 2.0.4 Release

We’re pleased to announce the CEDAR Embeddable Editor (the CEE) 2.0.4, a release that makes the CEE workable as a live preview beside another editor. A template can now be replaced without rebuilding the element, the Expand All and Collapse All buttons can be hidden, and the form header names the component it belongs to.

The CEE 2.0.4 package is available from npm as cedar-embeddable-editor.

See the CEDAR Embeddable Editor documentation for setup, configuration, and usage guides.

What’s New

Template Replacement Before an Instance Is Loaded

A host may now assign a new template as long as no instance has been supplied.

Set-once assignment exists to refuse one question: what becomes of the answers someone has been typing when the template under them is swapped. Where there are no answers, there is nothing to lose. Each replacement builds a fresh context, so nothing of the previous template survives into the new form. Once an instance is loaded the template is fixed again, and a second assignment is reported and ignored as before.

A host showing a live view of a template that is itself being edited no longer has to discard the element and start a whole editor per change, which cost about a second of bootstrapping regardless of the size of the template.

Host Control Over Expand All and Collapse All

showExpandCollapseAll joins the display flags, in the same shape as showDownloadMenu: declared on CeeConfig, present in the runtime key map and the validation schema, and read by the editor.

It is the one display flag that defaults on, because that is how the CEE has always rendered, so nothing changes for a host that does not set it. A host rendering its own view of the same artifact beside the form can turn the buttons off rather than offering two contradictory sets of controls over one thing. Turning them off removes a control rather than fixing the sections open or shut: each section still opens and closes on its own header.

The Editor Names Itself

CEE is now stamped under the mark in the form header, above the version, which on its own named a build without naming what was built. The distinction matters where the CEE is one of several CEDAR components on a page.

Denser Choice Options

Radio and checkbox options render at 36px rather than 48px, one level above the point where Material stops drawing its invisible 48px touch target. The visible control loses a third of its height and none of its reach, and the clear action beside a selected option shrinks with its neighbours instead of holding its row tall. Read-only rendering is unchanged.

Clearer Instance-Reading Diagnostics

The diagnostic raised when an instance does not supply a multi-valued field’s occurrences now names the field’s path. The message was previously the same sentence however many fields were missing, and it named none of them, so an instance omitting one multi-valued key produced a pile of identical reports.

Model Library Alignment

The CEE now builds against the public cedar-model-typescript-library@1.0.5 package.

The application and visual-test dependency graphs pin the same npmjs tarball, so the browser package is exercised against the model contract it ships. The model library remains compiled into the CEE’s browser bundle and is not an additional runtime dependency for embedding applications.

Maintenance

The developer application now loads a template worth looking at: 23 field types over two pages, every temporal granularity, radio, checkbox and both list cardinalities, the static widgets, the authority fields, and single and multi-instance elements inside two wrappers. It previously opened a single text field, which exercised almost nothing the editor can do.

Compatibility

The CEE 2.0.4 release introduces no configuration or host-API migration beyond the CEE 2.x changes documented for 2.0.1. showExpandCollapseAll defaults on, and a template assignment made before an instance is loaded now succeeds where it was previously reported and ignored.

For the complete technical change history, see the comparison between the CEE 2.0.3 and 2.0.4 releases and the CEE changelog.