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.

More great blog posts from Andreas Viebke

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.45.0 Released

    Interface Builder Supports Further Attribute Types for Filtering

    Interface Builder improvements Filtering data by enum, boolean, date, and number attributes The Interface Builder’s data editor now also lets you filter data by attributes of the enum , boolean , date , and number types. This makes it much more convenient and intuitive to select and present data...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.44.2 Released

    Bugfix Release An issue with Scrivito.useDataLocator has been fixed. It prevented filters with reference data attributes from being evaluated properly. We apologize for any inconvenience this issue may have caused! Thanks again for using Scrivito!

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.44.1 Released

    Maintenance release This is a maintenance release with minor improvements. As always, we will keep you posted if there is anything interesting to report. Stay tuned! Thanks again for using Scrivito!

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.44.0 Released

    Interface Builder improvements LinkTag supports data items The LinkTag component now supports data items as navigation targets. Passing a DataItem to the to prop causes the link to point to the details page of the item concerned. Accessing current data of a specific class The useDataScope and...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.43.0 Released

    Interface builder improvements Data attributes For the application to utilize the attributes selected by content editors, the Scrivito SDK now includes a (beta) API for representing data attributes, DataItemAttribute . A data item attribute can be accessed from a data item via...

  • Providing Data Classes with Custom Attributes

    Latest updates to edit.scrivito.com

    Defining custom attributes via the Interface Builder’s data editor The data editor now lets you add custom attributes to data classes. If, for example, you have a “Current user” data class that requires an attribute not specified in the editing configuration of this class, e.g., “email”, you can...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.42.1 Released

    Bugfixes Data integration issue > DataItem#get > no longer requires a loading context, i.e., > Scrivito.load > or > Scrivito.connect > . We apologize for any inconvenience the above issue may have caused! Thank you for using Scrivito!

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.42.0 Released

    Interface Builder improvements DataScope#limit() API method The new DataScope#limit() method determines the maximum number of data items a DataScope may contain. It returns either a number indicating this limit, or undefined if no limit is set. Introducing Scrivito.currentLanguage()...

  • Introducing the ​New Data Editor

    Latest updates to edit.scrivito.com

    > > As you may have noticed, we have been continuously refining and expanding the Interface Builder. Now the time has come for a correspondingly enhanced data editor. > > The new data editor comes with an intuitive interface that provides a visual representation of a data locator as well as...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.41.0 Released

    Interface Builder improvements Accessing a data scope from the current data It is now possible to access a DataScope from the current data using the new Scrivito.useData hook (which supersedes the Scrivito.useDataItem hook). The new hook always returns a DataScope . In order to check whether this...