Scrivito JS SDK 1.4.0 Is Available

Editing interface improvements

Changes dialog displays last editor

On the changes dialog of a working copy, the individual items now include the name of the user who most recently edited them. So, should questions arise regarding the changes made to a page (for example when publishing), instead of navigating to the page and opening its properties, you can simply use the changes dialog to determine the person most recently involved.

Binaries can be renamed

You asked for this, and now it’s possible: Images and other binaries can be renamed. Just open the Content Browser, find and select the image to rename, and click the pen button next to the name!

In the page properties, on the “Linked by” tab of a page, the Scrivito UI now opens a source page in a new window instead of navigating the UI to this page. This way, the Content Browser doesn’t need to be reopened to visit another linking page.


Content Browser is faster with large SVGs and GIFs

Content Browser users will no longer experience slowdowns when scrolling through SVG and GIF image collections containing large files. If an SVG or GIF is too large to be shown as a thumbnail, the Content Browser now displays a simple placeholder instead.

Working copies sidebar panel remembers scroll position

For better usability, the scroll position of the working copies panel in the sidebar now stays in effect when closing and reopening the sidebar. Previously, the scroll position was lost on every close.

API improvements

Customizable page menu

Customizing Scrivito’s top-right menu can make the life of editors easier and increase productivity. Using our new API, Scrivito.extendMenu, you can now add your own commands, links, custom dialogs (see below), etc., to this menu.

The new API in action.

Custom dialogs

For adding custom functionality to Scrivito’s editing interface, the SDK now provides a function for opening dialogs with custom content, Scrivito.openDialog. Please refer to the API documentation for details about this new function.

Changes to the Scrivito.urlFor API

With Scrivito.urlFor, the fragment key in the options prop (for specifying the hash value to be appended to the URL) has been renamed to hash; fragment is now deprecated.
If the target is a Scrivito.Link, urlFor now includes the link’s query and hash information in the returned URL unless they are overridden by the options. So, if you don’t want urlFor to append a query or hash to the URL, use { query: '', hash: '' } as the value of options.

Introducing preloading

In conjunction with pre-rendering, the new Scrivito.preload API serves to pre-warm the Scrivito cache. This speeds up the process of making a pre-rendered page interactive and avoids flicker when changing from the pre-rendered HTML markup to the live React page. To support this preloading, the Scrivito.renderPage API now returns a preloadDump, which contains all the CMS content needed for rendering the page concerned. The dump can be stored along with the pre-rendered HTML markup and be used later with Scrivito.preload.

As prerendering is a brand new feature, neither usage examples nor a tutorial are available as of now but will be soon!

Scrivito’s Link objects now have a rel attribute which can be set using the API.

New API method Widget#destroy

For programmatically deleting widgets from pages more easily, the Widget#destroy method has been provided. It allows you to remove a widget from the widgetlist attribute containing it without having access to this attribute.

More flexible widget hierarchy restrictions

Previously, when defining a widget class using createWidgetClass or provideWidgetClass, instances of this widget could (and still can) be restricted to a single parent widget class using the onlyInside parameter. For example, if you wanted ButtonWidgets to be contained only in BoxWidgets, you would specify onlyInside: "BoxWidget" for the ButtonWidget class.
Starting at this release, it is now possible to alternatively specify a list of parent widgets instead of just a single one:
onlyInside: ["BoxWidget", "SectionWidget"]

SDK package is significantly smaller

The Scrivito JS SDK is now compiled with webpack 4. Compared to webpack 3, the package size is around seven percent smaller now, causing it to be downloaded faster.

Bugfixes

The Scrivito.LinkTag component erroneously allowed specifying a Scrivito.Binary as the value of the to prop. The LinkTag was even rendered, but the link was not followed when clicked. The Binary value type is now refused and throws an error.
If you have been using this combination in your code, please use Scrivito.urlFor instead to obtain the URL of a binary value.

More great blog posts from Andreas Viebke

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.45.0 RC 1 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...