Measurable Success «10 Checkpoints for Future-Proof Enterprise CMS» White Paper
Measurable Success - White Paper

Scrivito JS 1.5.0 Featuring Changes View Mode & Hierarchy Browser

Major improvements

View the changes made to a page

How often do you have to question a team mate about the changes they made to a specific page? You could compare a reworked page with its published version instead, but that’s a tedious job in most cases. No longer.

The Scrivito UI now provides a “Changes” view mode that lets you see the changes that have been applied to a page since it was last published. In this mode, not only textual changes are highlighted, but also positional changes to widgets as well as additions and deletions.

This release features the first iteration of the “Changes” view mode. It frees you from having to work with two browser windows and carve out the differences between a currently published page and its version in a working copy. Scrivito now presents you with a comprehensible “diff”, as we call it internally. Try it out and stay tuned!

Hierarchy panel on the sidebar

Have you ever wanted to see or click through the hierarchy of your website, inspect or adjust one or the other page, then move on to the next one? Now you can, thanks to the hierarchy browser we are introducing in this release.

We placed the button for opening the new panel directly underneath the top-right menu button, and thus it shifts the other, originally four buttons down by one position. Clicking the hierarchy browser button initially causes just the homepage and its direct subpages to show up on the panel. All items for pages with subpages have a clickable arrow icon for folding out the child pages and hiding them again. Clicking the (i) button at the top displays (or hides) the name of the user who last changed the page, as well as the date of this change.

Selecting a page from the hierarchy panel navigates to that page and highlights the panel item, so that it is always clear which page you are inspecting. The panel remains open unless you move your mouse pointer away from it. If you do, the panel reopens at exactly the position where you left it, so viewing several pages in succession is a breeze.

Every item on the hierarchy panel includes a menu button on the right-hand side. When clicked, a menu pops up underneath the item. It lets you add a subpage, edit the page properties, or delete the page. The menu and its actions are available independently of whether a page has been selected or not, giving you a means to manage pages without losing focus of the selected page.

The hierarchy browser should make every editor’s live a lot easier – have fun!

Improved object selection in the Content Browser

When selecting an object to be displayed by, for example, an image widget, Scrivito’s Content Browser should ideally offer only such objects – images in this case – to the editor. To make this possible, two enhancements were made to Scrivito:

  • You can now specify a specific class or a set of classes for the value of reference and referencelist attributes: When defining such attributes in an object class (using createObjClass or provideObjClass), just set the only property accordingly. 
  • To have the Content Browser offer a restricted set of CMS objects, the configureContentBrowser API now lets you define a function for specifying the filters to offer based on the passed-in object class names.

In other words, you can use only to restrict reference and referencelist attributes, and additionally configure the Content Browser to show only selectable objects. This not only works for images but for any kind of CMS objects. For examples, see configureContentBrowser.

Editable rel attribute values

Starting at version 1.4.0 of the Scrivito JS SDK, Link objects support the rel attribute. The value of a rel attribute indicates to search engines how the linked document or resource should be handled, e.g. whether it should be indexed or followed, etc.

For having more control over how your links are processed, rel attribute values can now also be set by editors when changing them via the properties of a page or widget. For this, Scrivito’s built-in link editor has been redesigned to make this new functionality available.

Further improvements and changes

Automatically updating menu extensions

Starting at the previous Scrivito JS SDK version 1.4.0, the top-right menu can be extended using the Scrivito.extendMenu function. The menu, including its extensions, is automatically updated as required after changes to content, for example. Using the new Scrivito.updateMenuExtensions API, you can now also have the menu updated depending on external factors such as the result of a web service call.

Selectively disabling in-place editing

The Scrivito SDK now allows developers to conditionally disable in-place editing for any section of a website, page, or widget. This comes in handy in situations where in-place editing gets in the way, or better editing options exist like with

  • an overview widget, a snippet, or search results,
  • a linked widget (e.g. an image) whose link should also work if in-place editing is active, or
  • content for which special editing functionality has been made available, e.g. in the properties view.

This feature is brought to you as two components, Scrivito.InPlaceEditingOff and Scrivito.RestoreInplaceEditing. The latter is for reenabling in-place editing for content further down in the component hierarchy, e.g. for the contents of a column widget to which Scrivito.InPlaceEditingOff gets applied in order to prevent its structure from being altered.

Improved performance with image loading 

For improved performance, binaries are now requested in batches, reducing the number of requests needed to serve multiple images.

Bugfixes

  • To enable npm install to detect and complain about an incompatible react version, the scrivito npm package now has two peer dependencies, react and react-dom. Previously, react and react-dom were plain dependencies.
  • Attribute definitions in which the type alone was specified using an array are now rejected. For example,
    … { attributes: { scale: ["float"], ...}} is no longer accepted now and needs to be replaced with
    … { attributes: { scale: "float", ... }}
  • A preview issue of the Scrivito.Link component has been resolved: Links to binary objects and external URLs now also work correctly if set to open in a new tab.