Scrivito JS SDK 1.3.0 Is Available

Major improvements

Tour for beginners

Scrivito now includes a tour, which introduces the main editing controls to users who are new to Scrivito. After opening the Example App from within the dashboard, the tour starts automatically, but it can also be started using the “Start tour” item in the page menu.

Content Browser lets you open the selected object

After selecting a page or a binary object (e.g. an image) in the Content Browser, a button for conveniently opening it is now available. The object is opened in a new tab.

Widgetlist rendering now supports passing props

When rendering a widgetlist using a Scrivito.ContentTag component, it is now possible to pass props to the individual widgets via a special prop named widgetProps. This comes in especially handy when rendering tightly coupled widgets. Please see the API documentation for details and usage examples.

In-memory tenant for isolating tests from the CMS

A Scrivito-based app can now use an in-memory CMS tenant, meaning that the app can be executed without being connected to a Scrivito CMS. This is handy for running tests that create and access content you don't want to show up on your actual website. Furthermore, no network connection is required for creating, accessing or updating content. The in-memory tenant can be activated via Scrivito.configure().

Scrivito.BackgroundImageTag supports setting background properties

The Scrivito.BackgroundImageTag component now supports providing additional background properties like attachment, position and color. Previously, the values of these properties were fixed.

New API for easily uploading files

The Scrivito JS SDK now provides an easy-to-use method for uploading a file in the process of creating a binary object: Obj.createFromFile. The details can be found in the API documentation.

Further improvements

Fetching the first search result made easier

An ObjSearch instance represents the search results determined by a call to Obj.where() or Obj.all(). The new ObjSearch#first() method lets you fetch the first CMS object from the result set without having to check its size.

Improved pre-rendering support

Scrivito now supports pre-rendering proper canonical URLs for pages. For this, the “protocol://host:port” part (the origin) of the URL returned by Scrivito.urlFor() can now be configured using the new origin key in the options parameter of Scrivito.configure(). Previously, always window.location.origin was used, which is the default now.

Improved UI speed

Due to optimized rerendering, especially when editing text, the user interface is now even more responsive.

Rendering markup programmatically

The new Scrivito.renderPage method renders the markup of a page. It can be used in conjunction with pre-rendering and similar tasks in which the markup of a page needs to generated.

Minimum required React version

Starting at version 1.3.0, ScrivitoJS requires React 16.4.0 or above.

Bugfixes

In rare cases, the contentType, contentLength, contentUrl and metadata instance methods of an Obj could return undocumented results. Now, all of these methods return reasonable values in all cases. Also, Obj#get, Widget#get and MetadataCollection#get now return null instead of undefined if a value is not defined.

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...